Alert log alertSID.log

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?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

shasta123Author Commented:
Also does the alert log tracks the DML as well as DDL on all the database objects by giving the timestamp?
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 ...

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
johnsoneSenior Oracle DBACommented:
The rename works fine in UNIX.  There is no need to truncate the file.  The instance does not keep the file open.
Mark GeerlingsDatabase AdministratorCommented:
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.