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.

3 Answers3

5

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

gbn
  • 422,506
  • 82
  • 585
  • 676
0

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
  • 13,324
  • 5
  • 42
  • 48
  • Thank you for your comment. I prefer to have a GUI on the VM. –  Jun 04 '09 at 14:20
  • 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 Jun 04 '09 at 14:49
0

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
  • 942
  • 5
  • 11
  • Thank you for your reply. Can you please recommend a unit-testing framework for this purpose? –  Jun 04 '09 at 14:23
  • It depends on the language you'll be using, but I'll add in the answer more on that. – Billy Jun 04 '09 at 14:45