Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How should I do the load testing?
Brian Peasland wrote:
> emdproduction_at_hotmail.com wrote:
> > Brian Peasland wrote:
> >> 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,
> >
> > Thanks for your help.
> >
> > I just did what you suggested. But it is not simutaneously, it is
> > sequencial. It will connect, disconnect, and then 2nd connect,
> > disconnect.
> >
> > Joe
> >
>
>
>
>
> >
>
>
> >
Works like a charm, thanks very much.
Joe Received on Fri Aug 25 2006 - 09:02:01 CDT