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 2005 Forums
 Express Edition and Compact Edition (2005)
 how to quickly fill a database

Author  Topic 

rasher83
Starting Member

24 Posts

Posted - 2008-04-23 : 14:45:58
I have a database with a couple of tables i need to expand to 4 gigabytes in order to run some tests. (currently 300 megs)
Does anyone have a script or some method that would quickly populate my tables with random data so that i can grow my database to the desired size for testing.

Thanks

I have SQL server 2005 express. I have the management studio installed too.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-04-23 : 14:48:32
CROSS JOIN some tables together to produce a large result set. Insert that into your tables.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

rasher83
Starting Member

24 Posts

Posted - 2008-04-23 : 14:53:17
could you provide an example of how to do this, this post is ultimately what i want to achieve, my other post regarding triggers was one way i had thought of adding extra data to my database, but i think i will abandon that idea as i would have to apply it to too many tables.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-04-23 : 14:59:01
INSERT INTO YourTable (...)
SELECT ...
FROM SomeBigTable
CROSS JOIN SomeOtherBigTable

Play with it a bit.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

rasher83
Starting Member

24 Posts

Posted - 2008-04-23 : 15:53:39
thanks for that, i have added the data in no time.
Go to Top of Page
   

- Advertisement -