Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: August 09, 2016 - 5:38 pm UTC

Last updated: August 15, 2016 - 1:24 am UTC

Version: 11.2.0.4

Viewed 10K+ times! This question is

You Asked

hi - we have a 11.2.0.4 database in production that we saw was generating too many logs even when the database is dormant. We initially thought it was due to rman backups but now we are seeing that if we issue one log switch it is causing too many logs to be switched and multiple logs are getting archived. Not sure why this is happening. Do you have any thoughts ?

and Connor said...

IF you dont issue any log switch commands, does it still happen ?

Some things to look at:

- is archive_lag_target set ?
- are the log files too small ?
- anything in the alert log suggesting an errant process or script is switching them >

If you get no joy with that, then you'll need to chat to Support. I didnt see anything related to this internally.

Rating

  (4 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

A reader, August 10, 2016 - 11:02 am UTC

archive_lag_target is set to 0
the log sizes are 500 mb
the alert logs only indicate the lgwr switch. nothing else. if we dont switch logs we dont see this happen
Connor McDonald
August 11, 2016 - 1:16 am UTC

So why are you switching logs ? Also

- how many log groups ?
- do you have dataguard ?

Graham, August 12, 2016 - 1:26 pm UTC

Could there be multiple log_archive_dest parameters/locations defined? That would generate multiple archived logs.

Even with archived logs for Data Guard going to a (hopefully) remote destination, there could be other locations defined that may have served a purpose at some stage but no longer do so. Maybe another diskgroup within ASM or even on the OS filesystem like in the $ORACLE_HOME/dbs directory?

We used to have multiple log_archive_dest defined in our pre-Data Guard, raw logical volume, 10G days before we moved to ASM and 11G. One set of logs would go to the local filesystem (before being backed up to tape) and then another would reside in a remote filesystem presented from a server located in our other data centre.
Connor McDonald
August 14, 2016 - 5:41 am UTC

Nice input.

Further Checks

Jonathan Lewis, August 14, 2016 - 10:00 am UTC

When you get multiple archived log files from one log switch how big are the resulting files ? Is it one big and lots of tiny, or all roughly the same size with the final one being smaller ? (or any other pattern).

Are you running RAC - you get a reguler "log file kick" from every node to keep log files synch'ed. It shouldn't make a dramatic difference, though.

Can you check sessions to see if you have any that generate significant redo over their lifetime: (v$sesstat, statistic "redo size") - a running instance is never really idle. If you don't have any sessions generating significant redo can you check the rate at which sessions connect and disconnect.

Remember on non-RAC that "private redo" reserves space in log files. If you have a very high setting for sessions you get a lot of private threads, which means a large amount of space reserved in the online log file, so could waste a LOT of space on each log file switch.


Regards
Jonathan Lewis

Connor McDonald
August 15, 2016 - 1:24 am UTC

Thanks for stopping by Jonathan.

Audit alter system.

Brian Fitzgerald, August 14, 2016 - 11:20 am UTC

Audit alter system.

Check to whom alter system or DBA is granted.

Check scheduler jobs

Check triggers

More to Explore

Backup/Recovery

Check out the complete guide to all of the Backup & Recovery techniques in the Oracle Database.