Newbie question - creating a stored procedure to create a script

Newbie question - creating a stored procedure to create a script

Post by phas.. » Thu, 09 Nov 2000 04:00:00



At my company the software we created uses an SQL database.  Any
client to whom we sell the software needs to set up a structurally
identical database on their own servers.  Only a dozen or so tables
must be populated prior to using the software.

Currently we create a script of our own database, sans data, for them
to run to create their own.

I need a way to script out the database with the ability to add
comments and other code to the script without editing the script
itself every time I create it.

Would this be done in a stored procedure?  Is there a SQL tool to
accomplish this?  Is there any type of code anywhere that I might get
my hands on to do this?

Any help is greatly appreciated.

Phase II

 
 
 

1. script to create tables and stored procedures

For some reason I cannot open the Enterprise manager. So I cannot get
directly to my tables, stored procs, server tools, wizzards, etc.

 I can run the server and run queries, however.   So before I reinstall SQL
7.0 I want to update the script that has all the SQL to recreate  of all my
tables, stored proc's, etc.  Since I cant go into EM I cannot automatically
run this.  Is there a way to create this script from the query analyzer.  Or
at least is there a way to view the sql that creates each table, stored
procedure, so I can copy paste them into an sql file.

Thanks in advance

SM Haig

I am running beta 7.0 on a laptop

2. System 10 Database Designers Wanted

3. Newbie Q: Need help creating a stored procedure

4. how to create SQL server .sdf files

5. Scripts to create multple stored procedures

6. Sql server mail volume limits

7. script won't create stored procedure

8. Get procedure names of package (without args)

9. stored procedures are not created when databse is created

10. Script to create Stored Procedures

11. Generating CREATE TABLE script through a stored procedure

12. Newbie: Creating Stored Procedures

13. Creating a Stored Procedure that creates views