Home » RDBMS Server » Server Utilities » expdp JAVA_CLASS (Oracle 11g)
expdp JAVA_CLASS [message #603299] Fri, 13 December 2013 03:54 Go to next message
prashanthgs
Messages: 83
Registered: May 2005
Location: chennai
Member
Hi,

I want to export JAVA_CLASS of sys schema using Data Pump.

I have tried with below syntax but it got failed.

expdp dumpfile=javaclass.dmp logfile=javaclassbkp.log directory=VELEXP schemas=OWBOWN include=JAVA_CLASS

Export: Release 11.2.0.1.0 - Production on Fri Dec 13 03:46:40 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

Username: / as sysdba

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYS"."SYS_EXPORT_SCHEMA_01": /******** AS SYSDBA dumpfile=javaclass.dmp logfile=javaclassbkp.log directory=VELEXP schemas=OWBOWN include=JAVA_CLASS
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 0 KB
ORA-39165: Schema OWBOWN was not found.
ORA-39168: Object path JAVA_CLASS was not found.
ORA-31655: no data or metadata objects selected for job
Job "SYS"."SYS_EXPORT_SCHEMA_01" completed with 3 error(s) at 03:46:51

Could any one please tell me whether its possible to export the JAVA_CLASS and if so whats the syntax (all and specfifying only that java class).

Thanks
Prash
Re: expdp JAVA_CLASS [message #603302 is a reply to message #603299] Fri, 13 December 2013 04:15 Go to previous messageGo to next message
martijn
Messages: 278
Registered: December 2006
Location: Netherlands
Senior Member
SQL> !oerr ora 39165
39165, 00000, "Schema %s was not found."
// *Cause:  If exporting or importing over the network, either the user 
//          specified a schema name that was not found in the source database 
//          or else the user lacked the proper EXP_FULL_DATABASE or 
//          IMP_FULL_DATABASE role that would allow them to access another
//          schema.  For importing from files, the user specified a schema
//          name not found in the dump file set.
// *Action: Retry the operation using the correct schema name.

SQL>


Are you sure you are exporting a valid schema?
Re: expdp JAVA_CLASS [message #603303 is a reply to message #603302] Fri, 13 December 2013 04:18 Go to previous messageGo to next message
prashanthgs
Messages: 83
Registered: May 2005
Location: chennai
Member
Thanks for your quick reply. Yes..Its located in SYS schema only.

I am trying to perform expdp using sys user only.

Thanks
Re: expdp JAVA_CLASS [message #603310 is a reply to message #603303] Fri, 13 December 2013 04:40 Go to previous messageGo to next message
martijn
Messages: 278
Registered: December 2006
Location: Netherlands
Senior Member
prashanthgs wrote on Fri, 13 December 2013 11:18
Thanks for your quick reply. Yes..Its located in SYS schema only.

I am trying to perform expdp using sys user only.

Thanks

I'm a little confused now. Yor command is :
expdp dumpfile=javaclass.dmp logfile=javaclassbkp.log directory=VELEXP schemas=OWBOWN include=JAVA_CLASS

This indicates that you are exporting the schema OWBOWN.
However the first error I see is :
ORA-39165: Schema OWBOWN was not found.

Do you see the insconsistency?

[Updated on: Fri, 13 December 2013 04:41]

Report message to a moderator

Re: expdp JAVA_CLASS [message #603312 is a reply to message #603310] Fri, 13 December 2013 04:47 Go to previous messageGo to next message
prashanthgs
Messages: 83
Registered: May 2005
Location: chennai
Member
Sorry, I was wrong.

I will provide the correct syntax which I was doing.

----expdp file=abc.dmp logfile=dkj.log directory=XLS_DIR schemas=MDSYS include=JAVA_CLASS---

Schema MDSYS is present in the database and it contains JAVA CLASS too. But still I am getting error like below.

expdp file=abc.dmp logfile=dkj.log directory=XLS_DIR schemas=MDSYS include=JAVA_CLASS

Export: Release 11.2.0.3.0 - Production on Fri Dec 13 04:42:38 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

Username: / as sysdba

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Legacy Mode Active due to the following parameters:
Legacy Mode Parameter: "file=abc.dmp" Location: Command Line, Replaced with: "dumpfile=abc.dmp"
Legacy Mode has set reuse_dumpfiles=true parameter.
Starting "SYS"."SYS_EXPORT_SCHEMA_01": /******** AS SYSDBA dumpfile=abc.dmp logfile=dkj.log directory=XLS_DIR schemas=MDSYS include=JAVA_CLASS reuse_dumpfiles=true
Estimate in progress using BLOCKS method...
Total estimation using BLOCKS method: 0 KB
ORA-39165: Schema MDSYS was not found.
ORA-39168: Object path JAVA_CLASS was not found.
ORA-31655: no data or metadata objects selected for job
Job "SYS"."SYS_EXPORT_SCHEMA_01" completed with 3 error(s) at 04:42:47


Re: expdp JAVA_CLASS [message #603323 is a reply to message #603312] Fri, 13 December 2013 05:26 Go to previous messageGo to next message
martijn
Messages: 278
Registered: December 2006
Location: Netherlands
Senior Member
Ah ok......

From this documentaion page:
Quote:

Note:
Several system schemas cannot be exported because they are not user schemas; they contain Oracle-managed data and metadata. Examples of system schemas that are not exported include SYS, ORDSYS, and MDSYS.
Re: expdp JAVA_CLASS [message #603325 is a reply to message #603312] Fri, 13 December 2013 05:31 Go to previous messageGo to next message
cookiemonster
Messages: 10961
Registered: September 2008
Location: Rainy Manchester
Senior Member
Oracle isn't known to get these things wrong. If it says MDSYS can't be found then I would assume it's not there.
Are you sure you're logged into the correct DB.
If you do sqlplus / as sysdba from the command prompt can you then see MDSYS in the list of users in dba_users?
Re: expdp JAVA_CLASS [message #603326 is a reply to message #603325] Fri, 13 December 2013 05:31 Go to previous messageGo to next message
cookiemonster
Messages: 10961
Registered: September 2008
Location: Rainy Manchester
Senior Member
Or it's what martijn just pointed out.
Re: expdp JAVA_CLASS [message #603374 is a reply to message #603326] Sat, 14 December 2013 09:34 Go to previous message
prashanthgs
Messages: 83
Registered: May 2005
Location: chennai
Member
Thanks for the replies.

Yes you are right. We cant take JAVA CLASS backup of SYS (including MDSYS user). I tried for other user and it worked fine.
Previous Topic: IMPDP in Oracle 11g
Next Topic: multi copy of dump file using exp
Goto Forum:
  


Current Time: Wed Sep 17 16:38:58 CDT 2014

Total time taken to generate the page: 0.14830 seconds