Published on

February 18, 2016

Exploring SQL Server Data Generation with ApexSQL Generate

Are you tired of manually populating your SQL Server databases with test data? Look no further! In this article, we will introduce you to ApexSQL Generate, a powerful test data generation tool for SQL Server. We will explore its core features, discuss the different types of generators available, and walk you through a step-by-step example. We will also cover some advanced features that will make your data generation process even more efficient.

Data Generation Made Easy

ApexSQL Generate simplifies the process of populating SQL databases with synthetic test data. It assigns a generator to each column, automatically recognizing the most suitable generators based on the column name and data type. This ensures that only relevant generators are presented for each column.

Let’s take a look at some of the commonly used generators:

  • Random Generator: This is the most commonly used generator and can be applied to all SQL data types. It allows you to define minimum and maximum values for the generated data.
  • Predefined Generator: This generator contains over 150 predefined lists of values, covering various areas of interest such as personal, business, art, health, education, and more. You can easily select the desired list for each column.
  • Regular Expression Generator: This generator provides a high level of data customization. It allows you to define values based on regular expression patterns. You can also insert predefined lists, incremental values, or values from other columns in the same table.
  • Foreign Key (Manual) Generator: This generator acts like a regular foreign key constraint and references columns within the loaded database. It offers flexibility in setting the wager of data sources.

Step-by-Step Walkthrough

Let’s walk through an example to see how easy it is to populate a table with test data using ApexSQL Generate:

  1. Start by specifying the SQL server instance, username, and password in the Connection form.
  2. Select the desired database from the drop-down list.
  3. Once the connection is established, you will see the loaded database and its tables in the main grid.
  4. Expand the table you want to populate and preview the generators assigned to each column.
  5. To customize the data for a specific column, simply click on the column and adjust the generator settings on the right side of the main grid.
  6. For example, you can change the generator for the Name column to use a full name list instead of just the first name.
  7. Similarly, you can use the Random generator for the ZipCode column to ensure that a 5-digit number is inserted.
  8. If needed, you can also use the Regular Expression generator to customize the phone number format.
  9. Set the desired row count in the Table settings.
  10. Disable any triggers or check constraints in the database settings.
  11. Click on the Generate button to start the data generation process.
  12. Review the Action plan to see the list of actions that will be executed.
  13. Once the generation is complete, the Post-generation summary will provide an overview of the successfulness of the generation process.

Advanced Features

ApexSQL Generate offers some advanced features to further enhance your data generation process:

  • Dependent Objects: When populating a table with a foreign key constraint, it is important to include the dependent objects in the generation process. ApexSQL Generate allows you to easily include or exclude dependent objects to ensure successful generation.
  • Test Data Preview: The Test data preview grid shows the values that will be inserted instantly when changes are made to any table or column. This allows you to preview the data before exporting it in various formats.

With ApexSQL Generate, you can generate test data for your SQL Server databases with ease and efficiency. Say goodbye to manual data population and start exploring the endless possibilities of test data generation!

Click to rate this post!
[Total: 0 Average: 0]

Let's work together

Send us a message or book free introductory meeting with us using button below.