Execute multiple scripts on multiple servers - sql

I have a multiple scripts I need to execute on test servers (we have 20 test servers)
Is there any method for doing this quickly or any tool that can manage this vs doing the whole process manually?

Beside using SQLCMD which is a manual and time consuming process, or Server groups in SSMS you can also use a third party tool, ApexSQL Build.
Here is the article with a detailed explanation on how to accomplish this using this tool: SQL Database deployment on several different SQL Server instances and databases
Disclaimer: I work for ApexSQL as a Support Engineer

Related

How do I deploy a compiled database that no one can see/view source script but can execute it

I developed an application that used SQL Server database 2017. I wrote most of the business logic in stored procedures, triggers & UDF. Now at the time of Go-Live, I want to deploy a compiled database on a client-server machine so no one can view or change scripts.
I can manage this from the SQL Security, access rights, etc. but actually, the Client network administrator has all the credentials and rights of the database and I do not want anyone to view/change the script even the administrator.
can I deploy a compiled database on a client-server instead of a regular one so no one can view/change scripts but can execute them Similarly like EXE file users can execute it but cannot view/change the code?
Does Microsoft SQL Server provide a solution on this or any workaround?
please suggest thanks in advance.

Can I set SQL Azure Vunerability Assesment at a server level instead of database level?

So Recently I found a pretty neat feature where SQL Azure can schedule vunerability assesment scans regularly
To configure this you must go onto each database on your server and configure the storage and who you want to receive the reports.
Lets say I have 100 databases - this is going to take a very long time. Is there a way I can set the Vunerability scan at a server level.
Or failing that a script that can set this scan up (prefereably SQL script if possible)?
Yes, you can configure this at the server level as shown below.
However, periodic scans can only be configured at the database level. Azure SQL Database team mentioned that they will provide more options to run scans and analyze results at scale. The currently available option is to use ARM APIs via the Azure SQL Management SDK library.
Azure SQL Database team mentioned also that PowerShell cmdlets will be released in the near future to enable automation via PowerShell Scripts, and as they make more progress the ability to run at scale will be available via the portal as well.
Currently in SQL Vulnerability Assessment, the target storage and periodic scans can be configured only at the database level.
As the feature develops, we will provide more options to run scans and analyze results at scale.
The currently available option is to use ARM APIs via the Azure SQL management SDK: https://www.nuget.org/packages/Microsoft.Azure.Management.Sql
Powershell cmdlets will be released in the near future to enable automation via Powershell scripts.
And as we make more progress, the ability to run at scale will be available via the portal as well.
In the meantime, we’re very glad to get further feedback on the current functionality of VA and additional feature requests.

SQL visual client to query a databse deployed at heroku

I know Heroku has a command line client to execute a .sql file.
But is there something like an SQL Server Management Studio for databases deployed at Heroku? I was looking for a UI that allows you to interactively write queries, execute them, and view the results on a grid. I'll mostly execute SELECTs and UPDATEs based on ids, over databases generated by Rails.
Have a look at Adminium: it's a free control panel plugin for Heroku.
https://addons.heroku.com/adminium
Take a look at http://www.pgadmin.org/ and install pgAdmin III. I use it for the same purpose, watch and query over the database of one of my Heroku apps.

how to use a desktop software without having sql server installed on system?

consider I write a desktop software in C# for example,and it reads/writes data to/from sql server,Can I run this software on a system without having sql server installed.
I saw the two links of stackoverflow,but did not get my answer.
I want to know CAN THAT BE DONE OR NOT?
if yes,how?
thanks in advance.
Sql Server must be installed, and running, somewhere to be able to use it. However, this does not need to be on local machine. The most common scenario for Sql Server is to be installed on a dedicated server machine off in a data center somewhere, and either many clients will connect to and use the same database, or one or a few web servers will connect potentially many times per second with different requests. It's not really intended for desktop use.
If you want to build a desktop app, and you want a database to use only as a local data store, Sql Server is actually a really poor choice for this. That includes the free Sql Server Express. Don't use it for applications that will be distributed to end users, where all the data will kept on each user's local system. It is a server-class engine, and works best when it can run on dedicated hardware.
Instead, you want a desktop-class or in-process database engine, such as Sqlite, Sql Server Compact (not Express) Edition, or even MS Access.
There are many SQL engines that can be embedded in desktop application. For example SQLite, there should be one with C# interoperability.

Export SQL database (all tables) from remote server

I'm current using a 3rd party product, which uses an SQL Server database. I've been asked to take a copy of the database for our own backup/security purposes, but I'm having trouble.
To access the database I'm currently logging into one of my companies servers using remote desktop, where SQL Server 2005 Express is installed. Using that instance of SQL Server I then connect to the 3rd party's SQL server.
when I execute Tasks -> Back Up..., it appears to work, but the files are stored locally on the remote SQL Databases server, which my IT teams tells me is expected.
I tried using Tasks -> Generate Scripts... but the option to "Script Data" isn't available, either because it's SQL Server 2005 Express, or because the database is remote (not sure which, but probably one of those).
I've tried other things that I can't recall at the moment, and I'm out of ideas.
Can anyone suggest something that will let me get a 'local' copy of the remote databases table structure AND data?
The Generate Scripts wizard is unavailable because you are using a very old version of Management Studio Express. The 2012 version will work just fine against 2005 instances, but there is no longer an Express edition anyway, because all of the SSMS features are now available without any license.
Download the latest versions here:
https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms
I list downloads for the older versions at the bottom of this post:
https://blogs.sentryone.com/team-posts/latest-builds-management-studio/
Backups do generate locally. That is to be expected, as your team has already told you. You can generate it locally and then download it with a tool such as an FTP client. I highly recommend Redgate tools. See http://www.red-gate.com/products/dba/sql-backup/ It's a great tool and has some network backup options built in to ship your backups elsewhere. If it's a one-time thing, Redgate also has tools for that too, e.g. SQL Compare and SQL Data Compare.
The solution you pick really depends on how frequently you have to run and download backups locally and how big the DB is.