Friday, February 24, 2012

generate db scrip including data in tables

i'm not able to generate a sql script with the data in the tables! using sql express.

i need this script to ganerate the same database with its datas in a new sql server.

thanks in advance

SQL Server only generates scripts for schema and not for data. There are 3rd party tools that can do that. You can either build a DTS package or use DTS Import Export wizard to transfer data across servers. If the tables are huge (tens of millions of rows or higher) the DTS/Import could be slower.

|||

Can u just take a backup of the database on the source server and restore it on the destination server. This is of course possible if you need the entire database. Unfortunately, you can't create a script or something for data in the database like the script for the definitions of the objects (tables, stored procedures, views etc.). DTS packages are another solution as suggested by ndinakar.

No comments:

Post a Comment