views:

368

answers:

1

I'm trying to export a schema in an oracle 10 database using the EXP command. Let's call the schema "myschema" and the tns name "mydb" to protect the names of the innocent. Anyway, here's the command line that I'm using

exp myschema/mypassword@mydb file=myschema.dmp grants=y

This works when I try to run an export on other instances, but I get the following error when I try against "mydb".

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user MYSCHEMA
. exporting PUBLIC type synonyms
EXP-00008: ORACLE error 980 encountered
ORA-00980: synonym translation is no longer valid
EXP-00000: Export terminated unsuccessfully

Anybody have any ideas? If any further info is needed let me know and I'll edit this question accordingly.

+1  A: 

This can happen if the JVM installation is corrupted. Try:

SELECT comp_id, schema, status, version, comp_name
  FROM dba_registry
 ORDER BY 1;

If this returns a row with the comp_id of JAVAVM with a status of 'INVALID' you'll need to reinstall the java VM.

Metalink document 276554.1 has the procedure for doing so. If you can recover easily, it might be easier to recreate the database and reload it.

EDIT: I found Oracle-base link where a poster claims this will uninstall and reinstall the JVM (on Unix), I presume it works on windows with slight mods:

(WARNING! You can seriously hose your database if things go wrong here. BACKUP first!)

cd $ORACLE_HOME/javavm/install
sqlplus / as sysdba
@rmjvm.sql
@initjvm.sql

-- Recompile invalid objects
@?/rdbms/admin/utlrp

The metalink note is quite a bit more involved.

DCookie
Hmm... this could be promising. The row for comp_id=JAVAVM indicates "invalid" in the STATUS column, and (null) for the VERSION column (on other instances this row appears as 'valid' with a version number of '10.2.0.3.0'). Do I just reinstall Java at the system-level, or is there a special JVM used by Oracle that I need to install; and if so, how?
NobodyMan
Metalink Document ID 276554.1 has the procedure for doing so. It looks a bit scary. Do you have access to metalink?
DCookie
It's the Oracle component JVM, not the system Java installation.
DCookie
A shot in the dark: perhaps expdp (data pump) might work.
DCookie
No access to metalink I'm afraid, but then again I don't have a shell account to the host system either so I'm guessing I'd be unable perform the steps anyhow. Still this is good advice and I'll pass it on to the dba (I'm just the lowly dev who knows just barely enough to be dangerous). Thanks!
NobodyMan
Well if that's the case, tell your DBA to fix it now that you've researched the problem for him/her :-)
DCookie