Like most folks, I seem to have a perpetual need for realistic test data. While there are many databases available, sometimes the need is quite simple. All I need is some names, perhaps dates and phone numbers that can be used for testing my applications, SSIS or SQL Server Reports. I decided to take care of this need once and for all, and set out with a simple goal. At the conclusion of my work I wanted to wind up with a realistic looking, but totally fake set of data. I wanted to do it in the simplest means possible, using whatever tools I had available. Finally, I wanted to do it as quickly as possible.
Along the way I documented my efforts, as well as created a sample table with 100,000 rows. When I started I thought to publish everything in a blog post, but it turned out to be far too much for a single blog post. Thus I decided to document everything in a white paper, and upload all the code to a MSDN Code Gallery site. Note that while I used the 2008 versions of SQL Server and Visual Studio, the SQL Scripts should run just fine with SQL Server 2005.
You can find everything at http://code.msdn.microsoft.com/SqlServerSampleData . Look in the downloads section for the complete PDF with all the details, as well as all of the sample data. Using the techniques outlined in the white paper you too could easily be generating your own test data for a wide variety of projects.


April 26, 2009 at 11:52 am
I strongly recommend that you turn the No Follow off in your comment section.
I’ll watch Google Webmaster Tools, and if the links don’t show up after a couple of weeks — I won’t go back to that blog again.
Another suggestion: you should have a Top Commentator widget installed.
Do Follow and Top Commentator will ensure that you have a successful blog with lots of readers!
June 15, 2009 at 1:01 pm
[...] for short. You can find my original posting, which has links to the code gallery site at http://arcanecode.com/2009/04/02/sql-server-sample-data-the-sql-name-game/ [...]
December 26, 2009 at 3:16 pm
bonjour, merci pour cette info , moi j’adore les jeux gratuit .
March 17, 2010 at 3:50 am
Hi! I want to say thanks for an interesting site about a subject I have had an interest in for a long time now. I have been lurking and reading the posts avidly so just wanted to express my thanks for providing me with some very good reading material. I look forward to more, and taking a more active part in the discussions here.
August 21, 2010 at 1:11 am
[...] In my presentation I also used some data from a previous post to generate data. That post has detailed information on how to generate sample data, and can be found here: http://arcanecode.com/2009/04/02/sql-server-sample-data-the-sql-name-game/ [...]
December 3, 2010 at 5:37 am
Sir,
Iam Dot Net developer in Vsoft, is any dll which converts oracle queries to MS Sql queries
May 13, 2011 at 7:55 am
[...] SQL Name Game – My example on how to generate Sample Data – http://arcanecode.com/2009/04/02/sql-server-sample-data-the-sql-name-game/ [...]