Database Administration (MOSC)

MOSC Banner

in a loop we'd like to obtain SQL (10046) traces separately for each district (1 district = 1 tracef

edited Jul 12, 2013 9:15AM in Database Administration (MOSC) 2 commentsAnswered
it is 11.2.0.3 on AIX.There is one long running session performing a loop of the same commands, like

begin
for district in 1..1000000 loop
the_"same"_commands_for_each_district;
end loop;
end;

we'd like to obtain SQL (10046) traces separately for each district (1 district = 1 tracefile) to be able to compare the values for a "good" and a "bad" district afterwards.

We are trying something like this

begin
for district in 1..1000000 loop
execute immediate alter session set tracefile_identifier = ...;
execute immediate alter session set events 10046 ...;
the_"same"_commands_for_each_district;
execute immediate alter session set events 10046 ... off;
end loop;
end;

The tracefiles are created correctly with various names as required.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center