Archive for the ‘Oracle Tools’ Category

Reconfiguring Oracle EM

Article taken from arjudba blogspot
An Stack of Problems while creating Repository using emca

In my database I tried to create repository and stopped several times while creating repository. I spend a significant amount of time to create repository and after analysis I got the following.
A)Manually Resolve
1)If you fail after invoking command
emca -config dbcontrol db –repos

create see alert log file for more details. Also refer to another log file if it shows. Directly go to step 3)
2)However I see many errors like,
CONFIG: ORA-00955: name is already used by an existing object
CONFIG: ORA-01921: role name ‘MGMT_USER’ conflicts with another user or role name
and many severals errors.
3)Execute the following commands in SQL*plus and then execute emca command. I wish no more error will come. After several experiment I get this.

drop user sysman cascade;
drop public synonym SETEMVIEWUSERCONTEXT;
drop role MGMT_USER;
drop PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;
drop user MGMT_VIEW;

And then,
$ emca -deconfig dbcontrol db
$ emca -config dbcontrol db -repos create
B)Using RepManager:
If I drop the Repository using RepManager like following error will not come while creating repository.
$ORACLE_HOME/sysman/admin/emdrep/bin/RepManager -action drop
This will not remove the configuration files, but only the repository related objects from the database.
But you need to remember when RepManager is ran the database will be put in Quiescing mode.

 

Another method from MacLochLainns Weblog:

These are the steps:

1. Change the %ORACLE_HOME%\network\admin\listener.ora file from an IP number to machine name.

2. Change the %ORACLE_HOME%\network\admin\tnsnames.ora file from an IP number to a machine name.

3. Change the C:\WINDOWS\System32\drivers\etc\hosts file by adding this line beneath the default localhost line:

127.0.0.1       localhost
172.16.113.128  mclaughlin11g mclaughlin11g.techtinker.com

4. Change the Windows hostname by navigating: Start > Control Panel > System (classic view) from the random assignment of VMWare Fusion.

5. Reboot the machine, and then drop the em configuration with the following commands:

C:\Data> set ORACLE_SID=orcl
C:\Data> emca -deconfig dbcontrol db -repos drop

6. You’ll receive the following prompts, enter the Oracle SID and Port number without double quotes but you must enter all passwords with double quotes (at least in Oracle Database 11g):

STARTED EMCA at Jul 13, 2008 8:26:42 AM
EM Configuration Assistant, Version 11.1.0.5.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.   Enter the following information:
Database SID: orcl
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y

7. You should then drop the SYSMAN user manually because it doesn’t happen without your assistance (or, it didn’t happen when I did it). If you don’t drop the SYSMAN schema, you’ll raise an error when you try to recreate it:

CONFIG: ORA-20001: SYSMAN already EXISTS..
ORA-06512: at line 17
8. You can then create the em environment with the following syntax:
C:\Data> emca -config dbcontrol db -repos create

9. Again, you’ll receive the following prompts, enter the Oracle SID and Port number without double quotes but you must enter all passwords with double quotes (at least in Oracle Database 11g):

STARTED EMCA at Jul 13, 2008 8:28:48 AM
EM Configuration Assistant, Version 11.1.0.5.0 Production
Copyright (c) 2003, 2005, Oracle.  ALL rights reserved.   Enter the following information:
DATABASE SID: orcl
Listener port number: 1521
Password FOR SYS user:
Password FOR DBSNMP user:
Password FOR SYSMAN user:
Password FOR SYSMAN user: Email address FOR notifications (optional):
Outgoing Mail (SMTP) server FOR notifications (optional):
-----------------------------------------------------------------
Advertisements