Bo's Oracle Station

查看: 2727|回复: 0

活动第11/12次(2018-04-14星期六上下午)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2018-4-14 11:31:21 | 显示全部楼层 |阅读模式
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

日常看见的都是增量检查点:只有两种增量检查点:
一种是日志切换:
  1. Mon Apr 16 11:19:41 2018
  2. Completed checkpoint up to RBA [0x74.2.10], SCN: 1960197
  3. Mon Apr 16 11:32:48 2018
  4. Thread 1 cannot allocate new log, sequence 117
  5. Private strand flush not complete
  6.   Current log# 2 seq# 116 mem# 0: +DATA/orcl/onlinelog/group_2.262.816169639
  7.   Current log# 2 seq# 116 mem# 1: +FRA/orcl/onlinelog/group_2.258.816169639
  8. Beginning log switch checkpoint up to RBA [0x75.2.10], SCN: 1961318
  9. Thread 1 advanced to log sequence 117 (LGWR switch)
  10.   Current log# 3 seq# 117 mem# 0: +DATA/orcl/onlinelog/group_3.263.816169641
  11.   Current log# 3 seq# 117 mem# 1: +FRA/orcl/onlinelog/group_3.259.816169641
  12. Mon Apr 16 11:32:48 2018
  13. Archived Log entry 130 added for thread 1 sequence 116 ID 0x596b1d0e dest 1:
  14. Mon Apr 16 11:35:48 2018
复制代码
另一种是fast_start_mttr_target(前滚的成本是由RBA之后日志的长度和强度决定的):
  1. Incremental checkpoint up to RBA [0x74.b37.0], current log tail at RBA [0x75.240.0]
  2. Mon Apr 16 11:37:57 2018
  3. Completed checkpoint up to RBA [0x75.2.10], SCN: 1961318
复制代码
请在只读数据库中,再查询以遍:
  1. select  d.CHECKPOINT_CHANGE#, current_scn  from v_$database d;

  2. select  d.CHECKPOINT_CHANGE#  from v_$datafile d;

  3. alter system switch logfile;

  4. select  * from v$log;

  5. alter system checkpoint;

  6. select  * from dba_data_files;
复制代码
  1. alter tablespace users offline ;

  2. select  * from dba_data_files;

  3. alter database datafile '+DATA/orcl/datafile/users.259.816169553' offline;

  4. alter database datafile '+DATA/orcl/datafile/users.259.816169553' online;


  5. select  d.NAME , d.CHECKPOINT_CHANGE#  from v_$datafile d;

  6. alter system checkpoint;

  7. alter tablespace users begin backup;

  8. select  * from v$backup;

  9. alter tablespace users end backup;
复制代码
  1. alter system checkpoint;

  2. select  d.NAME , d.CHECKPOINT_CHANGE#  from v_$datafile d;

  3. alter tablespace users offline ;

  4. alter tablespace users online ;

  5. alter system checkpoint;

  6. select  d.NAME , d.CHECKPOINT_CHANGE#  from v_$datafile d;

  7. alter tablespace users read only ;

  8. alter tablespace users read write ;

  9. -----
  10. alter database datafile '+DATA/orcl/datafile/users.259.816169553' offline;

  11. alter database datafile '+DATA/orcl/datafile/users.259.816169553' online;

  12. alter tablespace sysaux online;
复制代码
  1. select  * from v$log;

  2. alter database add logfile group 4 size  52428800;

  3. select  * from v$logfile;

  4. alter database drop logfile group 4;

  5. alter database add logfile member '/u01/app/oracle/oradata/orcl/redo02c.log' to group 2;

  6. ------------------------

  7. alter database drop logfile member '/u01/app/oracle/oradata/orcl/redo02c.log';

  8. alter system switch logfile;
复制代码
  1. [oracle@station90 ~]$ . oraenv
  2. ORACLE_SID = [orcl] ? +ASM
  3. The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid is /u01/app/oracle
  4. [oracle@station90 ~]$ asmcmd  cp +FRA/orcl/controlfile/current.256.816169633  /u01/app/oracle/oradata/orcl/control03.ctl
  5. copying +FRA/orcl/controlfile/current.256.816169633 -> /u01/app/oracle/oradata/orcl/control03.ctl
复制代码





回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-11-21 22:10 , Processed in 0.037770 second(s), 25 queries .

快速回复 返回顶部 返回列表