View or Save Generated SQL?

The simplest way to populate your database with test data.

Moderators: David Atkinson, Anu Deshpande, Lionel

View or Save Generated SQL?

Postby jalbenberg » Wed Jun 04, 2008 11: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.
jalbenberg
 
Posts: 4
Joined: Thu Dec 15, 2005 8:11 pm

Postby benhall » Mon Jun 09, 2008 12:41 pm

Hello,

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.

Regards

Ben
benhall
 
Posts: 69
Joined: Fri Dec 14, 2007 11:15 am

Postby DanAvni » Wed Dec 10, 2008 11: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
DanAvni
 
Posts: 48
Joined: Wed Jun 15, 2005 12:55 pm

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

Hi,

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
kampak1111
 
Posts: 3
Joined: Sun Aug 10, 2008 6:49 pm

Postby jarito » Wed Sep 02, 2009 1: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:

http://www.codeproject.com/KB/database/ ... 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.
jarito
 
Posts: 2
Joined: Wed Sep 02, 2009 1:54 pm

much needed feature

Postby ptrubs » Tue Sep 22, 2009 12:23 pm

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?
ptrubs
 
Posts: 1
Joined: Mon Sep 21, 2009 1:56 pm

Postby David Atkinson » Tue Sep 22, 2009 1: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: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase


Return to SQL Data Generator 1

Who is online

Users browsing this forum: No registered users and 0 guests