Что такое формат файла TRC?
A .trc file is a trace or debug file created by Oracle Database software. The trace file contains a detailed record of database events executed by the server - including SQL parse, execute, and fetch operations, wait events, bind variable values, and error stacks - and can be used to analyze or debug performance problems and errors that occurred during database transactions.
Oracle produces .trc files automatically through background processes, or when SQL tracing is enabled via ALTER SESSION SET SQL_TRACE = TRUE, the DBMS_MONITOR package, or diagnostic event 10046. Since Oracle Database 11g, trace files reside under the Automatic Diagnostic Repository (ADR) trace/ directory and each .trc is typically paired with a companion .trm trace-map file used by ADR tooling for indexing.
Raw SQL traces are usually processed with the tkprof or trcsess command-line utilities to produce a human-readable performance report. However, as the .trc file is stored in plain-text format, it can also be opened with most text editors. Files range from a few kilobytes to hundreds of megabytes depending on workload intensity and tracing duration.
.trc files may contain sensitive data including SQL statements, bind variable values, and session details, so they should be treated as confidential.
Безопасность и защита
РИСК: LOWA .trc is passive text and cannot execute, so it is safe to open. The real concern is CONFIDENTIALITY, not malware: SQL traces can contain the literal SQL statements and bind-variable values that passed through the database - potentially personal or secret data - so redact before sharing externally. Operationally, .trc/.trm files accumulate in the ADR trace directory and can fill the disk; purge them with ADRCI or the database's automatic retention policy rather than deleting at random while the instance is running.
Детали формата
в двух словах- PTC Creo / Pro/ENGINEER trail (trace) file - A .trc trail file recording a user's UI actions in Pro/E for replay/debugging - unrelated to Oracle.
- Generic application trace/debug log - Many programs (network sniffers, middleware, custom apps) write a plain-text .trc debug log; open with a text editor.
Программы, открывающие файлы TRC
Технические подробности
глубокая спецификация| Format type | Plain-text diagnostic log (ASCII / UTF-8); database character-set dependent in rare cases |
| MIME type | text/plain (application/octet-stream for binary dump regions in specialized traces) |
| File signature | No fixed magic bytes; file begins with a descriptive plain-text header containing the trace file path, Oracle version, instance name, and OS process ID |
| Produced by | Oracle Database server and background processes (PMON, SMON, DBWn, LGWR, etc.) or explicit user-session SQL tracing |
| SQL tracing activation | ALTER SESSION SET SQL_TRACE = TRUE; DBMS_MONITOR.SESSION_TRACE_ENABLE; diagnostic event 10046 at levels 1, 4, 8, or 12 |
| Trace content | SQL parse / execute / fetch timings, wait events, bind variable dumps, recursive SQL, ORA- error stacks, and cursor statistics |
| Companion file | Each .trc is paired with a .trm trace-map file (ADR index / metadata) since Oracle Database 11g |
| ADR storage path | $ORACLE_BASE/diag/rdbms/<db_name>/<instance>/trace/ - governed by the Automatic Diagnostic Repository introduced in Oracle 11g |
| Processing utilities | tkprof formats a raw 10046 trace into a ranked SQL report; trcsess merges traces from multiple sessions into one file |
| SQL*Net / Net variant | Oracle Net (formerly SQL*Net / Net8) also writes .trc files for client- or server-side network-layer diagnostics; trace level set via TRACE_LEVEL_CLIENT / TRACE_LEVEL_SERVER in sqlnet.ora |
| Typical file size | A few KB for short sessions to hundreds of MB for busy sessions traced at event 10046 level 12 (bind values + waits) |
| Compression | Uncompressed; the file is plain text with no internal compression applied |
| Confidentiality | May expose SQL statements, bind variable values, schema object names, and internal Oracle diagnostics - should be treated as sensitive |
| Associated operating systems | Linux, Windows Server, Solaris, AIX, HP-UX - any platform that hosts Oracle Database |
| Related file types | .trm (ADR trace map), [.log](/format/log) (Oracle alert log), [.dmp](/format/dmp) (Oracle dump), .ora (Oracle init/network config) |
| Выпущен | 1980s-1990s (Oracle RDBMS diagnostics; SQL*Net/Net8 tracing) |
| Последняя версия | N/A (evolves with each Oracle Database release; ADR-based since 11g, 2007) |
| Спецификация | docs.oracle.com |
Конвертации TRC
Вопросы и ответы сообщества
спрошено пользователямиВопросов пока нет - станьте первым, кто спросит о файлах TRC.