02.Oracle/DataBase2008. 7. 21. 13:51
반응형

OC4J Configuration issue...

First you should check database/instance configure for DATABASE CONTROL


If a hostname_sid directory does not exist in the Oracle Database 10g home directory, then the Oracle Enterprise Manager 10g Database Control Console was not configured for the database instance.




E:\>set oracle_sid=db01

E:\>emctl getemhome
Oracle Enterprise Manager 10g Database Control Release 10.1.0.2.0
Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved.
EMHOME=C:\oracle\product\10.1.0\Db_1/taj.domainname.local_db01

If you get above output mean DATABASE configure FOR DB CONTROL otherwise DATABASE is not configure for DB CONTROL and you will see message like "EM Configuration issue".

We can configure DATABASE/INSTANCE for DB CONTROL through TWO WAY
1.DBCA
2.EMCA

DBCA
E:\>set oracle_sid=sh

E:\>emctl status dbconsole
OC4J Configuration issue. C:\oracle\product\10.1.0\Db_1/oc4j/j2ee/OC4J_DBConsole
_taj.domainname.local_sh not found.

E:\>dbca
Note : dbca ---> Configure Database option ---> Select DB and give PWD ---> Check Mark on Configure database with enterprise manager. ---> Finish
E:\>set oracle_sid=sh

E:\>emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.1.0.2.0
Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved.
http://taj.domainname.local:5503/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory C:\oracle\product\10.1.0\Db_1/taj.domainname.local_sh/sysman/log

--------------------------------------------------------------
You can also Configure Database Control through EMCA command line utility.
E:\>set oracle_sid=db01

E:\>emca

STARTED EMCA at Thu Jan 11 10:39:37 GST 2007
Enter the following information about the database to be configured
Listener port number: 1521
Database SID: db01
Service name: db01
Email address for notification:
Email gateway for notification:
Password for dbsnmp:
Password for sysman:
Password for sys:

-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ C:\oracle\product\10.1.0\Db_1
Enterprise Manager ORACLE_HOME ................ C:\oracle\product\10.1.0\Db_1

Database host name ................ taj.domainname.local
Listener port number ................ 1521
Database SID ................ db01
Service name ................ db01
Email address for notification ...............
Email gateway for notification ...............

-----------------------------------------------------------------
Do you wish to continue? [yes/no]: yes
Jan 11, 2007 10:40:22 AM oracle.sysman.emcp.EMConfig checkConfiguration
SEVERE: Repository already exists. Fix the error(s) and run EM Configuration As
sistant again in standalone mode.
Could not complete the configuration. Refer to the log file for details

emca -r :skip creation of repository schema
E:\>emca -r

STARTED EMCA at Thu Jan 11 10:42:33 GST 2007
Enter the following information about the database to be configured
Listener port number: 1521
Database SID: db01
Service name: db01
Email address for notification:
Email gateway for notification:
Password for dbsnmp:
Password for sysman:
Password for sys: :
Password for sys:
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ C:\oracle\product\10.1.0\Db_1
Enterprise Manager ORACLE_HOME ................ C:\oracle\product\10.1.0\Db_1

Database host name ................ taj.domainname.local
Listener port number ................ 1521
Database SID ................ db01
Service name ................ db01
Email address for notification ...............
Email gateway for notification ...............

-----------------------------------------------------------------
Do you wish to continue? [yes/no]: yes
Jan 11, 2007 10:42:59 AM oracle.sysman.emcp.EMConfig updateReposVars
INFO: Updating file C:\oracle\product\10.1.0\Db_1\sysman\emdrep\config\repositor
y.variables ...
Jan 11, 2007 10:43:05 AM oracle.sysman.emcp.util.PortQuery findUsedPorts
INFO: Searching services file for used port
Jan 11, 2007 10:43:08 AM oracle.sysman.emcp.EMConfig addPortEntries
INFO: Updating file C:\oracle\product\10.1.0\Db_1\install\portlist.ini ...
Jan 11, 2007 10:43:09 AM oracle.sysman.emcp.EMConfig updateEmdProps
INFO: Updating file C:\oracle\product\10.1.0\Db_1\sysman\config\emd.properties .
..
Jan 11, 2007 10:43:10 AM oracle.sysman.emcp.EMConfig updateConfigFiles
INFO: targets.xml file is updated successfully
Jan 11, 2007 10:43:10 AM oracle.sysman.emcp.EMConfig updateEmomsProps
INFO: Updating file C:\oracle\product\10.1.0\Db_1\sysman\config\emoms.properties
...
Jan 11, 2007 10:43:10 AM oracle.sysman.emcp.EMConfig updateConfigFiles
INFO: emoms.properties file is updated successfully
Jan 11, 2007 10:43:12 AM oracle.sysman.emcp.EMConfig startOMS
INFO: Starting the DBConsole ...
Jan 11, 2007 10:44:53 AM oracle.sysman.emcp.EMConfig perform
INFO: DBConsole is started successfully
Jan 11, 2007 10:44:53 AM oracle.sysman.emcp.EMConfig perform
INFO: >>>>>>>>>>> The Enterprise Manager URL is http://taj.domainname.lo
cal:5504/em <<<<<<<<<<<>Agent Unreachable

