Oracle redo log file (Code instance), oracle Log File
1. query information about the redo log file group.
select group#,sequence#,members,status,archived from v$log;
2. query the information of the redo log file
select group#,type,member from v$logfile order by group#;
3. Add a new redo log group group4 for the case Database
alter database add logfile 'E:\orc\aa.log' size 10M;
4. Add a new redo log group and specify the group number.
alter database add logfile group 8 'E:\orc\cc.log' size 10M;
5. Add a new log file to the log group.
alter database add logfile member 'E:\orc\dd.log' to group 4;
6. view log switching status
select * from v$logfile;
7. manually switch logs
alter system switch logfile;
8. Move the redo log file aa. log to E: \ orc \ ldj.
conn system/123456 as sysdba;shutdown immediate;
When shutting down the database, manually copy the log file to be moved to the target location,
You can change the name here.
startup mount;alter database rename file 'E:\orc\aa.log'to 'E:\orc\ldj\aa.log';alter database open;
9. Delete the newly added log File dd. log from the log group.
alter database drop logfile member 'E:\orc\dd.log';
10. Delete the newly added 4th redo log file groups
alter database drop logfile group 4;