Doc ID: Note:1017276.102
Subject: Oracle8i Export Fails on Synonym Export with EXP-00008 and ORA-00904
Type: PROBLEM
Status: PUBLISHED
Content Type: TEXT/PLAIN
Creation Date: 28-AUG-1999
Last Revision Date: 28-JUN-2000
Problem Description:
====================
You are exporting from Oracle 8.1.5. The export is running smoothly until it
begins to export the synonyms, then it returns the following:
Solution: Create Package "DBMS_JAVA" if Java is Enabled
Solution Description:
=====================
Run script "$ORACLE_HOME/javavm/install/initdbj.sql" as internal
in order to create package "DBMS_JAVA", which is required if Java
is enabled.
Solution Explanation:
=====================
Error is returned because export is executing a select statement
which uses the procedure "DBMS_JAVA.LONGNAME".
Using STACKTRACE tracing shows the select statement using the "LONGNAME"
function:
---------
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)
,TABOWN,TABNODE, PUBLIC$, SYNOWN, SYNOWNID, SYNTIME
FROM SYS.EXU8SYN
WHERE SYNOWNID=:1
ORDER BY SYNTIME
The error is because the "DBMS_JAVA.LONGNAME" does not exist. Running the
above script creates the package "DBMS_JAVA" and the "LONGNAME" function.
Solution: Check for Synonym named DBMS_JAVA or DBMS_JAVA_TEST
Solution Description:
=====================
Check for synonyms named DBMS_JAVA and DBMS_JAVA_TEST. If there is a synonym
by either of these names, but there is not a corresponding DBMS_JAVA or
DBMS_JAVA_TEST package, drop the synonym and rerun the export.
Solution Explanation:
=====================
If Java is enabled, synonyms may have a "long" translation, so export uses a
special query that invokes the DBMS_JAVA.LONGNAME function ("SELECT ...
DBMS_JAVA.LONGNAME(SYNNAM) FROM ..."). If the DBMS_JAVA package has not been
installed, this query will fail with and ORA-00904: "invalid column name".
In Oracle 8.1.5, the Export utility tests if Java is enabled by looking for
the synonym "DBMS_JAVA"; if it exists, Oracle assumes Java is enabled; if it
doesn't, Oracle assumes Java is not enabled.
Therefore, this problem will occur if the synonym for DBMS_JAVA exists, but
there is not a corresponding DBMS_JAVA package.
Bookmarks