===================
activer la trace
===================
The program does not raise any exceptions, nor does it assert a purity level with the RESTRICT_REFERENCES pragma.
Example
Set SQL tracing on in a session identified by sid = 15 and serial number = 4567 like this:
BEGIN
S (15,4567,TRUE);
END;
The sid, serial number, and username for all sessions currently connected to the database can be obtained using the following query:
SELECT sid, serial#, username
FROM v$session;
Trace files generated when SQL tracing is turned on are created in the directory specified by the USER_DUMP_DEST
initialization parameter for the Oracle database to which the session is connected.
SQL trace files can be formatted for readability using the TKPROF utility.
-------------------
GRANT EXECUTE ON DBMS_SYSTEM TO SYSTEM;
time_statistic =true
select * from v$session;
BEGIN
SYS.DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION(9,22,true);
END;
effectue les commandes sql/prgrm
BEGIN
SYS.DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION(9,22,FALSE);
END;
tkprof <source> <log>
---------------
issu d 1 tar
Hello
Please can you perform the following:
1. select count(*) from so0@BM -->OK
select sysadm.count(*) from so0@BM ;
2. alter session set max_dump_file_size=unlimited;
alter session set events '10046 trace name context forever, level 12';
update SYSADM.so0@BM set num4=
(select codeitac from ITAC.itac_pm@ITAC where code_client = '100');
exit;
This will produce a dump file in the USER_DUMP_DEST, please send this in.
Thanks
Richard
##------------------------------------------------------
Par PACKAGE
##------------------------------------------------------
ou
Francisco,
you can use dbms_support package or you can run:
SQL>exec sys.dbms_system.set_ev( sid, serial#, 10046, 8, '' );
where sid and serial# are obtained from v$session. To stop tracing replase 8 with 0 (this is the level for tracing).
---The SET_EV procedure is used to set trace event levels in another user session.
It is equivalent to having that session issue the ALTER SESSION SET EVENTS
event syntax command. Since the other session may be engaged in an application,
setting an event may not be possible. Here’s the header for this program:
PROCEDURE DBMS_SYSTEM.SET_EV
(si BINARY_INTEGER
,se BINARY_INTEGER
,ev BINARY_INTEGER
,le BINARY_INTEGER
,nm IN VARCHAR2);
Parameters:
si User session id
se User session serial number
ev Trace event number
le Trace event level
nm Trace event name
Exceptions
The program does not raise any exceptions.
Restrictions
w The SET_EV procedure should not be invoked by end users or called by PL/SQL programs. Its usage is limited to Oracle internal purposes or under instruction of Oracle Technical Support. Improper use of the procedure by end users can have adverse effects on database performance or cause database crashes.
w The program does not assert a purity level with the RESTRICT_REFERENCES pragma.
========================
dbms_monitor
========================
PROCEDURE SESSION_TRACE_ENABLE
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
SESSION_ID BINARY_INTEGER IN DEFAULT
SERIAL_NUM BINARY_INTEGER IN DEFAULT
WAITS BOOLEAN IN DEFAULT
BINDS BOOLEAN IN DEFAULT
SQL> exec dbms_monitor.SESSION_TRACE_ENABLE(2216,39,true,true);
tkprof bal2wdp0_ora_1036496.trc trace01.tkp sys=n waits=y explain=balifr/balifradm sort=exeela
trace a service amdbs
exec dbms_monitor.SERV_MOD_ACT_TRACE_ENABLE('rdxsupsvc');
Aucun commentaire:
Enregistrer un commentaire