Friday, March 9, 2012

How to create a DUMP table in MSSQL

In mySQL it is easy to create a DUMP table which when run creates the table and inserts the data ....

In MSSQL I can create a file which I can use to re-create the table but I can not see how to also add the data with out doing a backup in MSSQL ... anyone know where this is possible?

There are a couple of choices;

1/ export the data out as text by using BCP or Integration Services.
2/ Instead of scripting data and schema just detach the database from one instance, copy it and then attach on the other end.

BCP is a sql solution, there is UI for the others under All Tasks on a right click.

No comments:

Post a Comment