|
select * from v$sgastat;
select d.CHECKPOINT_CHANGE# from v_$database d;
select * from v$datafile;
1960000 doing Incremental not done 1952278-1959998(RBA->) 1959999
1970000 doing Incremental not done 19599999- Commplete Checkpoint -1969998(RBA->) 1969999
日常看见的都是增量检查点:只有两种增量检查点:
一种是日志切换:
- Mon Apr 16 11:19:41 2018
- Completed checkpoint up to RBA [0x74.2.10], SCN: 1960197
- Mon Apr 16 11:32:48 2018
- Thread 1 cannot allocate new log, sequence 117
- Private strand flush not complete
- Current log# 2 seq# 116 mem# 0: +DATA/orcl/onlinelog/group_2.262.816169639
- Current log# 2 seq# 116 mem# 1: +FRA/orcl/onlinelog/group_2.258.816169639
- Beginning log switch checkpoint up to RBA [0x75.2.10], SCN: 1961318
- Thread 1 advanced to log sequence 117 (LGWR switch)
- Current log# 3 seq# 117 mem# 0: +DATA/orcl/onlinelog/group_3.263.816169641
- Current log# 3 seq# 117 mem# 1: +FRA/orcl/onlinelog/group_3.259.816169641
- Mon Apr 16 11:32:48 2018
- Archived Log entry 130 added for thread 1 sequence 116 ID 0x596b1d0e dest 1:
- Mon Apr 16 11:35:48 2018
复制代码 另一种是fast_start_mttr_target(前滚的成本是由RBA之后日志的长度和强度决定的):
- Incremental checkpoint up to RBA [0x74.b37.0], current log tail at RBA [0x75.240.0]
- Mon Apr 16 11:37:57 2018
- Completed checkpoint up to RBA [0x75.2.10], SCN: 1961318
复制代码 请在只读数据库中,再查询以遍:
- select d.CHECKPOINT_CHANGE#, current_scn from v_$database d;
- select d.CHECKPOINT_CHANGE# from v_$datafile d;
- alter system switch logfile;
- select * from v$log;
- alter system checkpoint;
- select * from dba_data_files;
复制代码- alter tablespace users offline ;
- select * from dba_data_files;
- alter database datafile '+DATA/orcl/datafile/users.259.816169553' offline;
- alter database datafile '+DATA/orcl/datafile/users.259.816169553' online;
- select d.NAME , d.CHECKPOINT_CHANGE# from v_$datafile d;
- alter system checkpoint;
- alter tablespace users begin backup;
- select * from v$backup;
- alter tablespace users end backup;
复制代码- alter system checkpoint;
- select d.NAME , d.CHECKPOINT_CHANGE# from v_$datafile d;
- alter tablespace users offline ;
- alter tablespace users online ;
- alter system checkpoint;
- select d.NAME , d.CHECKPOINT_CHANGE# from v_$datafile d;
- alter tablespace users read only ;
- alter tablespace users read write ;
- -----
- alter database datafile '+DATA/orcl/datafile/users.259.816169553' offline;
- alter database datafile '+DATA/orcl/datafile/users.259.816169553' online;
- alter tablespace sysaux online;
复制代码- select * from v$log;
- alter database add logfile group 4 size 52428800;
- select * from v$logfile;
- alter database drop logfile group 4;
- alter database add logfile member '/u01/app/oracle/oradata/orcl/redo02c.log' to group 2;
- ------------------------
- alter database drop logfile member '/u01/app/oracle/oradata/orcl/redo02c.log';
- alter system switch logfile;
复制代码- [oracle@station90 ~]$ . oraenv
- ORACLE_SID = [orcl] ? +ASM
- The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid is /u01/app/oracle
- [oracle@station90 ~]$ asmcmd cp +FRA/orcl/controlfile/current.256.816169633 /u01/app/oracle/oradata/orcl/control03.ctl
- copying +FRA/orcl/controlfile/current.256.816169633 -> /u01/app/oracle/oradata/orcl/control03.ctl
复制代码
|
|