没想明白,暂时记录一下[@more@]SQL& select file#,checkpoint_change#,last_change#,offline_change#,online_change#,status from v$
CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# STATUS----------
------------------ ------------ --------------- -------------- -------
9634266 SYSTEM
9634266 ONLINE
9634266 ONLINE
9634266 ONLINESQL& alter tabl表空间已更改。SQL& select file#,checkpoint_change#,last_change#,offline_change#,online_change#,status from v$
FILE# CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# STATUS---------- ------------------ ------------ --------------- -------------- -------
9634266 SYSTEM
9634266 ONLINE
9634266 ONLINE
9634266 OFFLINESQL& host copy G:oracleproduct10.2.0oradataTESTUSERS01.DBF C:TEMP;已复制
1 个文件。SQL&SQL& alter tab表空间已更改。SQL& select file#,checkpoint_change#,last_change#,offline_change#,online_change#,status from v$
FILE# CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# STATUS---------- ------------------ ------------ --------------- -------------- -------
9634266 SYSTEM
9634266 ONLINE
9634266 ONLINE
9736760 ONLINESQL& alter s系统已更改。SQL& alter s系统已更改。SQL& alter s系统已更改。SQL& select file#,checkpoint_change#,last_change#,offline_change#,online_change#,status from v$
FILE# CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# STATUS---------- ------------------ ------------ --------------- -------------- -------
9634266 SYSTEM
9634266 ONLINE
9634266 ONLINE
9736760 ONLINESQL& shutdown immediate数据库已经关闭。已经卸载数据库。ORACLE 例程已经关闭。SQL& startup mountORACLE 例程已经启动。Total System Global Area
bytesFixed Size
1248768 bytesVariable Size
bytesDatabase Buffers
bytesRedo Buffers
7139328 bytes数据库装载完毕。SQL& select file#,checkpoint_change#,last_change#,offline_change#,online_change#,status from v$
FILE# CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# STATUS---------- ------------------ ------------ --------------- -------------- -------
9634266 SYSTEM
9634266 ONLINE
9634266 ONLINE
9736760 ONLINESQL&SQL& host copy c:tempusers01.dbf G:oracleproduct10.2.0oradataTEST已复制
1 个文件。SQL& select file#,checkpoint_change# from v$datafile_
FILE# CHECKPOINT_CHANGE#---------- ------------------
9736665SQL&alter database open*第 1 行出现错误:ORA-01113: 文件 4 需要介质恢复ORA-01110: 数据文件 4: 'G:ORACLEPRODUCT10.2.0ORADATATESTUSERS01.DBF'SQL& alter database datafile 4数据库已更改。SQL& select file#,checkpoint_change#,last_change#,offline_change#,online_change#,status from v$
FILE# CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# STATUS---------- ------------------ ------------ --------------- -------------- -------
9634266 SYSTEM
9634266 ONLINE
9634266 ONLINE
9736760 OFFLINESQL&数据库已更改。SQL& select file#,checkpoint_change#,last_change#,offline_change#,online_change#,status from v$
FILE# CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# STATUS---------- ------------------ ------------ --------------- -------------- -------
9634266 SYSTEM
9634266 ONLINE
9634266 ONLINE
9736760 OFFLINESQL&SQL& recover datafile 4;ORA-00279: 更改 9736760 (在 01/22/:24 生成) 对于线程 1 是必需的ORA-00289: 建议: G:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREATESTARCHIVELOGO1_MF_1_6_%U_.ARCORA-00280: 更改 9736760 (用于线程 1) 在序列 #6 中指定日志: {&RET&=suggested | filename | AUTO | CANCEL}--=============================这里恢复的时候为什么不是从4号datafile的头上的checkpoint_change#:9736665开始恢复而是从9736760开始恢复呢?9736760很显然是在uesrs表空间做完离线备份之后online时的checkpoint_change#--=============================接着上面输入auto选项恢复:auto已应用的日志。完成介质恢复。SQL&SQL& select file#,checkpoint_change#,last_change#,offline_change#,online_change#,status from v$
FILE# CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# STATUS---------- ------------------ ------------ --------------- -------------- -------
9634266 SYSTEM
9634266 ONLINE
9634266 ONLINE
9736760 OFFLINESQL& select file#,checkpoint_change# from v$datafile_
FILE# CHECKPOINT_CHANGE#---------- ------------------
9737433SQL&--=========================很显然datafile header上的checkpoint_change#已经从9736760恢复到v$datafile里面last_change#上记录的9737433了,9737433就是shutdown db是做完全checkpoint时记录下来的,offline datafile 4之后4号文件对应的last_change#不会再发生变化,所以last_change#记录的信息自然就是4#文件恢复的终点,这个倒是不难理解。--=========================SQL& alter database datafile 4数据库已更改。SQL& select file#,checkpoint_change# from v$datafile_
FILE# CHECKPOINT_CHANGE#---------- ------------------
9738822SQL& select file#,checkpoint_change#,last_change#,offline_change#,online_change#,status from v$
FILE# CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# STATUS---------- ------------------ ------------ --------------- -------------- -------
9634266 SYSTEM
9634266 ONLINE
9634266 ONLINE
9736760 ONLINESQL&
&&&回复&&&:
北京盛拓优讯信息技术有限公司. 版权所有 京ICP备号 北京市公安局海淀分局网监中心备案编号:10
广播电视节目制作经营许可证(京) 字第1234号 中国互联网协会会员