Friday, July 26, 2013

Reset OC4J Password

Retset  OC4J instance password
1.      Log into the Application Sever
2.      CD E:\oracle\ora10gASR3\j2ee\instance_name\config
3.      Edit system-jazn-data.xml with text editor

Locate OC4Jadmin and update credentials line

  <name>oc4jadmin</name>
  <display-name>OC4J Administrator</display-name>
  <guid>625FCC40BD5811DDBFD58391AB1EFB4C</guid>
  <description>OC4J Administrator</description>                                                                           
<credentials>{903}twsacWylQXKUDa42787BEBCEEcAnFuWy2NmHarVEBHM=</credentials>

With new password

</credentials>!new_password_321</credentials>

- The exclamation point ensures that the password will be encrypted in the configuration file.

  1. Save your changes and exit the system-jazn-data.xml file

5.       Restart the instance
$ORACLE_HOME/opmn/bin/opmnctl shutdown
$ORACLE_HOME/opmn/bin/opmnctl startall

OR

Restart the instance separately  

$ORACLE_HOME/opmn/bin/opmnctl restartproc process-type=home
$ORACLE_HOME/opmn/bin/opmnctl restartproc process-type=oc4j_soa
$ORACLE_HOME/opmn/bin/opmnctl restartproc process-type=HTTP_Server

Wednesday, July 17, 2013

Full DB Export Failing With EXP-00008: ORA-01031 and ORA-06512: EXP-00085:

Error while Full DB Export:

. exporting post-schema procedural objects and actions
EXP-00008: ORACLE error 1031 encountered
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_SCHED_MAIN_EXPORT", line 2296
ORA-06512: at "SYS.DBMS_SCHED_JOB_EXPORT", line 52
ORA-06512: at line 1
EXP-00085: The previous problem occurred when calling SYS.DBMS_SCHED_JOB_EXPORT.grant_exp for object 358534
EXP-00008: ORACLE error 1031 encountered
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_SCHED_MAIN_EXPORT", line 2296
ORA-06512: at "SYS.DBMS_SCHED_JOB_EXPORT", line 52
ORA-06512: at line 1EXP-00085: The previous problem occurred when calling SYS.DBMS_SCHED_JOB_EXPORT.grant_exp for object 358535
EXP-00008: ORACLE error 1031 encountered
ORA-01031: insufficient privilegesORA-06512: at "SYS.DBMS_SCHED_MAIN_EXPORT", line 2296
ORA-06512: at "SYS.DBMS_SCHED_JOB_EXPORT", line 52
ORA-06512: at line 1EXP-00085: The previous problem occurred when calling SYS.DBMS_SCHED_JOB_EXPORT.grant_exp for object 358533.
. exporting user history table


Cause:
OCM jobs ORACLE_OCM Job MGMT_CONFIG_JOB scheduled to be running at the same time, hence export is failing. The scheduled jobs are interrupting the export completion. Oracle was able to identify this from their internal document(not available to outside users).

Solution:
SQL> select object_name, object_type, status from dba_objects where object_id in (358534,358535,358533);

-- see if this returns any rows or not. For me it did not return any values, this means that the objects with IDs 358534, 358535, 358533 do not exist in DBA_OBJECTS 

Check the owner of the jobs with statement:
connect / as sysdba
select owner, job_name, state, next_run_date, last_start_date, last_run_duration from dba_scheduler_jobs;

Than disable the jobs with following commands:

exec dbms_scheduler.disable ('<owner>.MGMT_STATS_CONFIG_JOB');
exec dbms_scheduler.disable ('<owner>.MGMT_CONFIG_JOB');


Or:

Make sure that export job and OCM jobs are not running at the same time.


OCM Jobs:
OCM jobs are default jobs that were introduced starting in Oracle11i. You can disable them and purpose of OCM is to proactively monitor Oracle environment and sending to My Oracle Support(metalink).