Monday, October 15, 2012

Rman Connect Target Fails With ORA-06508 or RMAN-04015 or PLS-00201

Rman Connect Target Fails With ORA-06508 or RMAN-04015  or PLS-00201

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-04063: package body "APPS.DBMS_BACKUP_RESTORE" has errors
ORA-06508: PL/SQL: could not find program unit being called: "APPS.DBMS_BACKUP_RESTORE"
ORA-06512: at line 1
RMAN-04015: error setting target database character set to UTF8



To Resolve:

SQL>  Select object_name,object_type,owner,status from dba_objects where object_name like '%DBMS_BACKUP%'
OBJECT_NAME                     OBJECT_TYPE               OWNER               STATUS
-------------------                         -------------------      -----------            --- -------
DBMS_BACKUP_RESTORE  PACKAGE                        SYS                    VALID
DBMS_BACKUP_RESTORE  PACKAGE                       SYSADM            VALID
DBMS_BACKUP_RESTORE  PACKAGE BODY          SYSADM             INVALID

The issue occurs because there is a user created Login trigger which seems to change user name

SQL> select owner,trigger_name,triggering_event,status from dba_triggers where triggering_event like '%LOGON%' ;

Disable the trigger one by one and check if you are able to connect to rman.

SQL>Alter trigger <trigger_name> disable ;

Once you find the problematic Trigger enable other Logon trigger. Check the code used in Trigger and make changes accordingly

---------------------------
PLS-00201: identifier 'DBMS_BACKUP_RESTORE.SET_CHARSET' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
RMAN-04015: error setting target database character set to UTF8
ARCHIVELOG BACKUP error on DBNAME

or

RMAN-00571: ===========================================================
RMAN-00569: ========== ERROR MESSAGE STACK FOLLOWS ========
RMAN-00571: ===============================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database: ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBMS_BACKUP_RESTORE.SET_CHARSET' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
RMAN-04015: error setting target database character set to US7ASCII

SQL> select count(*) from dba_objects
                                 where object_name like '%DBMS_BACKUP_RESTORE%';

If not returned 0 zeros. Then proceed with below steps.
If the below steps are not worked to solve the issue then use the above resloution steps.

$sqlplus "/as sysdba"
SQL> startup restrict
SQL > @?/rdbms/admin/catalog.sql
SQL > @?/rdbms/admin/catproc.sql
SQL > @?/rdbms/admin/utlrp.sql

Keep in mind that running catproc.sql will invalidate all PL/SQL
and many other related objects, so we must need to run utlrp.sql script.
Shutdown your database in the normal mode and startup with the normal mode.

Reference: RMAN-554 RMAN-4005 PLS-201 RMAN-4015 when Connecting to Target Database [ID 97294.1]
                  Rman Connect Target Fails With ORA-06508 RMAN-04015 [ID 1317517.1]

Hope this helps.

3 comments:

  1. Hаvе уou eνeг thought аbout сгeating an e-book or guеst authoгing on other sites?
    I haѵe a blоg сеntегeԁ оn
    the same topics you diѕcuss and ωould rеаllу likе to havе уοu ѕharе
    ѕomе ѕtоries/infoгmаtion.
    I knoω my ѕubsсгiberѕ wοuld enјοy youг work.
    If yоu're even remotely interested, feel free to send me an email.

    Feel free to visit my website; fotografos de bodas precios

    ReplyDelete
  2. Amazing blog! Do you have any hints for aspiring writers?
    I'm planning to start my own website soon but I'm a little lost on everything.
    Would you recommend starting with a free platform like Wordpress or go for a
    paid option? There are so many options out there that I'm totally confused .. Any recommendations? Many thanks!

    Here is my web site: words with friends helper app android

    ReplyDelete
  3. Nice job. The logon trigger turned out to be my issue.
    A fun experience in troubleshooting you don't see evry day.

    ReplyDelete