Solved

SQL 2005 scripts

Posted on 2012-03-20
2
156 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 250 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 250 total points
ID: 37744067
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

832 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