Quickest way to fill SQL Table with Dummy Data

What is the quickest way to fill a SQL table with dummy data?

I have a wide table with about 40 fields of different kinds (int, bit, varchar, etc.) and need to do some performance testing. I’m using SQL Server 2008.

  • How to Delete all data from a table which contain self referencing foreign key
  • Avoiding branching in stored procedures that return search results?
  • Progress ODBC INSERT INTO fails after upgrade from 9.1E To 10.2B
  • How to stop SQLServer writing extraneous stuff eg (1 rows affected)
  • How do you create an ITRS/Geneos alert for MSSQL DB
  • Retrieving billions of rows from remote server?
  • Thank you!

    4 Solutions collect form web for “Quickest way to fill SQL Table with Dummy Data”

    SQL Data Generator by RedGate

    Data generation in one click

    Realistic data based on column and table name

    Data can be customized if desired

    Eliminates hours of tedious work

    Full support for SQL Server 2008

    Recommend the free, GNU-licensed, random custom data generator http://www.generatedata.com/

    Late answer but can be useful to other readers of this thread.
    Beside other solutions, I can recommend importing data from a .csv file using SSMS or custom SQL import scripts, programs. There is a step-by-step tutorial on how to do this, so you might want to check it out: http://solutioncenter.apexsql.com/how-to-generate-randomized-test-data-from-a-csv-file/

    Be aware that importing a .csv file using SSMS or custom SQL import scripts, is easier than creating SQL inserts manually, but there are some limitations, as explained in the tutorial:

    If there is a need for thousands of rows to be populated, and the .csv file contains few hundred rows of data it is just not enough. The workaround is reimporting the same .csv file over and over until needed. The drawback to this method is that it will insert large blocks of rows with the same data, without randomizing them.

    The tutorial also explains how to use a 3rd party SQL data generator called ApexSQL Generate. The tool has an integrated function to generate large amounts of randomized data from the imported .csv formatted file. Application features a fully functional free trial so you can download and try it to see if it works for you.

    As “SQLMenace” mentioned, RedGate Data Generator is a so good tool to fulfill it, it costs $369, you have a 14 days trial chance Although.

    The good point is that RedGate identifies foreign keys so you can apply JOIN in your queries.

    You have a bunch of options which allow you to decide how every column is supposed to be populated, every column is anticipated semantically so that related data are suggested, for instance if you have a column named ‘Department’ it isn’t filled by weird characters, it’s filled by expressions like “Technical”, “Web”, “Customer”, etc. Even you can use regular expression to restrict selected characters.

    I populated my tables with over 10,000,000 records which was an awesome simulation.

    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.