Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How should I do the load testing?
emdproduction_at_hotmail.com wrote:
> Group,
>
> We are using a new database link to a remote database. Most of the job
> will be select data from this remote database.
>
> I need to run some load testing, simulating about 80 people to select
> against this remote database at the same time, what is the best way to
> do it? Open up 80 sqlplus sessions to run an dead loop pl/sql?
>
> Any better way of doing it? Or is there any software/script to do
> this?
>
> Thanks for your help
>
Use SQL Trace to capture your application's SQL statements into a trace file. You might want to use the 10046 trace with level 4 in order to capture bind variable values as well. You can start a level 4 10046 trace with the following:
alter session set events '10046 trace name context forever, level 4';
Once you have your SQL statements captured in the dump file, you can mimic the application usage. Put all of these SQL statements in a script. Then you can run a shell script that does something similar to the following:
conn="scott/tiger"
participants=100
while [ "$participants" -gt 0 ]
do
sqlplus $conn @$scriptname &
participants=`expr $participants - 1`
done
The script above will run your SQL script for 100 participants, all in the background. That way, you can run them simultaneously. The variable "conn" contains the username/password.
HTH,
Brian
-- =================================================================== Brian Peasland dba_at_nospam.peasland.net http://www.peasland.net Remove the "nospam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three" - UnknownReceived on Wed Aug 23 2006 - 12:58:38 CDT