ORA-31600錯誤分析

xinxinhg發表於2005-01-16

作者:guoge

[@more@]今天在對9i資料庫做export時,出現如下錯誤:
E:>exp system/manager file=backbill.dmp owner=backbill
Export: Release 9.2.0.4.0 - Production on Thu Nov 18 14:42:11 2004
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user BACKBILL
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user BACKBILL
About to export BACKBILL's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
EXP-00056: ORACLE error 31600 encountered
ORA-31600: invalid input value EMIT_SCHEMA for parameter NAME in function SET_TR
ANSFORM_PARAM
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.DBMS_METADATA_INT", line 3926
ORA-06512: at "SYS.DBMS_METADATA_INT", line 4050
ORA-06512: at "SYS.DBMS_METADATA", line 836
ORA-06512: at line 1
EXP-00000: Export terminated unsuccessfully

出現這個問題我也不知道應該怪我還是怪Oracle。其實這個問題原因和解決方法很簡單。
 
我是先安裝oracle9.0.2.1,然後安裝9.0.2.4補丁,再建立資料庫,我以為這樣在建立資料庫時就會執行9.0.2.4的指令碼,也就沒看補丁的README。
其實文件裡要求在安裝補丁之後,再執行catpatch.sql指令碼。
 
當然上面的問題解決也很簡單,就是執行catpatch.sql指令碼就可以了。具體過程如下:
1. shutdown immedaite
2. startup migrate
3 @ ?rdbmsadmincatpatch
4. shutdown immedaite
5. startup
 
需要說明的是: 這種ORA-31600問題只有在給資料庫打補丁時才會出現,不打補丁的9i不會出現。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/166555/viewspace-787162/,如需轉載,請註明出處,否則將追究法律責任。