Sunday, March 25, 2012

Calling several sql script from a master sql script.

I would appreciate it if any of you Gurus out there can tell me about a way to call a set of SQL scripts from a master SQL script.

Currently I have several scripts that do the following.

1) Create tables
2) Create Stored proc
3) Setup Security
4) Load Default Data

I want to create an Install script that will call all the above scripts for me.
I will be running this script from SQL Query Analyzer. Also, note that all the above scripts will not be in the same directory as the install script.

Appreciate any help.If you don'need to run your scripts from SQL query analyzer you could run the ISQL command line utility, that accept as parameter also an input file (option -i )

Take a look to SQL Servel Books online.

Bye

No comments:

Post a Comment