Alter logfiles

From Tom's notes
Revision as of 14:09, 13 April 2016 by 193.121.160.69 (talk) (Created page with "Sometimes you want to change a logfile that's still in use. In order to clear it and drop it, execute following commands: <source lang="sql"> alter system checkpoint; alter da...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Sometimes you want to change a logfile that's still in use. In order to clear it and drop it, execute following commands:

alter system checkpoint;
alter database switch logfile;  
alter system archive log all;
alter database drop logfile group 1;

Then you can add it again with a new size

ALTER DATABASE ADD LOGFILE GROUP 1 ('/db/redo01a.log', '/db/redo01b.log') SIZE 512M reuse;