среда, 30 апреля 2014 г.

Run Script On Multiple MS SQL DataBases

Problem

Run script on multiple MS SQL Server Databases (in My Case it is MS SQL Server 2008 databases)


Solution

I've write simple app to solve this problem.
Main idea: set the list of database connections and run script on each database from list

It's pretty simple, but very usefull for me.

Download

How to use

1. Fill database list
Fill the database list in file ConnectionStrings.txt
Format
host|dbname|user|password

One database info per line

2. Set the script
copy your script into file script.txt

3. Run Run.bat
That's all. All databases from ConnectionStrings.txt will be updated by script from script.txt


Feedback

Please, leave feedback in comments to this post

See also
Question on forums
http://www.dbforums.com/microsoft-sql-server/1621678-best-mssql-management-tools.html

discussions on stackoverflow
http://stackoverflow.com/questions/1461955/sql-server-execute-batch-t-sql-script-on-multiple-databases/27794906#27794906
http://stackoverflow.com/questions/3306218/run-script-on-multiple-dbssql-server

Комментариев нет:

Отправить комментарий