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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 ORACLE LIKE RUNSCRIPT IN SQL SERVER

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 MVP
http://visakhm.blogspot.com/

Go to Top of Page

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
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2011-12-15 : 12:09:17
ok..do you have the sql server client tools installed?

If yes, go open up SQL Server Management Studio (SSMS)

What version of SQL Are you using?

I assume you want to run an Oracle script in SQL Server

That probably won't happen

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

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 link

http://visakhm.blogspot.com/2011/12/simple-sql-code-deployment-utility.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

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.aspx

This 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
Go to Top of Page
   

- Advertisement -