exp-00008 ora-00904

一位弟兄做导出时遇到麻烦如下:

$ export ORACLE_SID=ctais
$ exp htjsweb/htjsyfzxweb file=ctais.dmp owner=htjsweb

Export: Release 9.2.0.6.0 - Production on Thu May 29 16:05:33 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)

About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user HTJSWEB
. exporting PUBLIC type synonyms
EXP-00008: ORACLE error 904 encountered
ORA-00904: "DBMS_JAVA"."LONGNAME": invalid identifier
EXP-00000: Export terminated unsuccessfully
$

[@more@]

=====================================LazyDBA上的类似问题=================================================
RE: After 9i upgrade , exports are failing with ORA-00904: "DBMS_JAVA"."LONGNAME" invalid identifier
From: "tpepling" Subject: RE: After 9i upgrade , exports are failing with ORA-00904: "DBMS_JAVA"."LONGNAME" invalid identifier
Date: Mon, 20 Sep 2004 18:08:07 -0400


After running rmjvm.sql , must bounce DB before initjvm.sql can be run.

-----Original Message-----
From: Manmeet
[mailto:oracledba-ezmlmshield-x68395966.[Email address protected]
Sent: Monday, September 20, 2004 6:04 PM
To: LazyDBA Discussion
Subject: Re: After 9i upgrade , exports are failing with ORA-00904:
"DBMS_JAVA"."LONGNAME" invalid identifier

Ganesh , this is a production database . Can I run "rmjvm" and "initjvm"
in open state of the database. Does database needs recycling after this is
done .

Do you think running "rmjvm" alone would solve the problem.

P.S : JVM was not installed in 8.1.7 version.

Thanks in advance...

"Ganesh Raja "
address protected]
ie> cc:
Subject: Re: After 9i
upgrade , exports are failing with ORA-00904:
09/20/2004 03:12 "DBMS_JAVA"."LONGNAME"
invalid identifier
PM


**A LazyDBA.com subscriber has responded to your lazydba.com post**
**LazyDBA.com mail shield has forwarded you this email,
**and removed any attachments, and kept your email address secret
**from this person, and any viruses/trojans.
**If you reply to this email, the person will see your email address as
normal
**Anything below this line is the original email text


Quoting Manmeet

Try to do a rmvjvm and then initjvm again.. That may work sometimes...

~Ganesh

