Configure DBConsole as Active/passive

Sometimes Database Configured as Active/Passive ( Cluster ) Which mean one node working/time and regarding to this if the failover happened on 2nd node the customer will expected that everything will be the same as it was on node 1 include to this Dbconsole.

To do this follow the below steps :-

  • Database should be configured on VIP.
  • Listener should be configured on VIP.
  • Database , Configuration should be installed on Shared Storage
  • inventory Files should be on shared storage as well.
  • ORACLE_HOSTNAME Should be set to VIP Hostname.
Listener example :-

LISTENER  =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = VIP-HOST )(PORT = 1521))
)

Don’t forget to set the LOCAL_LISTENER Parameter :-

SQL> alter system set local_listener=’LISTENER’;

Or

SQL> alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = VIP-HOST )(PORT = 1521)) ‘;

Now

export ORACLE_HOSTNAME=VIP-HOSTNAME
emca -config dbcontrol db -repos create

Test the failover on node #2

if for some reason when you try to start emctl and the error still asking for oc4j then export ORACLE_HOSTNAME is bash_profile.

It should work

Cheers
Osama 

Drop DB Control Repository

I know that i post this topic before , you use emca to drop dbcontrol but what if this command fails 

what should i do ? I post This Topic to show second way to drop dbcontrol let Start :
 
emca
should be used to drop DB Control repository as follows:
emca -deconfig dbcontrol db -repos drop

Steps :

1.Shutdown database

 SHUTDOWN IMMEDIATE;

2.Remove EM job

EXEC sysman.emd_maintenance.remove_em_dbms_jobs;

3.Revoke DBA privilages from SYSMAN user

REVOKE dba FROM sysman;

4.Run 

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;
/

 5.Drop MGMT_VIEW user.

DROP USER MGMT_VIEW CASCADE;

6.Drop MGMT_VIEW role

DROP ROLE mgmt_user;

7.Drop SYSMAN user

DROP USER sysman CASCADE;

8.Disable restricted mode

ALTER SYSTEM DISABLE RESTRICTED SESSION;

 Thank you
Osama

    ORA-01034: ORACLE not available When Create DBCONSOLE

    ORA-01034: ORACLE not available When Create DBCONSOLE / DBCONTROL

    If you are using the following Command :

        $ emca -deconfig dbcontrol db -repos drop

        $ emca -config dbcontrol db -repos create

    Try Use


    emca -config dbcontrol db -repos recreate -ORACLE_HOSTNAME “Hostname”
      -SID “SID” -PORT “PortNumber” -ORACLE_HOME $ORACLE_HOME -DBDNMP_PWD  “Password”

    It Should be Work

    Thank you
    Osama mustafa

    Change Enterprise manager password for 11g

    For the DB Control Release 11.2 and higher, you need to set the environment variable ORACLE_UNQNAME to the value of the DB_UNIQUE_NAME database parameter.

    Steps :

    1.Stop the DB Control
    On Unix
    $ emctl stop dbconsole

    On Windows
    Open a Command Window and type
    **> emctl stop dbconsole

    2.Check that the DB Control is stopped
     On Unix
    $ emctl status dbconsole
     

    On Windows
    Open a Command Window and type
     **>emctl status dbconsole

    3.Connect to the database as a user with DBA privilege with SQL*Plus and execute:

    SQL> alter user sysman identified by ;
     
    4.Check the new password
    SQL> connect sysman/[@database_alias]
     
    5.From the database directory $ORACLE_HOME/bin, execute:
    On Unix

    $ emctl setpasswd dbconsole
    Provide the new SYSMAN password
     
    On Windows

    **>: emctl setpasswd dbconsoleProvide the new SYSMAN password
     
    6.Restart the DB Control
    On Unix
    $ emctl start dbconsole
     
    On Windows
    Open a DOS Command Window and type
    **>: emctl start dbconsole
     

    Thank you 

    Osama Mustafa