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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

system created stored procedures! Urgent!

Status
Not open for further replies.

mkey

Programmer
Oct 3, 2001
288
CA
Hi All,

My question is when we create a new database in SQL Server 7.0 does is automatically create bunch of system type stored procedures? I am testing this by creating a new database and running a script which contains the structure of a database I already have in another server. The existing database has bunch of system type stored procedures. But the new database after I ran the structure script doesn't have any system created stored procedures. Can someone please tell me what I'm doing wrong?

Thank You so very much!
 
If your talking about the system stored procedures which begin with dt??

If so these are created when you first try to view/create/edit database diagrams from within Erntrprise Manager. A dtproperties system table is also created.

Nothing to worry about.

Rick.
 
Thank you Rick. I have another question for you. I am running the strucutre of the database using osql utility. Now I want to drop the existing database and create a new and then run the structure. I need to do this without using the EM? Any thoughts on this?

Thank you!
 
I assume you have a script which creates all your tables/constraints/stored procedures etc??

You can add into this script the DROP DATABASE and CREATE DATABASE commands.

Is this what your after or have I missed the point.

Rick.
 
Sorry for not explaining clearly. I'm using scptsfr.exe to create the struncture using -F switch which will give me seperate scripts files for creating tables, sp,views etc. How can I get the drop the existing db and create the new db(create database dbname) dynamically using the same idea?

Do you follow me?

Thanks!
 
Sorry but I'm not familiar with scptsfr.exe. And you can not create scripts dynamically from Enterprise Manager to CREATE and DROP databases.

All I can offer you is that if you look in Books Online under the topic "CREATE DATABASE (T-SQL)" AND "DROP DATABASE (T-SQL)".

The topics give you the syntax and examples so you could then edit into your scripts what is required.

Rick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top