5 Replies Latest reply: May 27, 2014 3:30 AM by Madarwish RSS

    Can not DROP repository

      Hi all,

       

      11.2.0.3

       

      I have been dropping and recreating OEM repository many times with our servers and I am many times successful as well.

      I can say that I am good at this task.

      But this time I failed. I run >  emca -deconfig dbcontrol db -repos drop


      Dropping Roles/Synonymns/Tablespaces ... Return code = 0.Done.

      Dropping Repository failed. Please check file /oracle/app/oracle/cfgtoollogs/emca/BNCTUAT/emca_repos_drop_2014_05_13_20_53_10.log for detailed errors.

       

       

      May 13, 2014 8:53:20 PM oracle.sysman.emcp.util.PlatformInterface executeCommand

      CONFIG: stty: tcgetattr: A specified file does not support the ioctl system call.

      stty: tcgetattr: A specified file does not support the ioctl system call.

      ORA-06550: line 1, column 7:

      ORA-06550: line 1, column 7:

      ORA-06550: line 22, column 44:

      PL/SQL: ORA-00942: table or view does not exist

      ORA-06550: line 18, column 11:

       

       

      May 13, 2014 8:53:20 PM oracle.sysman.emcp.util.PlatformInterface executeCommand

      WARNING: Error executing /oracle/app/oracle/product/11.2.0.3/dbhome_1/sysman/admin/emdrep/bin/RepManager -connect (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOC

      OL=TCP)(HOST=IST-UAT-TDE)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=BNCTUAT))) -repos_user SYSMAN -action drop -verbose -output_file /oracle/app/oracle/cfgtool

      logs/emca/BNCTUAT/emca_repos_drop_2014_05_13_20_53_10.log

      May 13, 2014 8:53:20 PM oracle.sysman.emcp.EMReposConfig invoke

      SEVERE: Error dropping the repository

      =============

       

      Please help,

       

      Thanks,

      pK

        • 1. Re: Can not DROP repository

          This link is very much similar with my error

           

          10.2.0 emca/emctl issues

          • 2. Re: Can not DROP repository
            Madarwish

            Hi Petra-K ,

             

            Please follow the below steps to drop the dbconsole repository manually:

             

             

            Step 1: Drop AQ related objects in the SYSMAN schema

                Logon SQLPLUS as user SYS

                SQL> exec DBMS_AQADM.DROP_QUEUE_TABLE(queue_table=>'SYSMAN.MGMT_NOTIFY_QTABLE',force=>TRUE);

               

            Note: For 11.2 database, logon SQLPLUS as user SYS (not SYSMAN) and run:

                exec DBMS_AQADM.DROP_QUEUE_TABLE(queue_table=>'SYSMAN.MGMT_NOTIFY_QTABLE',force =>TRUE);

                   

            Step 2: Drop the DB Control Repository Objects

                Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management objects:

                SQL> SHUTDOWN IMMEDIATE;

                SQL> STARTUP RESTRICT;

                SQL> EXEC sysman.emd_maintenance.remove_em_dbms_jobs;

                SQL> EXEC sysman.setEMUserContext('',5);

                SQL> REVOKE dba FROM sysman;

                SQL> DECLARE

                CURSOR c1 IS

                SELECT owner, synonym_name name

                FROM dba_synonyms

                WHERE table_owner = 'SYSMAN';

                BEGIN

                FOR r1 IN c1 LOOP

                IF r1.owner = 'PUBLIC' THEN

                EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM '||r1.name;

                ELSE

                EXECUTE IMMEDIATE 'DROP SYNONYM '||r1.owner||'.'||r1.name;

                END IF;

                END LOOP;

                END;

                /

                SQL> DROP USER mgmt_view CASCADE;

                SQL> DROP ROLE mgmt_user;

                SQL> DROP USER sysman CASCADE;

                SQL> ALTER SYSTEM DISABLE RESTRICTED SESSION;

               

            Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management objects:

            SQL> drop user sysman cascade;

            SQL> drop role MGMT_USER;

            SQL> drop user MGMT_VIEW cascade;

            SQL> drop public synonym MGMT_TARGET_BLACKOUTS;

            SQL> drop public synonym SETEMVIEWUSERCONTEXT;

             

            From all nodes, Remove the following directories from your filesystem:

                    $ORACLE_HOME/<hostname_SID>

                    $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname>_<SID>

             

             

            Thanks and BR.

            • 3. Re: Can not DROP repository

              Thanks all,

              • 4. Re: Can not DROP repository
                tvCa-Oracle

                I'm wondering if anybody here has a wrapper script that actually allows the EM creation or drop to work from the first attempt.

                • 5. Re: Can not DROP repository
                  Madarwish

                  Hi tvCa-Oracle ,

                   

                  The standard scripts to rebuild dbconsole should work from the first attempt, the manual intervention will be used in very limited situations.

                   

                  Thanks !

                  BR,