Search found 3 matches

by apat
15 Sep 2010 11:16
Forum: DOS Batch Forum
Topic: Creating Batch file to automate script execution process
Replies: 5
Views: 6310

Re: Creating Batch file to automate script execution process

Thank you aGerman... I am using below code as per your suggestion... @echo off if "%1" == "D" ( sqlcmd -S DevServer -U UsrName -P Pwd -d Dbname -i d:\sqlcmd\dev.sql -i d:\sqlcmd\dev2.sql goto eod) if "%1" == "T" ( sqlcmd -S TestServer -U UsrName -P Pwd -d Dbna...
by apat
14 Sep 2010 14:34
Forum: DOS Batch Forum
Topic: Creating Batch file to automate script execution process
Replies: 5
Views: 6310

Re: Creating Batch file to automate script execution process

I know how to use SQLCMD.

All I want is, how to accomplish this task for automating in batch file.

e.x. when I execute batch file and supply argument D then it should execute commands on my Dev server. Same way once I put P then it should use Production server to execute commands.
by apat
14 Sep 2010 09:05
Forum: DOS Batch Forum
Topic: Creating Batch file to automate script execution process
Replies: 5
Views: 6310

Creating Batch file to automate script execution process

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. Ba...