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
 General SQL Server Forums
 New to SQL Server Programming
 SQL SERVER database create

Author  Topic 

abuhassan

105 Posts

Posted - 2006-10-06 : 11:22:08
How can i get a create statemnets that will create for me a clean copy of the whole database cirrently im going to each table and right clicking and exporting a create sql for each object.

basically i want all the tables, views, storedprocedures, functions etc as a create statement?

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2006-10-06 : 11:25:05
IN SQL 2005 Management Studio - right click on the database, click on tasks, click on generate scripts and follow the instructions from the wizard.

IN sql 200 - it is done very similarly from enterprise manager.


Duane.
Go to Top of Page

abuhassan

105 Posts

Posted - 2006-10-06 : 11:34:57
thanks

is there no TSQL command that will do the job?
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-10-06 : 11:52:25
quote:
Originally posted by abuhassan

thanks

is there no TSQL command that will do the job?




Make a backup of the database, and restore it to the new database name.



CODO ERGO SUM
Go to Top of Page

abuhassan

105 Posts

Posted - 2006-10-06 : 11:57:18
Thanks

i dont know why i didnt think of that...
Go to Top of Page
   

- Advertisement -