Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL 2005 scripts

Posted on 2012-03-20
2
Medium Priority
?
179 Views
Last Modified: 2012-08-13
I have many saved SQL scripts.  Is there a way to tell SQL look in this directory and run all the scripts in the directory one after the other?  If not, is there anything close to accomplishing the task of firing off dozens of scripts that are all saved as individual *.sql files?
0
Comment
Question by:dastaub
2 Comments
 
LVL 25

Accepted Solution

by:
jogos earned 1000 total points
ID: 37744031
Sqlcmd utility
http://msdn.microsoft.com/en-us/library/ms170207.aspx

And then have a script that calls all scripts

:r script1.sql
:r script2.sql
0
 
LVL 20

Assisted Solution

by:BuggyCoder
BuggyCoder earned 1000 total points
ID: 37744067
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Screencast - Getting to Know the Pipeline

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question