Chinaunix首页 | 论坛 | 博客
  • 博客访问: 970386
  • 博文数量: 358
  • 博客积分: 8185
  • 博客等级: 中将
  • 技术积分: 3751
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-15 16:27
个人简介

The views and opinions expressed all for my own,only for study and test, not reflect the views of Any Company and its affiliates.

文章分类

全部博文(358)

文章存档

2012年(8)

2011年(18)

2010年(50)

2009年(218)

2008年(64)

我的朋友

分类:

2009-01-17 19:00:41

■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 groups
SQL>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 members
SQL>
■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 Information

v$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>










  
阅读(673) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~