数据文件offline 时oracle 干了那些事?
SQL> oradebug setmypid
Statement processed.
SQL> oradebug unlimit
Statement processed.
SQL> oradebug event 10046 trace name context forever ,level 12;
Statement processed.
SQL> alter database datafile '/oracle/oradata/lixora/LIXORA/datafile/o1_mf_zjhcsoft_b24623wy_.dbf' offline;
Database altered.
SQL> oradebug event 10046 trace name context off;
Statement processed.
SQL> oradebug tracefile_name;
/oracle/admin/lixora/udump/lixora_ora_29515.trc
*** 2014-09-30 10:50:56.261
*** SERVICE NAME:(SYS$USERS) 2014-09-30 10:50:56.261
*** SESSION ID:(159.3) 2014-09-30 10:50:56.261
WAIT #0: nam='SQL*Net message to client' ela= 1 driver id=1650815232 #bytes=1 p3=0 obj#=0 tim=1378950640880510
WAIT #0: nam='SQL*Net message from client' ela= 9226316 driver id=1650815232 #bytes=1 p3=0 obj#=0 tim=1378950650107126
XCTEND rlbk=0, rd_only=1
=====================
PARSING IN CURSOR #9 len=101 dep=0 uid=0 oct=35 lid=0 tim=1378950650107611 hv=707773262 ad='7e6cd4e8'
alter database datafile '/oracle/oradata/lixora/LIXORA/datafile/o1_mf_zjhcsoft_b24623wy_.dbf' offline
END OF STMT
PARSE #9:c=0,e=394,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=1378950650107606
BINDS #9:
WAIT #9: nam='control file sequential read' ela= 24 file#=0 block#=1 blocks=1 obj#=0 tim=1378950650107957
WAIT #9: nam='control file sequential read' ela= 21 file#=1 block#=1 blocks=1 obj#=0 tim=1378950650108006
WAIT #9: nam='control file sequential read' ela= 9 file#=2 block#=1 blocks=1 obj#=0 tim=1378950650108035
WAIT #9: nam='control file sequential read' ela= 6 file#=0 block#=16 blocks=1 obj#=0 tim=1378950650108060
WAIT #9: nam='control file sequential read' ela= 7 file#=0 block#=18 blocks=1 obj#=0 tim=1378950650108083
WAIT #9: nam='control file sequential read' ela= 10 file#=0 block#=30 blocks=1 obj#=0 tim=1378950650108114
WAIT #9: nam='control file sequential read' ela= 8 file#=0 block#=1 blocks=1 obj#=0 tim=1378950650108250
WAIT #9: nam='control file sequential read' ela= 5 file#=1 block#=1 blocks=1 obj#=0 tim=1378950650108278
WAIT #9: nam='control file sequential read' ela= 4 file#=2 block#=1 blocks=1 obj#=0 tim=1378950650108299
WAIT #9: nam='control file sequential read' ela= 5 file#=0 block#=16 blocks=1 obj#=0 tim=1378950650108321
WAIT #9: nam='control file sequential read' ela= 6 file#=0 block#=18 blocks=1 obj#=0 tim=1378950650108342
WAIT #9: nam='control file sequential read' ela= 20 file#=0 block#=23 blocks=1 obj#=0 tim=1378950650108385
WAIT #9: nam='rdbms ipc reply' ela= 32296 from_process=5 timeout=910 p3=0 obj#=0 tim=1378950650141300
WAIT #9: nam='rdbms ipc reply' ela= 9556 from_process=5 timeout=910 p3=0 obj#=0 tim=1378950650150904
XCTEND rlbk=0, rd_only=1
EXEC #9:c=1000,e=43469,p=0,cr=0,cu=2,mis=0,r=0,dep=0,og=1,tim=1378950650151144
WAIT #9: nam='log file sync' ela= 14463 buffer#=1811 p2=0 p3=0 obj#=0 tim=1378950650165680
WAIT #9: nam='SQL*Net message to client' ela= 7 driver id=1650815232 #bytes=1 p3=0 obj#=0 tim=1378950650165756
*** 2014-09-30 10:51:13.382
WAIT #9: nam='SQL*Net message from client' ela= 7434358 driver id=1650815232 #bytes=1 p3=0 obj#=0 tim=1378950657600174
结论:
对一个datafile不管是运行offline还是offline drop。都是仅仅改写了control文件。不会更新file$和ts$,这就是为什么能够在mount状态下对某个datafile运行offline/offline drop的本质原因;
而在datafile on line 过程中 oracle会检查数据文件头的scn 值。假设scn 值小于其它的数据文件,那么这个数据文件就须要进行恢复,也就是说仅仅要用bbed 把offline 的数据文件的scn 该改成和其它数据文件一样。那个这个文件就又能online 。而又不须要日志文件来进行恢复。
最新文章
- 做webapp静态页面的一些积累
- Springmvc+Hibernate在Eclipse启动Tomcat需要很长时间的解决方法
- 利用jquery实现网页禁止鼠标右键、禁止复制
- 【Android测试】【随笔】模拟双指点击
- Eclipse 工作目录被破坏,导致Eclipse 打不开
- 调用WCF接口的方法
- Python数据结构——栈、队列的实现(一)
- 如果Android和C#在一起?
- c语言中文件相关操作
- jstl--c:choose标签
- <;body>;标签,网页上显示的内容放在这里
- Java开发23中设计模式
- c++对象内存布局的理解
- 关于sg90舵机的,要知道!要注意!
- 学习TensorFlow,打印输出tensor的值
- Spring 下使用Junit4 单元测试
- week2
- [css选择器]总结:IE6不支持的CSS选择符
- The First Day Of Cnblogs
- poj3468 线段树的懒惰标记
热门文章
- UVALive 3507:Keep the Customer Satisfied(贪心 Grade C)
- 使用navicat连接linux服务器数据库方法
- Codeforces 626F Group Projects (DP)
- luogu P2776 [SDOI2007]小组队列
- [Luogu1429]平面最近点对(加强版)
- Hibernate使用Criteria去重distinct+分页
- mysql的load data,高速将文本文件,插入数据库中
- ANDROID模拟器访问本地WEB应用10.0.2.2
- 在Spring MVC Controller中注入HttpServletRequest对象会不会造成线程安全的问题
- [置顶]
 Python+Django 复选框选择多个 提交只能保存单个