Basics of Batch Jobs, Audit Logs, and Maintenance Logs in Oracle 12c - dummies

Basics of Batch Jobs, Audit Logs, and Maintenance Logs in Oracle 12c

By Chris Ruel, Michael Wessler

Almost all companies there is some sort of nightly batch jobs that run against the database, including Oracle 12c databases. They range from loading data to generating reports to some sort of data processing. They might be scheduled by you or someone else.

Either way, you’ll find it common that the database administrator (DBA) is the one responsible for monitoring them and ensuring their success. If you think about it, they’re on your turf because you’re in charge of the database.

Whether you or someone else developed the scripts, the scripts, like RMAN, should have some sort of logging and notification system in place. Such a system makes it easier for you to identify a problem when it occurs. By having status e-mails generated and sent out, you’re all but forced to keep up with the results.

If your e-mail program allows filtering, you can send the notifications to separate folders for each batch job. Just remember to check them. Again, we’re trying to help you cover all the bases that an Oracle DBA might commonly have on his or her plate.

How to reviewing Oracle 12c audit logs

What’s the use of auditing in the database if you aren’t doing anything with the information? You should develop some ideas on what types of information you’re looking for. Additionally, regularly back up and purge the audit logs (whether they’re in the database or the OS). This way, they aren’t taking up space and they are easier to search when looking for potential problems.

Many companies are required to comply with various auditing and compliance laws, policies, and guidelines. These requirements specify what activities are logged, how often the logs are reviewed and by whom, and how long the logs are retained. Be sure you’re aware of the requirements for your company and can prove to an auditor that you’re in compliance.

Basics of Oracle 12c log maintenance

Oracle generates all kinds of logs for various components. Depending on what features you enabled in the database, there may be more or fewer. Some logs (alert and listener, for example) should be regularly:

  • Checked to identify errors

  • Renamed with a timestamp added

  • Trimmed down in size so they do not grow excessively large

  • Backed up so they can be reviewed later if necessary

If certain logs grow too large, they can cause problems in the database where either the database suspends or activity is not logged.

Oracle database logs contain valuable information that frequently helps identify problems. When a problem is encountered, one of the first things a DBA does is review the appropriate database logs for errors and background information.

In addition to Oracle’s logs, don’t hesitate to look at items such as Windows Event view or the message logs on Linux/UNIX systems. They also contain valuable information for the operating system and server hardware which support the Oracle database.