Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mass compile in sql server 1

Status
Not open for further replies.

misterstick

Programmer
Apr 7, 2000
633
0
0
GB
further to thread183-1532457

i have multiple stored procedures.

the code for each is in a separate t-sql script file.

a change of server has changed the way that dates are handled.


to stop this happening again, i've changed the code as needs it, eleven files.

i'm on day four of my journey into sql server, and eleven is probably going to become hundreds.

how can i run the scripts to recompile the all stored procedures without having to do it one at a time?

many thanks,

mr s. <;)
 
the answer is to use the command line utility sqlcmd, issuing the command :r script.

now, where's my sockpuppet to give myself a star.

mr s. <;)

 
Thanks for posting the answer as well as the question. To run a number of scripts, do you give sqlcmd a script containing the script filenames, or do you run a DOS batch file / Windows command script calling sqlcmd for each one?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top