■When will LGWR write redo? a transaction commite;
every three seconds;
one-third full;
1 M changed record
before DBWn
■LS & LSN log switches
log sequence number
■
Force log Switches and checkpoint・Forcing a log switch
$ID
$PS -EF | ORACLE
$SQLPLUS /NOLOG
SQL>CONN /AS SYSDBA
SQL>DESC v$log
SQL>select group#,thread#,sequence#,status from v$log
SQL>ALTER SYSTEM SWITCHE LOGILE;
System altered
SQL>select group#,thread#,sequence#,status from v$log
・Checkpoints(dirty file write to datafile) can be forced by :
①Setting FAST_START_MTTR_TARGET parameter
FAST_START_MTTR_TARGET = 600 (DBW every 600s writer a time)
SQL>show parameter fast_stat
SQL>alter system set fast_start =600 scope=both
②ALTER SYSTEM CHECKPOINT command
ALTER SYSTEM CHECKPOINT
■Adding Redo files groupsSQL>desc v$logfile;
SQL>col member format 50;
SQL>select * from v$logfile;
SQL>alter database add logfile group 4('$home/oradata/redolog4.rdo') size 40M
■Adding Redo file members
SQL>alter database add log file member '$home/oradata/redo04a.rdo' to grout 4,'$home/oradata/redo05a.rdo' to grout 5;
SQL>select * from v$logfile;
■Dropping Redo file membersSQL>
■Dropping Redo file groups
SQL>
■Relocate & Rename
①ALTER DATABASE RENAME FILE command
SQL>shutdown immediate
SQL> !
$cd /u01/oradata/wilson/
$cp redo04.log ..
$mv redo04.log redo04.rdo
$exit
SQL>startup mount
SQL>alter database rename file '/u01/oradata/wilson/redo04.log' to'/u01/oradata/wilson/redo04.rdo'
SQL>alter database open;
SQL>select * from v$logfile;
②Add new members and drop old members;
■Clear Redo log files
①ALTER DATABASE CLEAR LOGFILE
②ALTER DATABASE CLEAR UNARCHIVE LOGFILE GROUP 2
■Redo File Configuration
■Group and Member Informationv$log
v$logfile
v$log_history
Concept of redo threads
①In typical configurations,only one database instance access an oracle database,son only one thread is present.
②In the RAC(real application clusters) system ,each instance has its own redo log groups.The redo log file groups of an instance are collectively called a 'thread',or more appropriately,a 'redo log thread'.each instance has its own thread.
■Archived redo log files
ARCHIVELOG (Recomend)
NOARCHIVELOG (DATABASE DEFAULT)
SQL> DESC V$INSTANCE
SQL> desc v$database
SQL>
阅读(677) | 评论(0) | 转发(0) |