Creating Batch file to automate script execution process
Posted: 14 Sep 2010 09:05
Hi All,
I am new to this. I have to create automation script to execute various sql scripts in different sql servers. I have total 15 sql scripts (5 for Dev, 5 for Staging and 5 for Production server). I need to create a batch file which will use SQLCMD to execute these scripts on desired server. Basically, once the batch file is executed user should be prompted for an argument(parameter) and if they supply D (-D or /D) then the control should go to all the development server scripts and execute them in order given in the DEV server. and the same for UAT and Prod server.
Can anyone please provide some help?
Thanks in advance...
I am new to this. I have to create automation script to execute various sql scripts in different sql servers. I have total 15 sql scripts (5 for Dev, 5 for Staging and 5 for Production server). I need to create a batch file which will use SQLCMD to execute these scripts on desired server. Basically, once the batch file is executed user should be prompted for an argument(parameter) and if they supply D (-D or /D) then the control should go to all the development server scripts and execute them in order given in the DEV server. and the same for UAT and Prod server.
Can anyone please provide some help?
Thanks in advance...