How to check the location of Oracle database logs?
The log files in Oracle databases consist of two types: archive logs and online logs. Archive logs are stored in the archive log directory, usually in the log\archive directory under ORACLE_HOME. Online logs are stored in the directory where the database’s data files are located, typically the DATAFILE directory. You can view the storage locations of archive logs and online logs by querying the database parameters. Here are the specific steps:
- Log in to the Oracle database.
- Execute the following SQL query to check the location of the archived log in the database:
SELECT name, value
FROM v$parameter
WHERE name = 'log_archive_dest_1';
This statement will display the location of the archived logs.
- Execute the following SQL statement to query the database parameters and view the location of the online log:
SELECT member
FROM v$logfile;
This statement will display the location of all online logs.
By following the steps above, you can easily view the storage location of archived logs and online logs in the Oracle database.