June 27, 2002 at 3:18 am
PLEASE can someone help? I need to run a batch file to run 5 scripts in succession - only trouble is, I don't know how to create one.
If anyone can give me an example ASAP I will be really grateful (I am running SQL Server 2000 on Win2K)
Thanks in advance
June 27, 2002 at 3:25 am
isqlw -S "Server name" -d "Database" -U "User" -P "Password" -i "Script 1" -o "Output script 1"
isqlw -S "Server name" -d "Database" -U "User" -P "Password" -i "Script 2" -o "Output script 2"
isqlw -S "Server name" -d "Database" -U "User" -P "Password" -i "Script 3" -o "Output script 3"
isqlw -S "Server name" -d "Database" -U "User" -P "Password" -i "Script 4" -o "Output script 4"
isqlw -S "Server name" -d "Database" -U "User" -P "Password" -i "Script 5" -o "Output script 5"
Replace the values in quotes. The -i switch the full path to your scrpit and the -o switch is the path to an output file which contains an output like you would see if you executed the scipt from within query analyser e.g. 1 row(s) inserted.
Regards,
Andy Jones
.
June 27, 2002 at 10:43 am
Or if you want a single output file, check out my Version Control Series.
http://www.sqlservercentral.com/columnists/sjones/vcspart3.asp
Steve Jones
June 27, 2002 at 10:44 am
Thanks, I appreciate it. I know it was a simple question, but if you never do it, you just don't know!!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply