Guys,
Below is command which you can use to execute stored procedures script on SQL server from command prompt. This will be definetely helpful if you have a folder where all scripts are stored and you want them to execute all. Normally you will execute all SPs 1 by 1 but with this command all the stored procedures scerpts will be executed without any hassle and this will save lot of time too!
for %f in (sprocs\*.sql) do sqlcmd -S <servername> -U <username> -P <password> -d <database> -i %f > > sprocs.txt
Above command will take all script from folder sprocs/* and will copy them in a text file. You can simply copy the content of text file in the SQL Analyzer window and execute them:)
Best Regards,
VG
www.TeacherJi.com