cancel
Showing results for 
Search instead for 
Did you mean: 

How do I limit the size of the transaction log?

Former Member
5,237

I thought it was controlled using the -os option on the dbeng12/dbsrv12 command line, but from what I've read, -os seems to be for the console log. ???

Accepted Solutions (0)

Answers (2)

Answers (2)

VolkerBarth
Contributor

A general approach to automate this task would use an event of the GrowLog type:

Here is an example from the 12.0.1 docs:

Limit the transaction log size to 10 MB:

  CREATE EVENT LogLimit
  TYPE GrowLog
  WHERE event_condition( 'LogSize' ) > 10
  HANDLER
  BEGIN
    IF EVENT_PARAMETER( 'NumActive' ) = 1 THEN 
     BACKUP DATABASE
     DIRECTORY 'c:\\\\logs'
     TRANSACTION LOG ONLY
     TRANSACTION LOG RENAME MATCH;
    END IF;
  END;
Former Member

I've answered my own question.... it's not the start command at all. Oops! I have to use the -r option on the dbbackup command.