碰到一个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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/4227/viewspace-683788/