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

Database Problem

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,
Here is my Problem:I have a Database(name-Test) with so many tables,views,StoredProcedures.....etc.I need to create a new database, and while doing so my Test Database should serve as a skeleton Structure for my new database.
That is all my tables ,views,storedprocedures ..etc of test database should fall inside my new database.(I mean without data)
 
Create a script of the old database as a single file, scripting all objects (tables, SP's ) etc.

Run the script on the new database.

Chris Dukes
 
I would use DTS to copy the structure from Enterprise Manager.

Dwight
 
Hi cdukes,

Thanx a lot.But I have Got one more doubt.
How Iam supposed to script the whole database,Is there any Sql Options for this? or Should I Create a script for each and every object in the database.


 
Well lets see, that ought to be really hard. Enterprise Manager, right click on the database name, choose all tasks from the popup menu, choose generate sql script, pick the options you want, press OK and wait about two minutes.

Seriously, does anyone on this forum ever read the manual???



 
hi fluteplr ,

Thats a very nice suggestion,but unfortunately I have to achieve this thro' coding b'coz I need to do this at run time.I hope u understand.We all read the manual perfectly...Can u give suggest me some other option pl.
 
You could use SQL DMO objects which allows you to completely script the database in VB. We have written a VB task that is schedules every night to completly script the databases.

Chris Dukes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top