tanelpoder / tpt-oracle

Tanel Poder's Performance & Troubleshooting Tools for Oracle Databases
https://tanelpoder.com
Other
648 stars 307 forks source link

Init: get_trace.sql, get_trace2.sql - get trace files from remote server and open them in local editor #11

Closed tomasz-sroka closed 4 years ago

tomasz-sroka commented 4 years ago

Description: get trace file content base on gv$diag_trace_file_contents, save it locally and open the file in local editor Remarks: My local SQLPATH consist 2 directories, hence doesn't work for me. For the time being I'm using $TEMPDIR (MacOs) %TEMP% (Windows) Demo: SQL> alter session set tracefile_identifier="my_trace"; --do some tracing SQL> @get_trace my_trace TRACE_FILENAME CHANGE_TIME MODIFY_TIME ADR_HOME CON_ID


ORCLCDB_ora_25110_my_trace.trc 28-10-2019 18:41:40 28-10-2019 18:41:40 /opt/oracle/diag/rdbms/orclcdb/ORCLCDB 3 Trace file name: ORCLCDB_ora_25110_my_trace.trc --trace file saved locally and opened in editor

tomasz-sroka commented 4 years ago

sqlbinds.sql, sqlbindsummary.sql added to help.sql