Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Query

Author  Topic 

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2015-04-09 : 19:22:06
I wanted to generate the 1 billion records of test data.
Please suggest the best way to generate..


Thanks for your help in advance !

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2015-04-10 : 08:34:47
http://www.red-gate.com/products/sql-development/sql-data-generator/
Go to Top of Page

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2015-04-10 : 08:35:09
https://msdn.microsoft.com/en-us/library/dd193262%28v=vs.100%29.aspx
Go to Top of Page

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2015-04-10 : 08:35:51
http://sourceforge.net/projects/spawner/
Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2015-04-12 : 13:55:14
I may not able to use the mentioned to due to some restrictions to downloads..

I have used cross Apply it is taking more time to generate..

Is there is any query to generate the data faster without the data generator tools..

Go to Top of Page

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2015-04-12 : 14:23:20
The Visual Studio based approach in the msdn ref I gave you is probably the easiest for you. I'm curious though, why would you not want to use data generator tools?
Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2015-04-12 : 20:54:52
Thanks for immediate response I have visual studio professional edition..It seems the Visual Studio Premium has data generator tools.

Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2015-04-13 : 04:50:33
Insert the data in smaller chunks, otherwise the logfile will halt.


Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2015-04-16 : 20:50:01
Thanks SwePeso

How do I determine how much amount of data to insert in batches to make sure the log file should not halt..
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2015-04-17 : 02:20:56
A general rule of thumb seem to be chunks in 10,000-100,000 rows, depending on row size.



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page
   

- Advertisement -