Chinaunix首页 | 论坛 | 博客
  • 博客访问: 380511
  • 博文数量: 113
  • 博客积分: 3035
  • 博客等级: 中校
  • 技术积分: 1430
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-01 16:32
文章分类
文章存档

2011年(42)

2010年(70)

2009年(1)

我的朋友

分类: Oracle

2010-11-12 15:22:10

alter system switch logfile不做完全检查点
sys@FOX> SELECT GROUP#,SEQUENCE#,STATUS,ARCHIVED,FIRST_CHANGE# FROM V$LOG;  
                                                                            
          GROUP#        SEQUENCE# STATUS           ARC    FIRST_CHANGE#    
---------------- ---------------- ---------------- --- ----------------    
               1                8 CURRENT          NO       2460063263    

                                                                           
3 rows selected.                                                           
 
sys@FOX> select FILE#,checkpoint_change#,recover, fuzzy,status from v$datafile_header;

FILE# CHECKPOINT_CHANGE# REC FUZ STATUS
----- ------------------ --- --- -------
    1         2460063194 NO  YES ONLINE
    2         2460063194 NO  YES ONLINE
    3         2460063194 NO  YES ONLINE
    4         2460063991 NO  YES ONLINE
    5         2460063194 NO  YES ONLINE
    6         2460063194 NO  YES ONLINE
    7         2460063194 NO  YES ONLINE
    8         2460063194 NO  YES ONLINE
    9         2460063991 NO  YES ONLINE

9 rows selected.

sys@FOX> select FILE#,status,CHECKPOINT_CHANGE#,name from v$datafile;

FILE# STATUS  CHECKPOINT_CHANGE# NAME
----- ------- ------------------ ---------------------------------------------
    1 SYSTEM          2460063194 D:\ORACLE\ORADATA\FOX\SYSTEM01.DBF
    2 ONLINE          2460063194 D:\ORACLE\ORADATA\FOX\UNDOTBS01.DBF
    3 ONLINE          2460063194 D:\ORACLE\ORADATA\FOX\INDX01.DBF
    4 ONLINE          2460063991 D:\ORACLE\ORADATA\FOX\TOOLS01.DBF
    5 ONLINE          2460063194 D:\ORACLE\ORADATA\FOX\USERS01.DBF
    6 ONLINE          2460063194 D:\ORACLE\ORADATA\FOX\DEMO01.DBF
    7 ONLINE          2460063194 D:\BACKUP_DIR\TESTING_LMT.DBF
    8 ONLINE          2460063194 D:\ORACLE\ORADATA\FOX\RMAN.DBF
    9 ONLINE          2460063991 D:\TOOL02.DBF

9 rows selected.
sys@FOX> alter system switch logfile;

System altered.

sys@FOX> select FILE#,checkpoint_change#,recover, fuzzy,status from v$datafile_header;

FILE# CHECKPOINT_CHANGE# REC FUZ STATUS
----- ------------------ --- --- -------
    1         2460063194 NO  YES ONLINE
    2         2460063194 NO  YES ONLINE
    3         2460063194 NO  YES ONLINE
    4         2460063991 NO  YES ONLINE
    5         2460063194 NO  YES ONLINE
    6         2460063194 NO  YES ONLINE
    7         2460063194 NO  YES ONLINE
    8         2460063194 NO  YES ONLINE
    9         2460063991 NO  YES ONLINE

9 rows selected.

sys@FOX> select FILE#,status,CHECKPOINT_CHANGE#,name from v$datafile;

