Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored procedure question

Status
Not open for further replies.

uncLez

Programmer
Jun 18, 2002
38
0
0
NL
Hi all,

I want to run a stored procedure from th emaster database.
This stored procedure creates database devices, backup devices, etc etc, this all works. However it should also create a bunch of stored procedures, defaults and tables.

I can create the tables building the variable database name into a string and then running it using EXEC.

I can not seem to get this done for stor-procs and defaults though... Also I cannot use the
Code:
Use "Insert Database Name Here"
command for some reason.

So how can this be done? I am running SQL Server 6.5 at the moment... Any ideas would be very much appreciated. Thanx in advance,
Anton de Wit.
 
Hello Anton,

I don't know other options. But what i have done for my database is ,
we have generated sql scripts from one of the database template and then used the command line commands to execute them from within the procedures ..


Raj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top