View or Save Generated SQL?

The simplest way to populate your database with test data.

View or Save Generated SQL?

Postby jalbenberg » Wed Jun 04, 2008 10:40 pm

Is there any way to view or save the SQL that is generated from the execution of this program? If I am inserting 1 row into each of 250 tables, I would like to save the SQL Script with 250 insert statements.
Posts: 4
Joined: Thu Dec 15, 2005 7:11 pm

Postby benhall » Mon Jun 09, 2008 11:41 am


Thanks for your post. Currently, there is no way to view the SQL statements for the generation. However, i'll add the suggestion to the list for reviewing.


Posts: 69
Joined: Fri Dec 14, 2007 10:15 am

Postby DanAvni » Wed Dec 10, 2008 10:14 am

please add this to the wishlist and work on it soon. we thought it was possible until today we inserted data to 20 tables (it took us a few hours just tweaking all the fields to the correct values) and then the data was inserted locally instead of on a remote machine where we actually need it.
Dan Avni
Posts: 50
Joined: Wed Jun 15, 2005 11:55 am

Postby kampak1111 » Mon Dec 22, 2008 3:23 pm


It also the feature that is missing for me. Most of times I need a script that inserts generated data.

To get /save a script (as a workaround) I usually put two the same databases onto one (local) server, generate data against the first and then using the SQL Data Compare, I'm comparing these two databases. At the end of synchronisation (of SQL Data Compare) wizard there is an option to see the script and copy or save it.

This is the easiest way that I have found.
Kamil Pakur
Posts: 3
Joined: Sun Aug 10, 2008 5:49 pm

Postby jarito » Wed Sep 02, 2009 12:56 pm

You can easily do what you all are asking with several tools that are available. Once you generate the data into your test database, then use something like this: ... abase.aspx

To dump that data to SQL scripts. I agree that it should be a feature in Data Generator to skip the extra step, but it is possible to do so right now.
Posts: 2
Joined: Wed Sep 02, 2009 12:54 pm

much needed feature

Postby ptrubs » Tue Sep 22, 2009 11:23 am

I agree, this is a much needed feature and would complete the package.

I'd rather run scripts for my deployments (or when generating test data for integration tests) rather than running the app as part of the build process.

strange that redgate should chose to omit this facility?
Posts: 1
Joined: Mon Sep 21, 2009 12:56 pm

Postby David Atkinson » Tue Sep 22, 2009 12:26 pm

Under the hood SQL Data Generator doesn't generate DML INSERTs, instead it uses bulk inserting for performance reasons.

I guess we could log a feature request to generate a DML script as an alternative to applying the bulk insert directly to your database.

Kind regards,

David Atkinson
Red Gate Software
David Atkinson
Posts: 1136
Joined: Mon Dec 05, 2005 3:54 pm
Location: Twitter: @dtabase

Return to SQL Data Generator Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests