Click here to Skip to main content
15,903,203 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

I am using sql server 2012.

I have multiple database system for my application.so each time when i done with my development side , i need to fire all my chnaged , created procedures on each databases manually by changing database each time.

is there any way by which at once i can fire my database chnages acrosss all my required databases ?
Posted

1 solution

You can Create a Script file where you can write all your sql query.Using Linked server you can select from difirent server for different database.
Create a Batch File and call the script file in Batch file .Just clicking on the batch file to execute the sql srcipt file.

here is the link which explains how to create batch file for sql script.

http://stackoverflow.com/questions/3794897/need-help-to-write-bat-file-that-execute-sql-scripts-in-sql-server-2008-and-ano[^]

http://stackoverflow.com/questions/3794897/need-help-to-write-bat-file-that-execute-sql-scripts-in-sql-server-2008-and-ano[^]

Want to create a batch file to execute SQL script[^]

You can also run the batch file from jobs.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900