How to check the fault logs when Oracle server crashes?
To view the Oracle database crash fault logs, you can follow these steps:
- Connect to the server that is linked to the Oracle database and log in as a user with administrator rights.
- Open Oracle database management tools such as SQL*Plus or SQL Developer.
- Use the following command to view the database crash logs:
- Retrieve all information from the V$DIAG_INFO table where the NAME is similar to ‘ADR Home’.
- This command will return the diagnostic directory path of the database, typically a path similar to /u01/app/oracle/diag/rdbms/
/ /trace. - Navigate to the diagnostics directory path on the server.
- Locate the trace files containing crash events, typically with extensions .trc or .log.
- You can use the following command to view the latest tracking files:
- Retrieves all information from V$DIAG_INFO where the name includes the word “incident”.
- This command will return the path to the database’s fault diagnosis file, which typically looks like /u01/app/oracle/diag/rdbms/
/ /incident. - After entering the fault diagnosis file path, you can use the command ls -lt to find the latest fault diagnosis file sorted by time.
- Open the trace file in a text editor to view error messages and related events. You can use the command vi
to open a trace file.
The method described above is a common way to view Oracle database crash log, but the specific steps may vary depending on the Oracle version and operating system environment. In actual practice, you can make adjustments according to your own environment and requirements.