Copy exact duplicate or just structure of DB | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Copy exact duplicate or just structure of DB

I need to be able to copy the exact DB table structure (indexes, key fields, default values) between two servers. What is my simplest way to do this. I had trouble with the copy database wizard and also did not acheive what I wanted importing data. What is my simplest (best) way to do this? Thanks. Matthew Moran
The IT Career Builder’s Toolkit
http://www.cbtoolkit.com
Got it! Did a detach, copied the files, and reattached at the new server. However, I know you can do a live backup/copy to a new server. How do I make that happen with all the field attributes (default values, primary keys, etc.)? Thanks. Matthew Moran
The IT Career Builder’s Toolkit
http://www.cbtoolkit.com
Did you try Generate Scripts?
Open EM. right click on Database; select All Tasks–>Generate SQL Script
Using that SQL Script, create tables in other Database
Madhivanan Failing to plan is Planning to fail
Mathew,
As Madhivan said you can do this from a generating script. even from the backups and restore u can achive this. From the backup and restore it does create field attributes.
quote:Originally posted by cbtoolkit Got it! Did a detach, copied the files, and reattached at the new server. However, I know you can do a live backup/copy to a new server. How do I make that happen with all the field attributes (default values, primary keys, etc.)? Thanks. Matthew Moran
The IT Career Builder’s Toolkit
http://www.cbtoolkit.com

]]>