日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > 数据库 >内容正文

数据库

oracle protocol=beq 不可用,学习笔记:Oracle数据库坏块 深入研究obj$坏块导致exp/expdp不能执行原因...

發(fā)布時(shí)間:2024/10/5 数据库 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 oracle protocol=beq 不可用,学习笔记:Oracle数据库坏块 深入研究obj$坏块导致exp/expdp不能执行原因... 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

天萃荷凈

深入研究Oracle壞塊obj$導(dǎo)致exp/expdp不能執(zhí)行導(dǎo)出的原因

上篇(案例:Oracle出現(xiàn)obj$壞塊exp/expdp導(dǎo)出不能導(dǎo)出的解決辦法ORA-01578 ORA-01110),驗(yàn)證了在obj$有壞塊的情況下,不能執(zhí)行exp/expdp操作,這篇是說(shuō)明是什么原因?qū)е略趏bj$有壞塊的情況下exp不能正常執(zhí)行

一.啟動(dòng)Oracle數(shù)據(jù)庫(kù)級(jí)別會(huì)話跟蹤

[oracle@node1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Sun Jan 15 11:37:07 2012

Copyright (c) 1982, 2011, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, Oracle Label Security, OLAP, Data Mining,

Oracle Database Vault and Real Application Testing options

SQL> create pfile='/tmp/pfile' from spfile;

File created.

--------------------------------------------------

在pfile中添加

event='10046 trace name context forever,level 12'

--------------------------------------------------

SQL> startup pfile='/tmp/pfile' force

ORACLE instance started.

Total System Global Area 622149632 bytes

Fixed Size 2230912 bytes

Variable Size 398460288 bytes

Database Buffers 213909504 bytes

Redo Buffers 7548928 bytes

Database mounted.

Database opened.

二.執(zhí)行table單表導(dǎo)出,找到trace文件

[oracle@node1 trace]$ exp "'/ as sysdba'" tables=chf.t1 file=/tmp/xifenfei.dmp \

> log=/tmp/xifenfei.log INDEXES =n? COMPRESS =n CONSISTENT =n GRANTS =n \

> STATISTICS =none TRIGGERS =n CONSTRAINTS =n

Export: Release 11.2.0.3.0 - Production on Sun Jan 15 11:48:50 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates.? All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, Oracle Label Security, OLAP, Data Mining,

Oracle Database Vault and Real Application Testing option

Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set

Note: grants on tables/views/sequences/roles will not be exported

Note: indexes on tables will not be exported

Note: constraints on tables will not be exported

About to export specified tables via Conventional Path ...

Current user changed to CHF

. . exporting table???????????????????????????? T1

--另外會(huì)話觀察

Tasks: 241 total,?? 1 running, 240 sleeping,?? 0 stopped,?? 0 zombie

Cpu(s):? 8.9%us,? 1.2%sy,? 0.0%ni, 85.1%id,? 4.8%wa,? 0.0%hi,? 0.0%si,? 0.0%st

Mem:?? 8165060k total,? 7168288k used,?? 996772k free,?? 266028k buffers

Swap:? 8289500k total,????? 168k used,? 8289332k free,? 4653408k cached

PID USER????? PR? NI? VIRT? RES? SHR S %CPU %MEM??? TIME+? COMMAND

4829 oracle??? 18?? 0 69812? 12m 9144 S 51.1? 0.2?? 0:03.64 exp?????????????? tables=chf.t1 file=/tmp/xifenfei.dmp log=/tmp/xifenfei.log INDEXES =n COMPRESS

4830 oracle??? 18?? 0? 829m? 62m? 58m D 27.9? 0.8?? 0:03.85 oraclechf (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))

[oracle@node1 trace]$ ll |grep 4830

-rw-r----- 1 oracle oinstall 14101447 01-15 11:49 chf_ora_4830.trc

-rw-r----- 1 oracle oinstall??? 75398 01-15 11:49 chf_ora_4830.trm

1

三.閱讀Oracle跟蹤trace文件

因?yàn)槭莖bj$對(duì)象出現(xiàn)壞塊,導(dǎo)致exp不能執(zhí)行,如果是使用了obj$表的index,那么不會(huì)每次都報(bào)錯(cuò),而我測(cè)試了多次都報(bào)錯(cuò),所以懷疑是對(duì)obj$表進(jìn)行全表掃描導(dǎo)致該錯(cuò)誤發(fā)生,而使得exp不能繼續(xù)下去。所以這次查找trace文件,重點(diǎn)是關(guān)注obj$表的全表掃描操作,經(jīng)過(guò)耐心查找,終于發(fā)現(xiàn)了一個(gè)對(duì)obj$全表掃描的操作

1

