[dba-SQLServer] Scripting data transfers

Asger Blond ab-mi at post3.tele.dk
Sat Sep 3 11:04:09 CDT 2011


You can do this using the Generate Scrip tool in SSMS.
This tool has changed slightly for version 2008 R2, which I suppose you use:
In Management Studio right click the database name -> Tasks -> Generate Scripts... Follow the wizard and use the button Advanced (on the 3. step of the wizard) to set "Types of data to script" to "Schema and data".
You can send the result to a file, to the clipboard, or to a new query window.

Asger

-----Oprindelig meddelelse-----
Fra: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] På vegne af jwcolby
Sendt: 3. september 2011 17:19
Til: Sqlserver-Dba
Emne: [dba-SQLServer] Scripting data transfers

I am building scripts (stored procedures) to create tables from a template database into another 
database.

I have data in these table that I need to script to be inserted into the resulting tables created in 
the first .  Is there generic syntax to do that or do I need to build a hard coded insert sql 
statement for each one?

-- 
John W. Colby
www.ColbyConsulting.com
_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com






More information about the dba-SQLServer mailing list