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 |
|
pnpsql
Posting Yak Master
246 Posts |
Posted - 2011-12-15 : 11:38:30
|
| hi team, i am working on oracle since last 1 year, now i moved to sql server, there is concept of runscript in oracle. i can't find any thing like that in sql server.please help me. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-15 : 11:42:46
|
| first explain whats runscript in oracle------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
pnpsql
Posting Yak Master
246 Posts |
Posted - 2011-12-15 : 12:01:57
|
| i have some scripts to run on server, the first way is to open all script in query window and run one by one. the other way is to list all file name in one script and run that script that call each file and execute it.that is runscript.challenge everything |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-15 : 12:13:13
|
quote: Originally posted by pnpsql i have some scripts to run on server, the first way is to open all script in query window and run one by one. the other way is to list all file name in one script and run that script that call each file and execute it.that is runscript.challenge everything
you can simulate that in sql server using ssis.see one such simulation in below linkhttp://visakhm.blogspot.com/2011/12/simple-sql-code-deployment-utility.html------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-12-15 : 12:37:09
|
| SQL Server Management Studio has a SQLCMD mode that lets you execute external script files, using the :r directive. You can find more information here:http://msdn.microsoft.com/en-us/library/ms174187.aspxThis is also possible using the sqlcmd command-line utility, documented here (also has more detail on :r)http://msdn.microsoft.com/en-us/library/ms162773.aspx |
 |
|
|
|
|
|