PARSING IN CURSOR #46986932266584 len=41 dep=0 uid=0 oct=3 lid=0 tim=1326599330636591 hv=2311813821 ad='7be773c8' sqlid='ftx7dd64wqypx'

SELECT COUNT(*)????? FROM?? SYS.EXU81JAVT

END OF STMT

PARSE #46986932266584:c=2999,e=2938,p=5,cr=23,cu=0,mis=1,r=0,dep=0,og=1,plh=23986678,tim=1326599330636590

WAIT #46986932266584: nam='SQL*Net message to client' ela= 3 driver id=1650815232 #bytes=1 p3=0 obj#=91 tim=1326599330636682

WAIT #46986932266584: nam='SQL*Net message from client' ela= 42 driver id=1650815232 #bytes=1 p3=0 obj#=91 tim=1326599330636738

EXEC #46986932266584:c=0,e=21,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=23986678,tim=1326599330636788

WAIT #46986932266584: nam='SQL*Net message to client' ela= 2 driver id=1650815232 #bytes=1 p3=0 obj#=91 tim=1326599330636810

WAIT #46986932266584: nam='SQL*Net message from client' ela= 91 driver id=1650815232 #bytes=1 p3=0 obj#=91 tim=1326599330636913

WAIT #46986932266584: nam='SQL*Net message to client' ela= 9 driver id=1650815232 #bytes=1 p3=0 obj#=91 tim=1326599330668126

FETCH #46986932266584:c=30995,e=31256,p=0,cr=989,cu=0,mis=0,r=1,dep=0,og=1,plh=23986678,tim=1326599330668198

STAT #46986932266584 id=1 cnt=1 pid=0 pos=1 obj=0 op='SORT AGGREGATE (cr=989 pr=0 pw=0 time=31173 us)'

STAT #46986932266584 id=2 cnt=1 pid=1 pos=1 obj=90724 op='TABLE ACCESS FULL OBJ$ (cr=989 pr=0 pw=0 time=31156 us cost=220 size=18270 card=522)'

WAIT #46986932266584: nam='SQL*Net message from client' ela= 76 driver id=1650815232 #bytes=1 p3=0 obj#=91 tim=1326599330668403

CLOSE #46986932266584:c=0,e=10,dep=0,type=0,tim=1326599330668452

WAIT #0: nam='SQL*Net message to client' ela= 1 driver id=1650815232 #bytes=1 p3=0 obj#=91 tim=1326599330668481

WAIT #0: nam='SQL*Net message from client' ela= 113 driver id=1650815232 #bytes=1 p3=0 obj#=91 tim=1326599330668606

四.對(duì)EXU81JAVT對(duì)象深究

SQL> select object_type from dba_objects where object_name='EXU81JAVT';

OBJECT_TYPE

-------------------

VIEW

SQL> set long 1000

SQL> select TEXT from dba_views where view_name='EXU81JAVT';

TEXT

------------------------------------------------------

SELECT obj#

FROM sys.obj$

WHERE name LIKE '%DbmsJava' AND

type# = 29 AND

owner# = 0 AND

status = 1

SQL> SELECT obj#

2 FROM sys.obj$

3 WHERE name LIKE '%DbmsJava' AND

4 type# = 29 AND

5 owner# = 0 AND

6 status = 1 ;

OBJ#

----------

17671

SQL> select name from obj$ where obj#=17671;

NAME

------------------------------

oracle/aurora/rdbms/DbmsJava

現(xiàn)在穩(wěn)定已經(jīng)定位到,是因?yàn)閑xp判斷是否使用了java,是去找”/oracle/aurora/rdbms/DbmsJava”.這個(gè)對(duì)象的,如果java enabled,那么它就會(huì)使用dbms_java做一些轉(zhuǎn)換,實(shí)際上oracle是查找視圖exu81javt來(lái)確定DbmsJava的。

這里的EXU81JAVT是查詢obj$而是通過(guò)name LIKE ‘%DbmsJava’,導(dǎo)致index不能正常使用,從而使得obj$全表掃描,而obj$有壞塊,從而使得exp在obj$有壞塊的情況下,不能正常執(zhí)行

--------------------------------------ORACLE-DBA----------------------------------------

最權(quán)威、專業(yè)的Oracle案例資源匯總之學(xué)習(xí)筆記:Oracle數(shù)據(jù)庫(kù)壞塊 深入研究obj$壞塊導(dǎo)致exp/expdp不能執(zhí)行原因

與50位技術(shù)專家面對(duì)面20年技術(shù)見(jiàn)證,附贈(zèng)技術(shù)全景圖

總結(jié)

以上是生活随笔為你收集整理的oracle protocol=beq 不可用,学习笔记:Oracle数据库坏块 深入研究obj$坏块导致exp/expdp不能执行原因...的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。