FILE# STATUS  CHECKPOINT_CHANGE# NAME
----- ------- ------------------ ---------------------------------------------
    1 SYSTEM          2460063263 D:\ORACLE\ORADATA\FOX\SYSTEM01.DBF
    2 ONLINE          2460063263 D:\ORACLE\ORADATA\FOX\UNDOTBS01.DBF
    3 ONLINE          2460063263 D:\ORACLE\ORADATA\FOX\INDX01.DBF
    4 ONLINE          2460063991 D:\ORACLE\ORADATA\FOX\TOOLS01.DBF
    5 ONLINE          2460063263 D:\ORACLE\ORADATA\FOX\USERS01.DBF
    6 ONLINE          2460063263 D:\ORACLE\ORADATA\FOX\DEMO01.DBF
    7 ONLINE          2460063263 D:\BACKUP_DIR\TESTING_LMT.DBF
    8 ONLINE          2460063263 D:\ORACLE\ORADATA\FOX\RMAN.DBF
    9 ONLINE          2460063991 D:\TOOL02.DBF

9 rows selected.
switch logfile时只是用switch前的current日志的first_change#更新了v$datafile的检查点小于它的检查点
sys@FOX> SELECT GROUP#,SEQUENCE#,STATUS,ARCHIVED,FIRST_CHANGE# FROM V$LOG;

          GROUP#        SEQUENCE# STATUS           ARC    FIRST_CHANGE#
---------------- ---------------- ---------------- --- ----------------
               1                8 ACTIVE           YES       2460063263
               2                9 CURRENT          NO        2460064045
               3                7 INACTIVE         YES       2460063194

3 rows selected.

sys@FOX> SELECT FILE#, STATUS, ERROR, RECOVER, TABLESPACE_NAME, NAME FROM V$DATAFILE_HEADER
  2         WHERE RECOVER = 'YES' OR (RECOVER IS NULL AND ERROR IS NOT NULL);

no rows selected

sys@FOX> alter system checkpoint;

System altered.

sys@FOX> SELECT GROUP#,SEQUENCE#,STATUS,ARCHIVED,FIRST_CHANGE# FROM V$LOG;

          GROUP#        SEQUENCE# STATUS           ARC    FIRST_CHANGE#
---------------- ---------------- ---------------- --- ----------------
               1                8 INACTIVE         YES       2460063263
               2                9 CURRENT          NO        2460064045
               3                7 INACTIVE         YES       2460063194

3 rows selected.

sys@FOX> select FILE#,status,CHECKPOINT_CHANGE#,name from v$datafile;

FILE# STATUS  CHECKPOINT_CHANGE# NAME
----- ------- ------------------ ---------------------------------------------
    1 SYSTEM          2460064082 D:\ORACLE\ORADATA\FOX\SYSTEM01.DBF
    2 ONLINE          2460064082 D:\ORACLE\ORADATA\FOX\UNDOTBS01.DBF
    3 ONLINE          2460064082 D:\ORACLE\ORADATA\FOX\INDX01.DBF
    4 ONLINE          2460064082 D:\ORACLE\ORADATA\FOX\TOOLS01.DBF
    5 ONLINE          2460064082 D:\ORACLE\ORADATA\FOX\USERS01.DBF
    6 ONLINE          2460064082 D:\ORACLE\ORADATA\FOX\DEMO01.DBF
    7 ONLINE          2460064082 D:\BACKUP_DIR\TESTING_LMT.DBF
    8 ONLINE          2460064082 D:\ORACLE\ORADATA\FOX\RMAN.DBF
    9 ONLINE          2460064082 D:\TOOL02.DBF

9 rows selected.
alter system checkpoint;做了完全检查点
sys@FOX> select FILE#,checkpoint_change#,recover, fuzzy,status from v$datafile_header;

FILE# CHECKPOINT_CHANGE# REC FUZ STATUS
----- ------------------ --- --- -------
    1         2460064082 NO  YES ONLINE
    2         2460064082 NO  YES ONLINE
    3         2460064082 NO  YES ONLINE
    4         2460064082 NO  YES ONLINE
    5         2460064082 NO  YES ONLINE
    6         2460064082 NO  YES ONLINE
    7         2460064082 NO  YES ONLINE
    8         2460064082 NO  YES ONLINE
阅读(1560) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~