Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
heze
Posting Yak Master
192 Posts |
Posted - 2006-05-18 : 10:57:23
|
| Hi everybody,Im doing a lot of sql development and my scripts are in general very large, I am thinking about distributing them in different files.Therefore, I was wondering about the possibility of executing a script that reside in different files from the 'Query Analyzer'.For example , from the query analyzer:exec(c:/MyScripts/MySpecificScript)goIs there a way to do the latter?Thank you for your helph |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-05-18 : 12:39:39
|
| Can't think of a way to do that, but you could write a Command Line BATCH file that uses OSQL to run the scripts from their files, instead of using Query AnalyserKristen |
 |
|
|
heze
Posting Yak Master
192 Posts |
Posted - 2006-05-18 : 12:43:20
|
| Hi Kristen,I was also thinking about using the xp_cmdshell proc. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-05-18 : 12:46:08
|
| You could do that, but you'll have to program up a solution.If you just have a list of files you want to execute then I reckon that OSQL will be easier - it will handle putting all the error messages in separate files and all that sort of stuff.Krsiten |
 |
|
|
|
|
|