Oracle8i匯出出現EXP-8錯誤

yangtingkun發表於2011-01-13

碰到一個BUG,在8i資料庫中執行匯出出現了這個問題。

 

 

詳細錯誤資訊為:

C:\>exp system/manager@orcl file=c:\xxx\gufj.dmp wner=gufj rows=n

Export: Release 8.1.7.4.1 - Production on Wed Jan 12 11:57:38 2011

(c) Copyright 2000 Oracle Corporation.  All rights reserved.


Connected to: Oracle8i Enterprise Edition Release 8.1.7.4.1 - Production
With the Partitioning option
JServer Release 8.1.7.4.1 - Production
Export done in US7ASCII character set and ZHS16GBK NCHAR character set
Note: table data (rows) will not be exported

About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user GUFJ
. exporting object type definitions for user GUFJ
About to export GUFJ's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export GUFJ's tables via Conventional Path ...
. . exporting table          CLINIC_ITEM_DICT_COMM
. . exporting table          CLINIC_ITEM_DICT_COPY
. . exporting table     CLINIC_ITEM_NAME_DICT_COMM
. . exporting table     CLINIC_ITEM_NAME_DICT_COPY
.
.
.
. . exporting table                         S_FILE
. . exporting table                 TAKE_DRUG_DICT
. . exporting table       TREAT_PROJECT_ITEMS_2007
. . exporting table      TREAT_PROJECT_MASTER_2007
. exporting synonyms
EXP-00008: ORACLE error 904 encountered
ORA-00904: invalid column name
EXP-00000: Export terminated unsuccessfully

查詢metalink發現是由於沒有安裝JAVA選項,但是存在指向DBMS_JAVA包的同義詞,因此導致匯出過程失敗。Oracle在文件ID 1017276.102描述了這個問題。

可以透過徹底解除安裝java來解決這個問題:

C:\>sqlplus /nolog

SQL*Plus: Release 8.1.7.0.0 - Production on Wed Jan 12 11:59:12 2011

(c) Copyright 2000 Oracle Corporation.  All rights reserved.

SQL> conn /@orcl as sysdba
Connected.
SQL> @?/javavm/install/rmjvm.sql

PL/SQL procedure successfully completed.


JVMRMACTION
--------------------------------
FULL_REMOVAL

drop role javauserpriv
begin if :jvmrmaction = 'FULL_REMOVAL' then
*
ERROR at line 1:
ORA-29540: class oracle/aurora/mts/http/security/RdbmsHttpPolicy does not exist
ORA-06512: at "SYS.INITJVMAUX", line 17
ORA-06512: at line 3

 

PL/SQL procedure successfully completed.

  dbms_java.aurora_shutdown();
  *
ERROR at line 8:
ORA-06550: line 8, column 3:
PLS-00201: identifier 'DBMS_JAVA.AURORA_SHUTDOWN' must be declared
ORA-06550: line 8, column 3:
PL/SQL: Statement ignored


drop package get_error$
drop public synonym get_error$
drop trigger AURORA$SERVER$SHUTDOWN
drop trigger AURORA$SERVER$STARTUP
drop package sqljutl

PL/SQL procedure successfully completed.


JVMRMACTION
--------------------------------
FULL_REMOVAL

drop package dbms_java
drop PUBLIC SYNONYM dbms_java
drop FUNCTION dbj_long_name
drop function "NameFromLastDDL"
drop PUBLIC SYNONYM "NameFromLastDDL"
drop FUNCTION dbj_short_name
drop PUBLIC SYNONYM dbj_short_name

PL/SQL procedure successfully completed.


JVMRMACTION
--------------------------------
FULL_REMOVAL

    select SEQ from dba_java_policy where GRANTEE = 'JAVA_DEPLOY' ;
                    *
ERROR at line 6:
ORA-06550: line 6, column 21:
PLS-00201: identifier 'DBA_JAVA_POLICY' must be declared
ORA-06550: line 6, column 5:
PL/SQL: SQL Statement ignored
ORA-06550: line 6, column 12:
PLS-00320: the declaration of the type of this expression is incomplete or
malformed
ORA-06550: line 11, column 5:
PL/SQL: SQL Statement ignored
ORA-06550: line 14, column 5:
PLS-00201: identifier 'DBMS_JAVA.DISABLE_PERMISSION' must be declared
ORA-06550: line 14, column 5:
PL/SQL: Statement ignored
ORA-06550: line 15, column 5:
PLS-00201: identifier 'DBMS_JAVA.DELETE_PERMISSION' must be declared
ORA-06550: line 15, column 5:
PL/SQL: Statement ignored


