Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Database shell in SQL Server 2005

Author  Topic 

snez
Starting Member

16 Posts

Posted - 2008-10-17 : 17:17:59
I'm trying to create a copy of a database, just a shell, no data. I've done this in Informix using the "dbschema" command.

Is there something similar in SQL SERVER 2005?

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-10-17 : 17:29:34
Right click Database-tasks-Generate script
Go to Top of Page

snez
Starting Member

16 Posts

Posted - 2008-10-17 : 18:16:03
After generating a script do I just replace the database name in the USE [DBNAME] line with my new database name ("CopyofAdventureWorks" for example) and run the script?
Go to Top of Page

snez
Starting Member

16 Posts

Posted - 2008-10-17 : 18:36:22
It seems I have to create the database first via the script generated by the "Script Database As" option, then change the database name in the USE [DBNAME] line of the script generated via "Right click DB-tasks-Generate script" and run the script.

Am I on the right track?

Thx
Go to Top of Page
   

- Advertisement -