Manual configuration of EM repository in RAC

Following steps can be used to manually re-create the EM repository in RAC environmant.

WARNING: This is a highly destructive method & should only be used as last option

STEP 1

SQL> drop role mgmt_user;

STEP 2

Drop the SYSMAN schema & EM related objects

SQL> drop user sysman cascade;
SQL> drop user MGMT_VIEW cascade;
SQL> drop public synonym mgmt_target_blackouts;
SQL> drop public synonym setemviewusercontext;

STEP 3

Remove configuration files

$ cd $ORACLE_HOME
$ rm -R node1_TEST1
$ rm -R node2_TEST2
$ cd oc4j/j2ee/
$ rm -R OC4J_DBConsole_node1_TEST1/
$ rm -R OC4J_DBConsole_node2_TEST2/

STEP 4

Set ORACLE_HOSTNAME environment variable

$ export ORACLE_HOSTNAME=${HOSTNAME}

STEP 5

Run deconfigure for emca (Enterprise Manager Configuration Assistant).

$ emca -deconfig all db (This step may not be reqiured)

STEP 6

Run emca to configure the DBConsole & new EM repository

Note:

Port 1158 is the default port (DBCONTROL_HTTP_PORT) to access the Database Control. We can specify any other unused port, if 1158 is already used by other instance of EM

Check used port by using telnet

If port is already in use, we should see a waiting cursor. After pressing enter multiple times

Date: Wed, 06 Feb 2008 19:52:21 GMT
Server: Oracle Application Server Containers for J2EE 10g (9.0.4.1.0)
Content-Length: 119
Connection: Close
Content-Type: text/html

413 Request Entity Too Large

In this case, we’ll have to select a new port

$ emca -config dbcontrol db -repos create -SID ${ORACLE_SID} -PORT 1521 -ORACLE_HOME ${ORACLE_HOME} -DBCONTROL_HTTP_PORT 5501 -cluster

Port 1521 is the database listener port.

Check the status of dbconsole & agent

$ emctl status dbconsole
$ emctl status agent

In Oracle 11g, we can use

$ORACLE_HOME/sysman/admin/emdrep/bin/repmanager $HOSTNAME 1521 $ORACLE_SID -action drop

Enter SYS user’s password :
Enter repository user name : sysman
Getting temporary tablespace from database…
Found temporary tablespace: TEMP
Checking SYS Credentials … OK.
Dropping the repository..
Quiescing DB … Done.
Checking for Repos User … Exists.
Repos User exists..
Clearing EM Contexts … OK.
Dropping EM users …
Done.
Dropping Repos User … Done.
Dropping Roles/Synonymns/Tablespaces … Done.
Unquiescing DB … Done.
Dropped Repository Successfully.

This will remove repository related objects from the database.

Advertisements
This entry was posted in Oracle Enterprise Manager and tagged . Bookmark the permalink.

One Response to Manual configuration of EM repository in RAC

  1. VIC says:

    Thanks for sharing this. It really helps.
    -victor

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s