Trace on specific sql_id

SQL> — SQL Trace (10046)
SQL> ALTER SYSTEM SET EVENTS ‘sql_trace [sql:&&sql_id] bind=true, wait=true’;

SQL> — 10053
SQL> ALTER SESSION SET EVENTS ‘trace[rdbms.SQL_Optimizer.*][sql:sql_id]’;

SOURCE:

https://oracle-base.com/articles/misc/sql-trace-10046-trcsess-and-tkprof

https://blogs.oracle.com/optimizer/entry/how_do_i_capture_a

Cloud Control – target/agent cleanup

Se você não conseguir remover um target/agent via console, vá direto no repositório (logue via sysman) e execute:

SQL> select target_name,target_type from mgmt_targets where target_name like ‘FLUIGDB%’;

TARGET_NAME
——————————————————————————–
TARGET_TYPE
—————————————————————-
FLUIGDB-02.cp.totvs.com.br/server
oracle_si_server_map

FLUIGDB-02.cp.totvs.com.br
host

FLUIGDB-02.cp.totvs.com.br:3872
oracle_emd
SQL> exec mgmt_admin.delete_target(‘FLUIGDB-02.cp.totvs.com.br/server’,’oracle_si_server_map’);

PL/SQL procedure successfully completed.

SQL> exec mgmt_admin.delete_target(‘FLUIGDB-02.cp.totvs.com.br’,’host’);

PL/SQL procedure successfully completed.

 

agent cleanup:

SQL> exec mgmt_admin.cleanup_agent(‘FLUIGDB-02.cp.totvs.com.br:3872’);

PL/SQL procedure successfully completed.

SQL>