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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running SQL commands through a batch file.

Status
Not open for further replies.

YL5956

MIS
Jul 11, 2001
73
US
I was wondering if anyone know how to update tables or run stored procedures through the command prompt or batch file. Does anyone have sample code? We are implementing version controls through a third party vendor. This application will take any SQL Server updates including tables loads, storing new procedures etc through a batch file. How can this be accomplished in terms of invoking SQL Server through batch? Thanks in advance for any input.
 
Have you looked into the OSQL command line utility? It can run from a command line, and executes individual queries or batches of queries from a file.


You might also want to consider SQL-DMO.


Search MSDN for more SQL-DMO info.

Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time.
NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top