>
> Hi Gurus ,
>
> I need advice on following :
>
>
> After upgrading the production database from 8.1.7.4 to 9i I have
started
> getting following errors doing exports.
>
> [dtoexport 183614] EXP-00008: ORACLE error 904 encountered
> [dtoexport 183614] ORA-00904: "DBMS_JAVA"."LONGNAME": invalid identifier
>
> Another thing I would like to share is the result of a query from
> dba_registry table
>
> select comp_name, version, status from dba_registry
>
>
> COMP_NAME VERSION STATUS
> -------------------- -------------------- -----------
> Oracle9i Catalog Vie 9.2.0.4.0 VALID
> Oracle9i Packages an 9.2.0.4.0 VALID
> JServer JAVA Virtual NULL LOADING
>
>
> Java was not installed on 8.1.7.4 database , As part of the 9.2.0.4
upgrade
> , I tried to install Java by running
> initjvm.sql. The installation was not succesful and i recieved following
> errors.
>
> /*
> create or replace java system
> begin if initjvmaux.startstep('CREATE_JAVA_SYSTEM') then
> *
> ERROR at line 1:
> ORA-29509: incorrectly formed Java binary class definition
> ORA-06512: at "SYS.INITJVMAUX", line 15
> ORA-06512: at line 5
>
>
> Considering , this is a production database , what all can be done to
> rectify this problem
>
> Thanks in advance .....
> Manmeet
>
>
> dtoexport 183614] Export: Release 9.2.0.4.0 - Production on Sun Sep 19
> 17:48:43 2004
> [dtoexport 183614] Copyright (c) 1982, 2002, Oracle Corporation. All
> rights reserved.
> [dtoexport 183614] Connected to: Oracle9i Enterprise Edition Release
> 9.2.0.4.0 - 64bit Production
> [dtoexport 183614] With the Partitioning option
> [dtoexport 183614] JServer Release 9.2.0.4.0 - Production
> [dtoexport 183614] Export done in US7ASCII character set and AL16UTF16
> NCHAR character set
> [dtoexport 183614] About to export the entire database ...
> [dtoexport 183614] . exporting tablespace definitions
> [dtoexport 183614] . exporting profiles
> [dtoexport 183614] . exporting user definitions
> [dtoexport 183614] . exporting roles
> [dtoexport 183614] . exporting resource costs
> [dtoexport 183614] . exporting rollback segment definitions
> [dtoexport 183614] . exporting database links
> [dtoexport 183614] . exporting sequence numbers
> [dtoexport 183614] . exporting directory aliases
> [dtoexport 183614] . exporting context namespaces
> [dtoexport 183614] . exporting foreign function library names
> [dtoexport 183614] . exporting PUBLIC type synonyms
> [dtoexport 183614] EXP-00008: ORACLE error 904 encountered
> [dtoexport 183614] ORA-00904: "DBMS_JAVA"."LONGNAME": invalid identifier
> [dtoexport 183614] EXP-00000: Export terminated unsuccessfully
> [dtoexport 183614] DT-05601F: [exp 136058] Export completed with errors,
> exit status: 1
> [dtoexport 183614] DT-01287E:
> [dtoexport 183614] DT-01287E: *** This program has been terminated.
> [dtoexport 183614] DT-01287E: *** This program did NOT complete
> successfully.
> [dtoexport 183614] DT-01287E:
> [dtobackup 102708] [obsi/networker 162962] networker caught signal 15;
> shutting down networker exiting on signal 15 save:
> /ora00/datatools/catalog/DBP25/dt_full_export_profile_1 62 KB 00:00:40
> 5 files
> [dtobackup 102708] DT-05077W: OBSI completed with error status = '15'
> [dtobackup 102708] DT-05077W: Will send SIGTERM(15) to terminate all
child
> process relating to this task
> Export failed.
>
>
>
>
>
> NOTICE: This confidential e-mail message is only for the intended
> recipient(s). If you are not the intended recipient, be advised that
> disclosing, copying, distributing, or any other use of this message, is
> strictly prohibited. In such case, please destroy this message and notify
> the sender.
>
>
>
>
> --------
> website: http://www.LazyDBA.com
> Please don't reply to RTFM questions
> Oracle documentation is here: http://tahiti.oracle.com
> To unsubscribe: see http://www.lazydba.com/unsubscribe.html
> To subscribe: see http://www.lazydba.com
> By using this list you agree to these terms:
http://www.lazydba.com/legal.html
>
>


--

~ Ganesh


=======================================guoge在oracle817中的解决过程===============================================
Oracle817 export 时ORA-06553和ORA-00904处理

作者:guoge

其实这个问题在开始学Oracle时就已经遇到过了,那个时候胡乱折腾,也忘了是否搞定了。今天和一个朋友一起马马虎虎又处理了类似的问题。
现象:
数据库版本8.1.7
1 .在做数据库导出export时,报
EXP-00008: ORACLE error 6553 encountered
ORA-06553: PLS-561: character set mismatch on value for parameter 'SHORTNAME'

2 .看到SHOTNAME,马上想到DBMS_JAVA这个包。反正我们的系统现在也不需要JAVA,
于是以SYS用户执行:
$ORACLE_HOME/javavm/install/rmjvm.sql
drop package dbms_java;
drop public synonym dbms_java;

删除JAVA

3. 继续执行export,这次报错:
EXP-00008: ORACLE error 904 encountered
ORA-00904: invalid column name

4. 以SYSTEM用户 打开事件904。
alter system set events='904 trace name errorstack';

5。再执行export, 在user_dump_dest目录下生成了一个trace文件

6。关闭事件
alter system set events='904 trace name errorstack off';

7.查看刚生成的trace文件,找到:
ORA-00904: invalid column name
Current SQL statement for this session:
SELECT SYNNAM, DBMS_JAVA.LONGNAME(SYNNAM), DBMS_JAVA.LONGNAME(SYNTAB), TABOWN, TABNODE, PUBLIC$, SYNOWN, SYNOWNID FROM SYS.EXU8SYNU ORDER BY SYNTIME

原来问题还是JAVA 。

8 确定执行了rmjava.sql,但是执行
SELECT count(*) FROM dba_objects WHERE object_type LIKE 'JAVA%';

返回结果就是不为0, 说明java没删除干净。

9. 在oracle8.1.7中,export判断是否使用了java,是去找"/oracle/aurora/rdbms/DbmsJava".这个对象的,如果java enabled,那么它就会使用dbms_java做一些转换,所以应该让oracle找不到DbmsJava。实际上oracle是查找视图exu81javt来确定DbmsJava的。
在catexp.sql中,exu81javt是这样定义的:
CREATE OR REPLACE view exu81javt (objid) AS
SELECT obj#
FROM sys.obj$
WHERE name = 'oracle/aurora/rdbms/DbmsJava'
AND type# = 29
AND owner# = 0
AND status = 1

因此
修改一下:
CREATE OR REPLACE view exu81javt (objid) AS
SELECT obj#
FROM sys.obj$
WHERE name = 'oracle/aurora/rdbms/DbmsJava'
AND type# = 29
AND owner# = 0
AND status = 1
AND 1 = 0 ;
grant select on exu81javt to public
10.再export,问题解决。

============================================================

EXP-00008: ORACLE error 904 encountered的解决方法


【错误情况】

[oracle@ccdevsvr admin]$ exp wmap/pass@jackeydb

export: release 8.1.7.4.0 - production on fri oct 8 11:28:37 2004

(c) copyright 2000 oracle corporation. all rights reserved.


connected to: oracle9i release 9.2.0.1.0 - production
jserver release 9.2.0.1.0 - production
enter array fetch buffer size: 4096 >

export file: expdat.dmp > host

(2)u(sers), or (3)t(ables): (2)u > u

export grants (yes/no): yes >

export table data (yes/no): yes >

compress extents (yes/no): yes >

export done in we8iso8859p1 character set and utf8 nchar character set
server uses zhs16gbk character set (possible charset conversion)
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user wmap
. exporting object type definitions for user wmap
about to export wmaps objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export wmaps tables via conventional path ...
exp-00008: oracle error 904 encountered
ora-00904: "spolicy": invalid identifier
exp-00000: export terminated unsuccessfully
[oracle@ccdevsvr admin]$


【解决方法一】
bookmark go to end

fact: oracle server - enterprise edition
symptom: ora-00904: invalid column name
symptom: exp-00008: oracle error %s encountered
cause: the package is missing, invalid or corrupt

fix:

how to handle ora-00904 errors on export
========================================

when running full database export the following errors will be returned:

exp80 user/password full=y file=d:db-backuporclexporcl.dmp
log=d:db-backuporclexporcl.log consistent=y buffer=40960000

exp-00008: oracle error 904 encountered
ora-00904: invalid column name


to get a clue what has force these ora-00904 message, follow the following
steps:

1. connect as privileged user and run the following command inside an
sqlplus session:

sql> alter system set events=904 trace name errorstack;

-------------------------------- note ------------------------------------

this event will work starting with oracle8i. if running a oracle database
version below oracle8i, youll get ora-02065 errors returned, when
specifying this event. in oracle versions below 8i youll have to insert
the following entry into init.ora

event="904 trace name errorstack"

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

2. retry the full export. when the ora-00904 occurs, a trace file will be
written to the storage location specified by the init.ora parameter
user_dump_dest. as soon as the ora-00904 has been returned to your
export session, you can abort the export and examine the trace information.

3. disable event tracing by running the following command:

sql> alter system set events=904 trace name errorstack off;

on oracle versions below 8.1.5 return the event entry from init.ora

4. examine the trace file:

*** session id:(9.3) 2001.11.21.15.28.00.494
*** 2001.11.21.15.28.00.494
ksedmp: internal or fatal error
ora-00904: invalid column name
current sql statement for this session:
select fname,fsize,maxextend,inc from sys.exu8fil where tsid = :1
===========

a) a problem with object exu8fil has been detected
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
in this example, theres a problem with the exe8fil view. to examine,
whether this object exist, run the following command:

sql> select owner,object_name,object_type,object_id,status
from dba_objects
where object_name=exu8fil;

if the problem is on the exu8fil object you simply can recreate the
object by running the catexp.sql script.

b) a problem with object dbms_java or dbms_java_test
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ksedmp: internal or fatal error
ora-00904: invalid column name
current sql statement for this session:
select synnam, dbms_java.longname(synnam), dbms_java.longname(syntab), ...

on systems where the java server has been installed the trace file could
contain information on a failing select statement on dbms_java packages.

for reference on fixing errors relating to dbms_java, please follow
<1017276.102>.
【解决方法二】
if this error (ora-904 invalid column name) occurs after applying a patch, this would probably fix the problem.
1. first, run catexp as internal. then retry the export. often times this will fix the problem and then export will run without error. the reason being a problem with object exu8fil view has been detected.
to examine, whether this object exist, run the following command:
sql> select owner,object_name,object_type,object_id,status
from dba_objects
where object_name=exu8fil;
if the problem is on the exu8fil object you simply can recreate the object by running the catexp.sql script. 1017276.102>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/271063/viewspace-1004819/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/271063/viewspace-1004819/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值