This topic describes how to set up Data Generator to generate test data.
It is recommended to back up the database that you are going to populate before you generate the data. You can adjust the settings and repeat the data generation if you are not satisfied with the results. To generate data, first select a MySQL server instance and a database you want to populate.
1. In Database Explorer, right-click the database and select Tasks > New Data Generation.
2. Specify the connection and select a required database.
3. Click Next. The Options page will appear.
4. On the Options page, set required options.
5. Click Open. The following page displays data generation result.
You can specify the tables that you want to populate by selecting the check box that is located next to the table name. Further, you can define how you want the data to be generated: click the table name in the tree view and specify the details in the settings pane. All the changes are displayed in real-time.
Note
There may be errors during data generation. For example, a column may be a foreign key of a table, that is not included into generation.
To resolve such issues, navigate to the Related Tables section of the Table generation settings, and include/exclude parent and child tables from data generation.
6. On the Data Generator toolbar, click Populate data to the target database.
The Output of Data Population Wizard window will open, where you can:
Select a required option and click Next.
7. On the Options tab, configure the data population options. Click Next.
8. On the Additional Scripts tab, you can configure the Data Generator tool to execute a specified script before and/or after data population. You may need this option in a number of cases, for example, to drop the old data or disable triggers before data generation and then enable them again.
9. The Summary tab allows you to see the generation action plan and the details of generation errors and warning.
When you are setting up the tables and columns that you want to populate, SQL Data Generator displays warning and error messages to inform you when there may be a problem with the data generation.
10. Click Generate to finish the process.