views:

132

answers:

3

How can I simulate very heavy database usage on Microsoft SQL Server 2005?

For test purposes I need to push the sql server to the max.

The server is on a virtual machine and I don't care about network load, just CRUD operations, mainly inserts because I want to demonstrate how the database grows very quickly.

A: 

If you aren't worried about the network side or the application part in your test then capture a repeatable of your applications pattern of whatever it is you are testing using SQL Profiler. You may need to add a table set for counters; or unique id's to reference depending on what it is you are doing.

Open up a few management studio windows and run them simultaneously; if necessary with a loop around each one. You can have many connections from a single machine.

If you do need the application side is it web or gui ?

u07ch
Thank you for your comment.I prefer to have a GUI on the VM.
Velislav Marinov
My comment was only if you needed to test the application itself; if you do and its a thick client you need differant tools than if it is a thin client web type application.
u07ch
+3  A: 

There are 2 free utilities from Microsoft called SQLIOSim (was SQLIOSTress) to spank the IO system and OSTRESS to replay trace files.

gbn
Thank you for this.
Velislav Marinov
If you're happy with this, please can you accept the answer... the big tick to the left?
gbn
A: 

You could write some units tests, say one test that does 1000000 inserts, one that performs some selects ( simple or complex - group by, joins, etc ), one that does some deletes and run these tests either in order, or in parallel, or even multiple instances of one of the tests or whatever.

Regarding the testing frameworks, you can start quickly with something like JUnit if you're doing java ( or the equivalent for other languages - PhpUnit, Nunit, PyUnit, etc. )

Take a look at Testing Framework and List of unit testing frameworks for detailed lists.

Billy
Thank you for your reply.Can you please recommend a unit-testing framework for this purpose?
Velislav Marinov
It depends on the language you'll be using, but I'll add in the answer more on that.
Billy