Thursday, September 20, 2007

Oracle 10g on Windows - recreating OracleDBConsole and Sysman shcema

I can not start the Oracle DBConsole service in my Windows XP PC. I followed a procedure of recreating OracleDBConsole and Sysman shcema manully from a website (http://dbtips.com/OracleDBConsole_manual_recreation.htm) and have been able to use DB Control again.


The procedure is as follows:

Part I. Removing OracleDBConsole[SID] Service

Go to Windows Services panel and verify that OracleDBConsole[SID] is there.
If you fnd it in the list and it can NOT be deleted by emca -x [SID] command,
you need to remove it manually.

(Note: emca -x [sid] not good for me)


Delete OracleDBConsole[SID] from the registry:

1. Go to Start -> Run -> type regedit.
2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OracleDBConsole[SID].
3. Delete OracleDBConsole[SID] key (hit delete).


Part II. Removing Sysman Directories
In order to recreate Sysman Schema, you will need to remove old directories:

1. Navigate to %ORACLE_HOME%\DomainName_SID directory and remove it.
2. Navigate to %ORACLE_HOME%\oc4j\j2ee\OC4J_DBConsole_DomainName_SID directory and remove it.
3. Reboot the server.
4. Verify that OracleDBConsole[SID] is not listed in Windows Services.


Part III. Creating new Sysman Schema and OracleDBConsole[SID] Service.

This presumes that Sysman Schema has been previosly dropped. If not, drop it first:

Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and mangement objects:
a. drop user sysman cascade;
b. drop role MGMT_USER;
c. drop user MGMT_VIEW cascade;
d. drop public synonym MGMT_TARGET_BLACKOUTS;
e. drop public synonym SETEMVIEWUSERCONTEXT;


In fact, OracleDBConsole[SID] Service is created automatically as part of
creating Sysman Schema procedure:

1. Start Database Configuration Assistant.
2. Click Next on the Welcome screen.
3. Select Configure Database Options and click Next.
4. Next screen will display database name, click Next.
5. Select Eneterprise Manager Repository and click Next.
6. Select your Server Mode (default is Dedicated) and click Finish.
This process may take several minutes and it will create dropped directories and OracleDBConsole[SID] Service.

4 comments:

Unknown said...

Life Saver. Thank You
I had patched Oracle from 10.2.0.1 to 10.2.0.5 post Dec 31st 2010 and had omitted EM patch pre requisite 1212493.1 so could not config/ reconfig dbconsole.

yds said...

@savvas Thanks for stoppying by. Hope you are not dealing with production database. If so, you'd better create a SR to confirm the procedure. I have not had the chance to really involve DB control/Grid control and Windows platform in production yet :-(

Manfred P. Wilke said...

Hello all.

Tanks for this great "how-to", it really saved me.

But instead of doing the "registry" step, i used the "sc delete
OracleDBConsole[SID]" DOS command directly in cmd prompt.

I think using it is a safer way that edit windows registry.

After that, i was prompted with an error related to my "OC4J" folder, which i previously
renamed instead of simply deleting it, before this installation process.

I renamed it back to "OC4J" and re-run the database wizzard, and now the
installation ended OK.

Sorry for my bad english.

Hugs

nadeem salafi said...

it really worked for me

thanx a lot