Alert log alertSID.log

Posted on 2006-03-27
Medium Priority
Last Modified: 2008-01-16
I see my alert log on 10g to be one big huge file. HOw do i enable rotation on it? so that it is archived?
Question by:shasta123

Author Comment

ID: 16301957
Also does the alert log tracks the DML as well as DDL on all the database objects by giving the timestamp?

Assisted Solution

konektor earned 150 total points
ID: 16301980
i don know any possibility to reuse alertlog not to grow in oracle, but you can do it in operating system. make a script, which will check file size, and when it will be bigger rename it to some "bak". Oracle will create init.ora again ...
LVL 29

Expert Comment

ID: 16302161

On Unix renaming the file may not work, you would need to copy (ifyou want to preserve old log) and truncate the log:

cp alertSID.log alert_SID.bak
LVL 35

Expert Comment

ID: 16302963
The rename works fine in UNIX.  There is no need to truncate the file.  The instance does not keep the file open.
LVL 35

Accepted Solution

Mark Geerlings earned 600 total points
ID: 16303614
You can use a simple file rename command in an O/S script to rename the alert.log file in most O/S's  (Unix, Linux and Windows, at least) since Oracle does not keep the alert.log file locked, and if it doesn't see one when it tries to write the next entry, it will create a new one.  This script can be scheduled to run automatically in the O/S job scheduler at midnight for example, to rename the file each night.

No, the alert.log file does not contain audits of either DML or most DDL statements.  A few DDL statements are logged in the alert.log file, but usually only those that affect "major" parts of the database, like: datafiles, tablespaces, log files, etc.

If you want to audit DML and/or DDL activity, you will either have to turn on Oracle's auditing mechanism (but if you do, be preparared for a *LARGE* volume of data that you will have to manage!) or write triggers to capture this activity to logging table(s) or ASCII log files.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question