- Open Microsoft SQL Server Management Studio
- Exapand Databases--> Select and right click on the Database you want to copy
- Choose Tasks --> Generate Scripts
- Select tables or stored procedure and click -->Next
- On the 'Choose Script Options' screen-->
- Click Advance-->
- There is an option called -->Types of data to script:
- By default Schema only is selected. In order to generate the insert command for the data select-->Schema and Data
(Note: for SQL Server Management Studio 2008 R2, the option is called "Types of data to script" and is the last one in the General section. The choices are "data only", "schema and data", and "schema only")
In 2008 R2 Database you have to select different option to do the same operation:
* Right clicking on the DB* Click on tasks* Click on generate scripts* Go through the wizard and select your tables* On the options page click the Advanced button* Change the "Types of data to script" option:
No comments:
Post a Comment