@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://habrastorage.org/getpro/habr/upload_files/f67/ca3/92f/f67ca392fa86e217cdb332c9630a751b.png)
@ tracefile_by_mask.sql [mask] – finds and shows last 10 trace files by mask
![](https://habrastorage.org/getpro/habr/upload_files/eb6/902/109/eb6902109853d2e541f4757648dc7e1f.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://habrastorage.org/getpro/habr/upload_files/608/e7f/a71/608e7fa714cfd618365126667d664b86.png)
@tracefile_last [n] – shows last N trace files (by default 10)
![](https://habrastorage.org/getpro/habr/upload_files/e0f/b91/db3/e0fb91db398923e13fdd9fb78f375215.png)
@tracefile_read filename – reads a specified trace file
![](https://habrastorage.org/getpro/habr/upload_files/ac1/bab/1ce/ac1bab1ce9afbed6d3bdafe9bbd1a7c5.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://habrastorage.org/getpro/habr/upload_files/df1/953/b7e/df1953b7eba2e5d3245abcd14872cc1a.png)
@tracefile_spool <tracefilename> <dest_file> – saves tracefilename
to dest_file
on local machine:
![](https://habrastorage.org/getpro/habr/upload_files/055/8ef/1e8/0558ef1e837d52990b48699f9fd2209d.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://habrastorage.org/getpro/habr/upload_files/0e9/f88/b2f/0e9f88b2f932b215b1a3d774fd81f6cb.png)
@diag/incidents_last.sql [N] – shows last N incidents (by default 10)
![](https://habrastorage.org/getpro/habr/upload_files/0a6/e0e/a9e/0a6e0ea9e22c26029f91806876ed9312.png)
@diag/incidents_by_problem.sql <problem_id> [N] – shows last N incidents by problem_id
![](https://habrastorage.org/getpro/habr/upload_files/8b1/f02/486/8b1f02486119d84f940f05fdc167c3cf.png)
@diag/adr_home_create.sql – creates a directory object for reading incident files:
![](https://habrastorage.org/getpro/habr/upload_files/36d/5db/dd0/36d5dbdd0bbc58db6717a892338d9145.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://habrastorage.org/getpro/habr/upload_files/ef5/a99/775/ef5a997757d5221c71e2a1fdd90ca891.png)
@diag/incident_files_spool_by_id.sql incident_id – saves an incident file on local machine:
![](https://habrastorage.org/getpro/habr/upload_files/dfa/200/a7a/dfa200a7a513c42f548270ea5ca1acff.png)