April 26, 2006 at 9:01 am
Is there any tool that generates Insert Scripts for the data that is already existing in the tables of a database. This I need for creating different test databases on different server with the same set of data, without using the restore option of the total database.
Any help would be highly appreciated.
Prasad Bhogadi
www.inforaise.com
April 26, 2006 at 9:40 am
Prasad
Have you tried using DTS? Then you wouldn't need to create any scripts at all. You can transfer all the data in a table to a text file first if you prefer, or copy it straight to the destination database.
John
April 26, 2006 at 11:48 pm
Thanks John for the quick reply, however my requirement is a little different, this I need for boot strapping databases at various locations and I will not have the source db available, so it basically needs to be driven through scripts.
Prasad Bhogadi
www.inforaise.com
April 27, 2006 at 12:20 am
Hello together,
I've got the same problem! Need to export the whole DB into
create table and insert statements.
Ottmar
April 27, 2006 at 1:40 am
If I have understood your requirements correctly, you should still be able to script out the database creation (tables, SPs, constraints, views and so on) into one text file and then DTS or BCP each table into its own text file for importing when you have created the new database from the script. Be careful about the order of import if you have foreign key constraints - parent tables before child tables. I believe that there are utilities that will automate all this for you, but I've never used any of them.
John
April 27, 2006 at 1:50 am
Hi John,
DTS and SSIS are really great parts of the SQL Server, but for quick use, just exporting data into an sql-script, including foreign keys and existing data in at a logical sort order.
The great thing is to use a block of sql-files and manage them by using a self made program. Just a CVS for databases!
Ottmar
April 27, 2006 at 3:24 pm
Check out http://www.codeproject.com/database/InsertGeneratorPack.asp
I used it last week and it worked a treat.
April 27, 2006 at 11:29 pm
You can try using this script at http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=1447
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply