The natural question to ask given that this is your first question, what is your level of training with the tool? The solution set leverages the parameterization engine which is covered extensively as a part of training for the tool, as well as the transaction timing model, which is also covered as a part of standard product training. If you have been asked to accomplish this without training in tools, process and a period of mentoring then your odds of success asymptotically approach zero.
The solution path: VB Template virtual user. You will need to validate that your license allows for the use of the template virtual user option. This is also a programmatic solution so you will need to have appropriate VB skills. The same could be accomplished with a Java Virtual User and also a C virtual user with greater difficultly. The standard database virtual user would not be appropriate here as you have SQL with presumably different number of columns in the result set, therefore you need a solution set which allows for flexibility in the receipt of results rather than the hardcoded expectation model found in a native database virtual user.
Have a parameter file with two columns: Column 1 is the short name for the transaction, Column 2 the query. Distribute your SQL queries uniquely amongst your virtual users.
Your virtual User pcode
Init
{
Establish connection to the database server
}
Action
{
Rendezvous (policy, wait for at least 3)
delay a random number of milliseconds between 250 and 500 to account for human chaotic behavior
Start Transaction (Column 1)
Run My Query (Column 2)
Logic to pass pass|fail of transaction (End Transaction - PASS|FAIL)
}
End
{
Close my database connection
}
You should be aware that users do not operate on a simultaneous basis where everyone does something at exactly the same time. There may be users running concurrent to one another, but true simultaneity in which is everyone does the same thing at the same time requires synchronization to a clock tick. Humans are chaotic instruments and are not tied to an internal clock synchronous with others.
For the CPU, disk and other metrics tied to your SQL you will want to take advantage of the SQL profiling tools available for your database platform. For ORACLE, this is an AWR report. For Microsoft SQL Server, it is the aptly named SQL Profiler tool. Sybase, DB2, MySQL, etc... all have the same tool capability, it's just a matter of digging it out of their admin toolkit.
If you simply want to monitor the server during the test, then that is straightforward. Take a look at the SiteScope integration to LoadRunner. 500 points of Sitecope has shipped with each version of LoadRunner since version 8.1. You can also query tables directly, such as the V$ tables in ORACLE or the system tables in Microsoft/Sybase SQL server, and then create DataPoints for information you wish to track.