To start tracing:
create or replace trigger user_logon_trg
after logon on database
begin
if USER = ‘xxxx’ then
execute immediate
‘Alter session set events ”10046 trace name context forever, level 8”’;
end if;
end;
/
/* Login a new session as User ‘xxxx’ and execute your selects to be traced */
NOTE: The following syntax can also be used within the if logic to also get the user name or to add more granularity by specifying a host name where the connection originated.
IF SYS_CONTEXT(‘USERENV’,’SESSION_USER’) = ‘<USER_NM>’ AND SYS_CONTEXT(‘USERENV’,’HOST’) = ‘<HOST_NM>’ THEN
To stop tracing: via LogOff Trigger (needs to be created before logging off)
create or replace trigger user_logoff_trg
before logoff on database
begin
if USER = ‘xxxx’ then
execute immediate
‘Alter session set events ”10046 trace name context off”’;
end if;
end;
/
create or replace trigger user_logon_trg
after logon on database
begin
if USER = ‘xxxx’ then
execute immediate
‘Alter session set events ”10046 trace name context forever, level 8”’;
end if;
end;
/
/* Login a new session as User ‘xxxx’ and execute your selects to be traced */
NOTE: The following syntax can also be used within the if logic to also get the user name or to add more granularity by specifying a host name where the connection originated.
IF SYS_CONTEXT(‘USERENV’,’SESSION_USER’) = ‘<USER_NM>’ AND SYS_CONTEXT(‘USERENV’,’HOST’) = ‘<HOST_NM>’ THEN
To stop tracing: via LogOff Trigger (needs to be created before logging off)
create or replace trigger user_logoff_trg
before logoff on database
begin
if USER = ‘xxxx’ then
execute immediate
‘Alter session set events ”10046 trace name context off”’;
end if;
end;
/
Hi , the logoff trigger is not needed because the tracing will stop when the user logs off , best regards
Bermuda yurtdışı kargo
Bonaire yurtdışı kargo
Bolivya yurtdışı kargo
Birleşik Arap Emirlikleri yurtdışı kargo
Bhutanya yurtdışı kargo
FPOD
This was beautiful Admin. Thank you for your reflections.
Such a valuable resource.
You’ve got a new fan here!
This article is a gem.
I can’t wait to share this with others.
yay google is my world beater helped me to find this outstanding site! .
Checking out sumvipbet – VIP programs always sound good, but are they actually worth it? Loyalty rewards are what its about. Let me know if you are enjoying! sumvipbet
FB777comanglogin’s decent. Gets you right into the game, which I appreciate. Login’s smooth, and that’s what counts. Get logged in quick: fb777comanglogin