@tracefile_read_last_by_mask filemask [regexp] [ignore_regexp]
– finds last trace by filemask
and filters rows by regexp
and filters out rows by ignore_regexp
:
![](https://orasql.org/wp-content/uploads/2021/05/image-7-1024x541.png)
@ tracefile_by_mask.sql [mask] – finds and shows last 10 trace files by mask
![](https://orasql.org/wp-content/uploads/2021/05/image-3-1024x393.png)
@tracefile_current – shows a file name of the your session’s trace file
@tracefile_read_current – reads a trace file of the current session
![](https://orasql.org/wp-content/uploads/2021/05/image-4-1024x826.png)
@tracefile_last [n] – shows last N trace files (by default 10)
![](https://orasql.org/wp-content/uploads/2021/05/image-5-1024x564.png)
@tracefile_read filename – reads a specified trace file
![](https://orasql.org/wp-content/uploads/2021/05/image-6.png)
@tracefile_read_full.sql <filename>
– reads a specified trace file and shows it with additional columns: component_name, operation_name, file_name, function_name
![](https://orasql.org/wp-content/uploads/2021/05/image-8-1024x541.png)
@tracefile_spool <tracefilename> <dest_file>
– saves tracefilename
to dest_file
on local machine:
![](https://orasql.org/wp-content/uploads/2021/05/image-9.png)
Incidents, problems and incident files
@diag/problems_last.sql [N]
– shows last N problems, N is optional, by default shows last 10 problems
![](https://orasql.org/wp-content/uploads/2021/05/image-10-1024x437.png)
@diag/incidents_last.sql [N]
– shows last N incidents (by default 10)
![](https://orasql.org/wp-content/uploads/2021/05/image-11-1024x165.png)
@diag/incidents_by_problem.sql <problem_id> [N]
– shows last N incidents by problem_id
![](https://orasql.org/wp-content/uploads/2021/05/image-12-1024x135.png)
@diag/adr_home_create.sql
– creates a directory object for reading incident files:
![](https://orasql.org/wp-content/uploads/2021/05/image-13.png)
@diag/incident_files_by_mask.sql filemask
– shows incident file names by file mask
SQL> @diag/incident_files_by_mask.sql %incident%387.%
INCIDENT_ID OWNER_ID FLAGS CON_ID BFILE
----------- ---------- ---------- ------ ------------------------------------------------------------
26387 1 1 3 <ADR_HOME>/incident/incdir_26387/ORA19_ora_2942_i26387.trc#0
1 row selected.
@diag/incident_files_by_id.sql incident_id
– shows incident files by incident_id
![](https://orasql.org/wp-content/uploads/2021/05/image-14.png)
@diag/incident_files_spool_by_id.sql incident_id
– saves an incident file on local machine:
![](https://orasql.org/wp-content/uploads/2021/05/image-15.png)