First check agent services is start or not.
e:\>set oracle_sid=db01
e:\>emctl status agent
if stop or not running then start
e:\>emctl start agent
or check log file for more info.
OracleHome\Db_1\localhost_sid\sysman\log
------------------------------------------------------------

Io exception: SO Exception was generated
INFO: Block size for SYSAUX is greater than or equal to 8K
INFO: Job queue size is greater than or equal to 10

or check log file for more info.
Oracle_Home\Db_1\cfgtoollogs\emca_repos_xxxx.log
For above error because of your not drop repository properly.

SQL> DECLARE
2 CURSOR c1 IS
3 SELECT owner, synonym_name name
4 FROM dba_synonyms
5 WHERE table_owner = 'SYSMAN';
6
7 BEGIN
8 FOR r1 IN c1
9 LOOP
10 IF r1.owner = 'PUBLIC' THEN
11 EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM 'r1.name;
12 ELSE
13 EXECUTE IMMEDIATE 'DROP SYNONYM 'r1.owner'.'r1.name;
14 END IF;
15 END LOOP;
16 END;
17 /

PL/SQL procedure successfully completed.

SQL> DROP ROLE mgmt_user;

Role dropped.

SQL> drop user mgmt_view cascade;

User dropped.

SQL> drop user sysman cascade;

User dropped.

------------------------------------------------------------------
After drop complete repository you can create new repository through EMCA.
E:\>emca

STARTED EMCA at Thu Jan 11 18:13:11 GST 2007
Enter the following information about the database to be configured
Listener port number: 1521
Database SID: db01
Service name: db01
Email address for notification:
Email gateway for notification:
Password for dbsnmp:
Password for sysman:
Password for sys: :
Password for sys:
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ C:\oracle\product\10.1.0\Db_1
Enterprise Manager ORACLE_HOME ................ C:\oracle\product\10.1.0\Db_1

Database host name ................ taj.domainname.local
Listener port number ................ 1521
Database SID ................ db01
Service name ................ db01
Email address for notification ...............
Email gateway for notification ...............

-----------------------------------------------------------------
Do you wish to continue? [yes/no]: yes
DBConsole is already configured for the database db01
Would you like to re-configure DBConsole for the specified database? [yes/no]: y
es
Make sure that DBConsole has been shutdown
When you are ready to continue, press

Jan 11, 2007 6:13:27 PM oracle.sysman.emcp.EMConfig updateReposVars
INFO: Updating file C:\oracle\product\10.1.0\Db_1\sysman\emdrep\config\repositor
y.variables ...
Jan 11, 2007 6:19:07 PM oracle.sysman.emcp.EMConfig createRepository
INFO: Creating repository ...
Jan 11, 2007 6:19:07 PM oracle.sysman.emcp.EMConfig perform
INFO: Repository was created successfully
Jan 11, 2007 6:19:15 PM oracle.sysman.emcp.EMConfig stopOMS
INFO: Stopping the DBConsole ...
Jan 11, 2007 6:19:21 PM oracle.sysman.emcp.EMConfig addPortEntries
INFO: Updating file C:\oracle\product\10.1.0\Db_1\install\portlist.ini ...
Jan 11, 2007 6:19:21 PM oracle.sysman.emcp.EMConfig updateEmdProps
INFO: Updating file C:\oracle\product\10.1.0\Db_1\sysman\config\emd.properties .
..
Jan 11, 2007 6:19:23 PM oracle.sysman.emcp.EMConfig updateConfigFiles
INFO: targets.xml file is updated successfully
Jan 11, 2007 6:19:23 PM oracle.sysman.emcp.EMConfig updateEmomsProps
INFO: Updating file C:\oracle\product\10.1.0\Db_1\sysman\config\emoms.properties
...
Jan 11, 2007 6:19:23 PM oracle.sysman.emcp.EMConfig updateConfigFiles
INFO: emoms.properties file is updated successfully
Jan 11, 2007 6:19:34 PM oracle.sysman.emcp.EMConfig startOMS
INFO: Starting the DBConsole ...
Jan 11, 2007 6:21:13 PM oracle.sysman.emcp.EMConfig perform
INFO: DBConsole is started successfully
Jan 11, 2007 6:21:13 PM oracle.sysman.emcp.EMConfig perform
INFO: >>>>>>>>>>> The Enterprise Manager URL is http://taj.domainname.lo
cal:5504/em <<<<<<<<<<<>


Note : In 10.1.0.2.0 RepManager is not working properly so that we are not able to use below command.

emca -config dbcontrol db -repos recreate

If is working in 10.1.0.3.0
for you have to manully drop repository and create again.

Related Links

1. http://dbataj.blogspot.com/2007/07/error-during-dbconsole-shutting-down.html

2. http://dbataj.blogspot.com/2007/07/change-sysman-password.html

3. http://dbataj.blogspot.com/2007/07/e-mail-notification.html

4. http://dbataj.blogspot.com/2007/06/enabling-isqlplus-dba-access.html

5. http://dbataj.blogspot.com/2007/04/export-database-with-sysdba-role.html


Posted by 1010