The simplest way to populate your database with test data.
Moderators: David Atkinson, Anu Deshpande, Lionel
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 8:11 pm
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 11:15 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.
- Posts: 48
- Joined: Wed Jun 15, 2005 12:55 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.
- Posts: 3
- Joined: Sun Aug 10, 2008 6:49 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.
- Posts: 2
- Joined: Wed Sep 02, 2009 1:54 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?
- Posts: 1
- Joined: Mon Sep 21, 2009 1:56 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.
Red Gate Software
- 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