drop TABLE java$policy$shared$table
drop ROLE java_deploy
begin if :jvmrmaction = 'FULL_REMOVAL' or :jvmrmaction = 'DOWNGRADE_8.1.7_TO_8.1
.6' then
*
ERROR at line 1:
ORA-29540: class oracle/aurora/mts/http/security/RdbmsHttpPolicy does not exist
ORA-06512: at "SYS.INITJVMAUX", line 17
ORA-06512: at line 4


drop TABLE java$policy$
drop SEQUENCE java$policy$sequence$
drop VIEW dba_java_policy
drop PUBLIC SYNONYM dba_java_policy
drop VIEW user_java_policy
drop PUBLIC SYNONYM user_java_policy
drop ROLE java_admin
begin if :jvmrmaction = 'FULL_REMOVAL' or :jvmrmaction = 'DOWNGRADE_8.1.6_TO_8.1
.5' then
*
ERROR at line 1:
ORA-29540: class oracle/aurora/mts/http/security/RdbmsHttpPolicy does not exist
ORA-06512: at "SYS.INITJVMAUX", line 17
ORA-06512: at line 9

 

PL/SQL procedure successfully completed.


JVMRMACTION
--------------------------------
FULL_REMOVAL

drop package JAVA_XA
drop PUBLIC SYNONYM JAVA_XA

PL/SQL procedure successfully completed.

alter rollback segment monster offline
drop rollback segment monster
create rollback segment monster storage (initial 100 k next 100 k maxextents
unlimited)
alter rollback segment monster online
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
drop synonyms with java targets
delete from java$rmjvm$aux2
insert into  java$rmjvm$aux2 (select o1.name from obj$ o1,obj$ o2 where
o1.type#=5 and o1.name=o2.name and o2.type#=29)
flush shared_pool
set transaction use rollback segment MONSTER
delete from dependency$
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
delete from error$
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
delete from objauth$
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
delete from javasnm$
set transaction use rollback segment MONSTER
delete from idl_ub1$
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
delete from idl_ub2$
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
delete from idl_char$
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
delete from idl_sb4$
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
delete from obj$
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
set transaction use rollback segment MONSTER
All java objects removed
alter rollback segment monster offline
drop rollback segment monster
flush shared_pool

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.

SQL>

再次執行匯出,問題解決:

SQL> exit
Disconnected from Oracle8i Enterprise Edition Release 8.1.7.4.1 - Production
With the Partitioning option
JServer Release 8.1.7.4.1 - Production

C:\>exp system/manager@orcl file=c:\xxx\gufj.dmp wner=gufj rows=n

Export: Release 8.1.7.4.1 - Production on Wed Jan 12 12:07:32 2011

(c) Copyright 2000 Oracle Corporation.  All rights reserved.


Connected to: Oracle8i Enterprise Edition Release 8.1.7.4.1 - Production
With the Partitioning option
JServer Release 8.1.7.4.1 - Production
Export done in US7ASCII character set and ZHS16GBK NCHAR character set
Note: table data (rows) will not be exported

About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user GUFJ
. exporting object type definitions for user GUFJ
About to export GUFJ's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export GUFJ's tables via Conventional Path ...
. . exporting table          CLINIC_ITEM_DICT_COMM
. . exporting table          CLINIC_ITEM_DICT_COPY
. . exporting table     CLINIC_ITEM_NAME_DICT_COMM
. . exporting table     CLINIC_ITEM_NAME_DICT_COPY
.
.
.
. . exporting table                         S_FILE
. . exporting table                 TAKE_DRUG_DICT
. . exporting table       TREAT_PROJECT_ITEMS_2007
. . exporting table      TREAT_PROJECT_MASTER_2007
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting snapshots
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully without warnings.

Oracle沒有將這個問題歸類到bug中,但個人認為這顯然屬於bug的範疇,因為指向DBMS_JAVA的同義詞也是Oracle在安裝過程中自動建立的。

 

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

相關文章