标签云
asm恢复 bbed bootstrap$ dul kcbzib_kcrsds_1 kccpb_sanity_check_2 kcratr_nab_less_than_odr MySQL恢复 obet ORA-00312 ORA-00704 ORA-00742 ORA-01110 ORA-01200 ORA-01555 ORA-01578 ORA-01595 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-600 kcratr_nab_less_than_odr ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 ORACLE恢复 Oracle 恢复 ORACLE数据库恢复 oracle碎片 OSD-04016 YOUR FILES ARE ENCRYPTED 比特币加密文章分类
- MongoDB (1)
- MongoDB恢复 (1)
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (112)
- 数据库 (1,884)
- DB2 (22)
- MySQL (82)
- Oracle (1,709)
- Data Guard (53)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (168)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (73)
- Oracle Bug (8)
- Oracle RAC (56)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (29)
- Oracle备份恢复 (662)
- Oracle安装升级 (108)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (91)
- PostgreSQL (37)
- pdu工具 (7)
- PostgreSQL恢复 (13)
- SQL Server (34)
- SQL Server恢复 (14)
- TimesTen (7)
- 达梦数据库 (5)
- 达梦恢复 (3)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (51)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (34)
- MongoDB (1)
-
最近发表
- 记录19c ASM磁盘掉线触发ORA-59048故障处理
- aix平台Oracle数据库由于断电无法启动故障处理
- 断电引起ORA-600 3005故障处理
- 记录一次云存储资源到期之后引起的数据库恢复
- Firebird 损坏数据库数据抢救工具—firebirdext
- Oracle 19c 202610补丁(RUs+OJVM)-19.33
- 由于con$.con#值达到极限,触发数据库增加约束报ORA-600 12807错误
- MongoDB 离线提取工具—mongoext
- .bres勒索病毒加密数据库dmp文件可恢复
- ORA-600 krsm_mrp_rebuild_lf_list.lno_mismatch
- 记录一次0丢失的ORA-00354: 损坏重做日志块标头故障恢复
- 不当数据库恢复操作导致一个月数据丢失
- obet快速修复oracle 位图损坏块
- 不太常见的10.2.0.1的oracle redo损坏恢复
- obet forcecopy功能抢救硬件故障中的数据文件
- kcratr_nab_less_than_odr和system坏块故障处理
- 通过obet 恢复system坏块,打开数据库
- obet dbv功能完整说明
- 分享一例运行在aix上的sap系统数据库恢复过程
- OBET-Oracle Block Editor Tool使用说明
分类目录归档:数据库
expdp遭遇ORA-39006/ORA-39213故障解决
expdp导出数据遇到ORA-39006/ORA-39213错误,通过执行执行dbms_metadata_util.load_stylesheets解决
expdp工作异常
--导出awr信息 SQL> @?/rdbms/admin/awrextr.sql ………… Exception encountered in AWR_EXTRACT ORA-39006: internal error ORA-39213: Metadata processing is not available begin * ERROR at line 1: ORA-31623: a job is not attached to this session via the specified handle ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79 ORA-06512: at "SYS.DBMS_DATAPUMP", line 911 ORA-06512: at "SYS.DBMS_DATAPUMP", line 4710 ORA-06512: at "SYS.DBMS_SWRF_INTERNAL", line 656 ORA-06512: at "SYS.DBMS_SWRF_INTERNAL", line 962 ORA-06512: at line 3 --导出一个表 $ expdp "'/ as sysdba'" dumpfile=xifenfei.dmp tables=scott.t_xifenfei Export: Release 10.2.0.1.0 - 64bit Production on Wednesday, 31 October, 2012 13:03:20 Copyright (c) 2003, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options ORA-39006: internal error ORA-39213: Metadata processing is not available
错误提示
$ oerr ora 39006 39006, 00000, "internal error" // *Cause: An unexpected error occurred while processing a Data Pump job. // Subsequent messages supplied by DBMS_DATAPUMP.GET_STATUS // will further describe the error. // *Action: Contact Oracle Customer Support. $ oerr ora 39213 39213, 00000, "Metadata processing is not available" // *Cause: The Data Pump could not use the Metadata API. Typically, // this is caused by the XSL stylesheets not being set up properly. // *Action: Connect AS SYSDBA and execute dbms_metadata_util.load_stylesheets // to reload the stylesheets.
解决ORA-39006/ORA-39213问题
--查询数据库已经安装组件 SQL> col COMP_NAME for a35 SQL> select comp_name, version, status from dba_registry; COMP_NAME VERSION STATUS ----------------------------------- ------------------------------ ---------------------- Oracle Database Catalog Views 10.2.0.1.0 VALID Oracle Database Packages and Types 10.2.0.1.0 VALID Oracle Workspace Manager 10.2.0.1.0 VALID JServer JAVA Virtual Machine 10.2.0.1.0 VALID Oracle XDK 10.2.0.1.0 VALID Oracle Database Java Packages 10.2.0.1.0 VALID Oracle Expression Filter 10.2.0.1.0 VALID Oracle Data Mining 10.2.0.1.0 VALID Oracle Text 10.2.0.1.0 VALID Oracle XML Database 10.2.0.1.0 VALID Oracle Rules Manager 10.2.0.1.0 VALID Oracle interMedia 10.2.0.1.0 VALID OLAP Analytic Workspace 10.2.0.1.0 VALID Oracle OLAP API 10.2.0.1.0 VALID OLAP Catalog 10.2.0.1.0 VALID Spatial 10.2.0.1.0 VALID Oracle Enterprise Manager 10.2.0.1.0 VALID 17 rows selected. --如果缺少下面组件,使用下面对应的程序安装 Oracle Database Catalog Views Oracle Database Packages and Types JServer JAVA Virtual Machine Oracle XDK Oracle Database Java Packages --使用下面脚本安装(根据组件选择) SQL> connect / as sysdba SQL> @$ORACLE_HOME/javavm/install/initjvm.sql SQL> connect / as sysdba SQL> @$ORACLE_HOME/xdk/admin/initxml.sql SQL> connect / as sysdba SQL> @$ORACLE_HOME/rdbms/admin/catjava.sql SQL> connect / as sysdba SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql --执行sys.dbms_metadata_util.load_stylesheets SQL> execute sys.dbms_metadata_util.load_stylesheets; PL/SQL procedure successfully completed.
测试expdp导出
$ expdp "'/ as sysdba'" dumpfile=xifenfei.dmp tables=scott.t_xifenfei Directory=AWR_DIR Export: Release 10.2.0.1.0 - 64bit Production on Wednesday, 31 October, 2012 14:18:04 Copyright (c) 2003, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options Starting "SYS"."SYS_EXPORT_TABLE_01": '/******** AS SYSDBA' dumpfile=xifenfei.dmp tables=scott.t_xifenfei Directory=AWR_DIR Estimate in progress using BLOCKS method... Processing object type TABLE_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 7 MB Processing object type TABLE_EXPORT/TABLE/TABLE . . exported "SCOTT"."T_XIFENFEI" 5.374 MB 57376 rows Master table "SYS"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SYS.SYS_EXPORT_TABLE_01 is: /data/enmotech/xifenfei.dmp Job "SYS"."SYS_EXPORT_TABLE_01" successfully completed at 14:18:11
测试证明,在不缺少相关组件的情况下,使用dbms_metadata_util.load_stylesheets可以解决expdp导出报ORA-39006/ORA-39213错误;如果缺少组件,需要先安装对应组件,然后再执行dbms_metadata_util.load_stylesheets解决该问题
dual 缺少同义词故障解决
在最近的一个客户案例中,因为缺少dual同义词,导致ddl语句无法执行。这里_system_trig_enabled参数和upgrade模式两种来解决该问题,整体上来说_system_trig_enabled不用重启数据库终止业务,更加人性化.
缺少dual同义词后果
SQL> create table t_xifenfei_dual as
2 select * from dba_objects;
select * from dba_objects
*
ERROR at line 2:
ORA-00604: error occurred at recursive SQL level 1
ORA-00942: table or view does not exist
SQL> alter session set events '942 trace name errorstack level 3';
Session altered.
SQL> create table t_xifenfei_dual as select * from dba_objects;
create table t_xifenfei_dual as select * from dba_objects
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00942: table or view does not exist
--trace文件
*** 2012-09-29 12:37:05.156
ksedmp: internal or fatal error
ORA-00942: table or view does not exist
Current SQL statement for this session:
select dummy from dual where ora_dict_obj_type = 'SYNONYM'
AND ora_dict_obj_owner = 'PUBLIC'
--dual 对象
SQL> select object_type,owner from dba_objects where object_name='DUAL';
OBJECT_TYPE OWNER
------------------- ------------------------------
TABLE SYS
尝试重建同义词
SQL> create public synonym dual for dual; create public synonym dual for dual * ERROR at line 1: ORA-00604: error occurred at recursive SQL level 1 ORA-00942: table or view does not exist
_system_trig_enabled参数
SQL> select a.ksppinm name,b.ksppstvl value,a.ksppdesc description
2 from x$ksppi a,x$ksppcv b
3 where a.inst_id = USERENV ('Instance')
4 and b.inst_id = USERENV ('Instance')
5 and a.indx = b.indx
6 and upper(a.ksppinm) LIKE upper('%¶m%')
7 order by name
8 /
Enter value for param: SYSTEM_TRIG_ENABLED
old 6: and upper(a.ksppinm) LIKE upper('%¶m%')
new 6: and upper(a.ksppinm) LIKE upper('%SYSTEM_TRIG_ENABLED%')
NAME VALUE DESCRIPTION
-------------------------------- ------------------------ -----------------------------
_system_trig_enabled TRUE are system triggers enabled
设置_SYSTEM_TRIG_ENABLED重建dual同义词
SQL> ALTER SYSTEM SET "_SYSTEM_TRIG_ENABLED"=FALSE SCOPE=MEMORY; System altered. SQL> create public synonym dual for dual; Synonym created. SQL> ALTER SYSTEM SET "_SYSTEM_TRIG_ENABLED"=true SCOPE=MEMORY; System altered.
使用upgrade模式创建
SQL> drop PUBLIC SYNONYM dual; Synonym dropped. SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 318767104 bytes Fixed Size 1267236 bytes Variable Size 109054428 bytes Database Buffers 201326592 bytes Redo Buffers 7118848 bytes Database mounted. Database opened. SQL> create public synonym dual for dual; create public synonym dual for dual * ERROR at line 1: ORA-00604: error occurred at recursive SQL level 1 ORA-00942: table or view does not exist SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup upgrage; SP2-0714: invalid combination of STARTUP options SQL> startup upgrape; SP2-0714: invalid combination of STARTUP options SQL> startup upgrade ORACLE instance started. Total System Global Area 318767104 bytes Fixed Size 1267236 bytes Variable Size 109054428 bytes Database Buffers 201326592 bytes Redo Buffers 7118848 bytes Database mounted. Database opened. SQL> create public synonym dual for dual; Synonym created. SQL> startup force ORACLE instance started. Total System Global Area 318767104 bytes Fixed Size 1267236 bytes Variable Size 109054428 bytes Database Buffers 201326592 bytes Redo Buffers 7118848 bytes Database mounted. Database opened.
类此9430ms (rw) file: kct.c line: 7800 count: 13 total: 26874ms time: 1296124原因分析
ckpt进程的trace文件中出现类似:9430ms (rw) file: kct.c line: 7800 count: 13 total: 26874ms time: 1296124
ckpt进程的trace文件中报如下错误
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options ORACLE_HOME = /oradb/11.2.0/db System name: AIX Node name: offondb2 Release: 1 Version: 6 Machine: 00CC83664C00 Instance name: offon2 Redo thread mounted by this instance: 2 Oracle process number: 20 Unix process pid: 19660878, image: oracle@offondb2 (CKPT) *** 2012-10-26 13:25:00.971 1: 9430ms (rw) file: kct.c line: 7800 count: 13 total: 26874ms time: 1296124 2: 1777ms (rw) file: krse.c line: 1800 count: 164 total: 122140ms time: 364176 3: 1450ms (rw) file: kct.c line: 1011 count: 1 total: 1450ms time: 1594117 4: 1230ms (rw) file: kcrf.c line: 10012 count: 135 total: 90995ms time: 2630737 5: 1173ms (ro) file: kcrr.c line: 3525 count: 13 total: 8842ms time: 3645916 6: 890ms (rw) file: kcrf.c line: 9959 count: 8 total: 4812ms time: 3578222 7: 830ms (ro) file: kcf.c line: 5306 count: 1 total: 830ms time: 1594116 8: 677ms (rw) file: kcv.c line: 11783 count: 8 total: 4499ms time: 416869 Control file enqueue hold time tracking dump at time: 2092019 *** 2012-10-26 15:25:14.789 1: 9430ms (rw) file: kct.c line: 7800 count: 13 total: 26874ms time: 1296124 2: 1777ms (rw) file: krse.c line: 1800 count: 165 total: 122832ms time: 364176 3: 1450ms (rw) file: kct.c line: 1011 count: 1 total: 1450ms time: 1594117 4: 1230ms (rw) file: kcrf.c line: 10012 count: 135 total: 90995ms time: 2630737 5: 1173ms (ro) file: kcrr.c line: 3525 count: 13 total: 8842ms time: 3645916 6: 890ms (rw) file: kcrf.c line: 9959 count: 8 total: 4812ms time: 3578222 7: 830ms (ro) file: kcf.c line: 5306 count: 1 total: 830ms time: 1594116 8: 677ms (rw) file: kcv.c line: 11783 count: 8 total: 4499ms time: 416869
原因分析并解决
New controlfile enqueue hold time tracking statistics have been added in 11.2 to aid diagnosis of controlfile transaction related performance related issues. To disable the trace set _controlfile_enqueue_holding_time_tracking_size to 0: - spfile alter system set "_controlfile_enqueue_holding_time_tracking_size"=0 scope=spfile; - pfile _controlfile_enqueue_holding_time_tracking_size=0 A database restart is required.
查询_controlfile_enqueue_holding_time_tracking_size
SQL> col name for a32
SQL> col value for a24
SQL> col description for a70
SQL> set linesize 150
SQL> select a.ksppinm name,b.ksppstvl value,a.ksppdesc description
2 from x$ksppi a,x$ksppcv b
3 where a.inst_id = USERENV ('Instance')
4 and b.inst_id = USERENV ('Instance')
5 and a.indx = b.indx
6 and upper(a.ksppinm) LIKE upper('%¶m%')
7 order by name
8 /
Enter value for param: _controlfile_enqueue_holding_time_tracking_size
old 6: and upper(a.ksppinm) LIKE upper('%¶m%')
new 6: and upper(a.ksppinm) LIKE upper('%_controlfile_enqueue_holding_time_tracking_size%')
</strong>
NAME VALUE DESCRIPTION
-------------------------------- ---------- ------------------------------------------------
_controlfile_enqueue_holding_tim 10 control file enqueue holding time tracking size
e_tracking_size
补充MOS说明[791417.1]
New controlfile enqueue hold time tracking statistics have been added in 11.2 to aid diagnosis of controlfile transaction related performance related issues: Control File Enqueue AWR Statistics: max cf enq hold time - The maximum amount of time in milliseconds a client has held the control file enqueue. total cf enq hold time - The total amount of time in milliseconds all clients have held the control file enqueue. total number of cf enq holders - The total number of times clients have held the control file enqueue. Periodically, the CKPT process dumps statistics for the top N control file enqueue holders. N defaults to 10, but can be modified with the static hidden parameter: _controlfile_enqueue_holding_time_tracking_size.The dump looks like the following: Preface: "Control file enqueue hold time tracking dump at time: [relative time]". a. Time the client has held the control file enqueue. b. Type of client's control file enqueue transaction - rw or ro. c. File name where the client obtained control file enqueue. d. Line number where the client obtained control file enqueue. e. Number of times the client has held the control file enqueue since it became a member of the top N. f. Total time the client has held the control file in all those times from [e]. g. Relative time the client obtained the control file enqueue from [a].
发表在 Oracle
评论关闭

加我微信(17813235971)
加我QQ(107644445)

