Brockstedt
asked on
Copy SQL 2008 R2 Table Structure to different SQL 2008 Database
Good Day,
It has been asked for us to copy the current table structure of a development database (created in MS SQL 2008 R2) to a validation database which will also be MS SQL 2008 R2. They are not wanting the current data in the validation server, just the table structure.
I am not well versed in SQL, please keep answers in plain terms as much as possible :)
Thanks,
It has been asked for us to copy the current table structure of a development database (created in MS SQL 2008 R2) to a validation database which will also be MS SQL 2008 R2. They are not wanting the current data in the validation server, just the table structure.
I am not well versed in SQL, please keep answers in plain terms as much as possible :)
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In SSMS right-click on the desired table and chose "Script Tables as / CREATE TO / File"
I am assuming that you don't have a deployment script. In this scenario, one simple way would be script out all the objects from the database and run the script on the destination server. Here's a post that can help with the scriping: http://blog.sqlauthority.c om/2011/05 /07/sql-se rver-2008- 2008-r2-cr eate-scrip t-to-copy- database-s chema-and- all-the-ob jects-data -schema-st ored-proce dure-funct ions-trigg ers-tables -views-con straints-a nd-all-oth er-databas e-objects/
You should be able to follow most of the steps. When on the Types of data to script option, – select option to script only the schema (not "Schema & Data").
You should be able to follow most of the steps. When on the Types of data to script option, – select option to script only the schema (not "Schema & Data").
ASKER
Simpler than I thought it would be. I appreciate the assistance.
Thanks,
David
Thanks,
David