實驗一
SQL> select substr(name
DNAME REC FUZ CHECKPOINT_CHANGE# CHECKPOINT_COUNT
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select * from t
SCN
SQL> insert into t
已創建
SQL> select * from t
SCN
SQL> commit;
提交完成
SQL> select substr(name
DNAME REC FUZ CHECKPOINT_CHANGE# CHECKPOINT_COUNT
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select substr(name
DNAME CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# STATUS
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select checkpoint_change# from v$database;
CHECKPOINT_CHANGE#
SQL> alter tablespace tbs_test begin backup;
表空間已更改
SQL> select checkpoint_change# from v$database;
CHECKPOINT_CHANGE#
SQL> select substr(name
DNAME CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# STATUS
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select substr(name
DNAME REC FUZ CHECKPOINT_CHANGE# CHECKPOINT_COUNT
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> host copy D:\TBS
SQL> host copy
SQL> host copy
SQL> host copy D:\TBS
SQL> host copy D:\TBS
SQL> shutdown abort
ORACLE 例程已經關閉
SQL> startup mount
ORA
ORACLE 例程已經啟動
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers
數據庫裝載完畢
CHECKPOINT_CHANGE#不一致
V$RECOVER_FILE裡有
這是因為兩個的信息來自不同的地方
需要恢復
SQL> select substr(name
DNAME REC FUZ CHECKPOINT_CHANGE# CHECKPOINT_COUNT
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select substr(name
DNAME CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# STATUS
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select * from v$recover_file;
FILE# ONLINE ONLINE_ ERROR CHANGE# TIME
SQL> select * from v$backup;
FILE# STATUS CHANGE# TIME
已選擇
SQL> alter database end backup;
數據庫已更改
SQL> select * from v$recover_file;
未選定行
SQL> select substr(name
DNAME CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# STATUS
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select substr(name
DNAME REC FUZ CHECKPOINT_CHANGE# CHECKPOINT_COUNT
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> alter database open;
數據庫已更改
SQL> select substr(name
DNAME CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# STATUS
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select substr(name
DNAME REC FUZ CHECKPOINT_CHANGE# CHECKPOINT_COUNT
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> spool off
實驗二
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME
SQL> select * from t
SCN
SQL> select substr(name
DNAME REC FUZ CHECKPOINT_CHANGE# CHECKPOINT_COUNT
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select substr(name
DNAME CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# STATUS
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> alter tablespace tbs_test begin backup;
表空間已更改
SQL> select substr(name
DNAME CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# STATUS
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select substr(name
DNAME REC FUZ CHECKPOINT_CHANGE# CHECKPOINT_COUNT
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME
SQL> shutdown abort
ORACLE 例程已經關閉
SQL> startup mount;
ORA
ORACLE 例程已經啟動
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers
數據庫裝載完畢
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME
SQL> select substr(name
DNAME REC FUZ CHECKPOINT_CHANGE# CHECKPOINT_COUNT
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select substr(name
DNAME CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# STATUS
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select * from v$recover_file;
FILE# ONLINE ONLINE_ ERROR CHANGE# TIME
SQL> select * from v$backup;
FILE# STATUS CHANGE# TIME
已選擇
SQL> host cp D:\TBS
SQL> host copy D:\TBS
SQL> host copy D:\TBS
SQL> alter database open;
alter database open
*
第
ORA
ORA
SQL> select * from v$backup;
FILE# STATUS CHANGE# TIME
已選擇
SQL> select substr(name
DNAME CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# STATUS
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select substr(name
DNAME REC FUZ CHECKPOINT_CHANGE# CHECKPOINT_COUNT
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> alter database end backup;
alter database end backup
*
第
ORA
ORA
ORA
ORA
ORA
ORA
ORA
SQL> recover database;
完成介質恢復
SQL> select substr(name
DNAME REC FUZ CHECKPOINT_CHANGE# CHECKPOINT_COUNT
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select substr(name
DNAME CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# STATUS
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select * from v$backup;
FILE# STATUS CHANGE# TIME
已選擇
SQL> select * from v$recover_file;
未選定行
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME
SQL> alter database open;
數據庫已更改
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME
SQL> select substr(name
DNAME CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# STATUS
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select substr(name
DNAME REC FUZ CHECKPOINT_CHANGE# CHECKPOINT_COUNT
D:\ORACLE\ORADATA\FOX\SYSTEM
D:\ORACLE\ORADATA\FOX\UNDOTBS
D:\ORACLE\ORADATA\FOX\SYSAUX
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\EXAMPLE
D:\ORACLE\ORADATA\FOX\USERS
D:\ORACLE\ORADATA\FOX\TEST
D:\TBS
D:\TBS
D:\ORACLE\ORADATA\FOX\TEST_PERFSTAT
已選擇
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME
SCN
SQL> spool off
From:http://tw.wingwit.com/Article/program/Oracle/201311/17529.html