The Alert Log File - Oracle DBA

The alert log file is a grab bag of messages about the state of the database instance. It contains entries about significant database events, such as database startup and shutdown, nondefault initialization parameters, ALTER SYSTEM commands, and various errors.

Alert Log File A text file that contains entries about significant database events, such as database startup and shutdown, nondefault initialization parameters, and various errors. The alert log file is stored in the directory specified by the system parameter BACKGROUND_DUMP_DEST.

Locating the Alert Log File

At Scott's widget company, Janice, the DBA, doesn't remember when she made the changes to the redo log files. She wanted to increase the redundancy of the redo log files, so she added a second set of redo logs on a different disk. She can find information about the redo logs in the alert log file.

Janice's first step is to locate the alert log file itself; since she recently converted one of the Oracle databases from a Windows server to a Linux server, she hasn't yet memorized the locations of the Oracle-related directories, so she needs to check one of the initialization parameters. This log file is a text file in the directory specified by the initialization parameter BACKGROUND_DUMP_DEST:

show parameter background_dump_destLocating the Alert Log File

From a Linux operating system command-line session, Janice locates the alert log file:

The alert log file's name on Linux is alert_, followed by the instance's connection identifier and an extension of .log.

Viewing the Alert Log File

Now that Janice knows where to find the alert log file, she opens it using the Linux vi text editor.

Viewing the Alert Log File

It appears that the new redo logs were created on June 22, 2004, at about 10:23 PM You can also see that the control file was automatically backed up by EM Database Control when the new redo log files were created.

Maintaining the Alert Log File

The alert log file grows in size slowly but without limit. After a few weeks, it can become cumbersome to review the file, so it's a good idea to archive or delete the file on a periodic basis.

The alert log file can be safely renamed or deleted, even when the database is up and running. The next time an entry needs to be written to the alert log file and the alert log file is not there, a new one is created.

Janice, the DBA, reviews the alert log file every Friday and renames it with a name containing the date it was renamed:

Notice in the example that as soon as a system event occurred, in this case a forced log switch, the new alert log file was created automatically.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Oracle DBA Topics