Oracle 10g on Windows 2003 Server:
Having set the ORACLE_SID variable, I am trying to start the dbconsole using following command.
Problem 01:
emctl start dbconsole
The errors Message :
OC4J Configuration issue. c:\oracle\product\10.2.0\db_1/oc4j/j2ee/OC4J_DBConsole
_192.168.1.41_cjdb not found.
Solution:
Step 01: Find the hostname of Oracle Server and set the ORACLE_HOSTNAME Environment variable
$ hostname
Run these commands For Linux:
$ ORACLE_HOSTNAME=myhost.domainname.com
$ export ORACLE_HOSTNAME
Run these commands For Windows:
> Set ORACLE_HOSTNAME=myhost.domainname.com
It's good idea to drop & recreate Enterprise Manager Repository with correct listener/port
Step 02: Now configure the em Repository following way
Drop and then create em repository for single instance
emca -deconfig dbcontrol db
emca -config dbcontrol db
For Cluster (drop and create and RAC EM)
emca -deconfig dbcontrol db
emca -config dbcontrol db
Example:
emca -config dbcontrol db
STARTED EMCA at Jan 26, 2010 10:14:19 AM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: cjdb
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional): tamim@cyberjahan.com
Outgoing Mail (SMTP) server for notifications (optional): 25
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ c:\oracle\product\10.2.0\db_1
Database hostname ................ 192.168.1.41
Listener port number ................ 1521
Database SID ................ cjdb
Email address for notifications ............... tamim@cyberjahan.com
Outgoing Mail (SMTP) server for notifications ............... 25
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Jan 26, 2010 10:15:45 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at c:\oracle\product\10.2.0\db_1\cfgtoollog
s\emca\cjdb\emca_2010-01-26_10-14-19-AM.log.
Jan 26, 2010 10:15:57 AM oracle.sysman.emcp.util.PlatformInterface executeComman
d
WARNING: Error executing CMD /C c:\oracle\product\10.2.0\db_1\bin\emctl.bat depl
oy dbconsole c:\oracle\product\10.2.0\db_1\192.168.1.41_cjdb 192.168.1.41:3938 1
92.168.1.41 cjdb
Jan 26, 2010 10:15:57 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Error instantiating EM configuration files
Refer to the log file at c:\oracle\product\10.2.0\db_1\cfgtoollogs\emca\cjdb\emc
a_2010-01-26_10-14-19-AM.log for more details.
Could not complete the configuration. Refer to the log file at c:\oracle\product
\10.2.0\db_1\cfgtoollogs\emca\cjdb\emca_2010-01-26_10-14-19-AM.log for more deta
ils.
To configure the enterprise manager database control for your database, issue the following commands as oracle user in Linux Platform:
[oracle@dbsrv oracle]$ export ORACLE_HOME=<ORACLE_HOME>
[oracle@dbsrv oracle]$ export ORACLE_SID=<ORACLE_SID>
[oracle@dbsrv bin]$ cd $ORACLE_HOME/bin
[oracle@dbsrv bin]$ ./emca -config dbcontrol db -repos create
Now just follow the instructions on the screen… you’ll need the SYS, DBSNMP and SYSAUX passwords.
Sometimes you already have the SYSMAN, DBSNMP and SYSAUX accounts, and the previous EMCA command can fail to create the DBConsole repository the error ORA-20001 occurs.
ORA-20001 Sysman Already Exists While Running EMCA
If the previous drop procedure fails and by checking the logs we see ORA-01031 insufficient privileges, this may be because we don’t have a password file created. Just go to $ORACLE_HOME/dbs and check if we have a file called pwd<sid>.ora. If not, create it…
[oracle@dbsrv oracle]$ cd $ORACLE_HOME/bin
[oracle@dbsrv bin]$ ./orapwd file=$ORACLE_HOME/dbs/pwd<sid>.ora password=oracle entries=5
Problem 02:
emctl status dbconsole
Unable to determine local host from URL REPOSITORY_URL=http://192.168.1.41:%EM_U
PLOAD_PORT%/em/upload/
Solution:
Change the value of REPOSITORY_URL in following way
%ORACLE_HOME%\<hostname_sid>\sysman\config\emd.properties
REPOSITORY_URL=http://xxxx:5500/em/upload/
Example:
#REPOSITORY_URL=http://192.168.1.41:%EM_UPLOAD_PORT%/em/upload/
REPOSITORY_URL=http://192.168.1.41:5500/em/upload/
Create Database Console
To create the configuration files and repository for Database Console, run:
$ emca -config dbcontrol db -repos create
Drop Database Console
To drop (remove) the configuration files and repository for Database Console, run:
$ emca -deconfig dbcontrol db -repos drop
Recreate Database Console
To recreate the configuration files and repository for Database Console, run:
$ emca -config dbcontrol db -repos recreate
Using EMCA with Real Application Clusters
In this section, I will be using two Database Control consoles running; one on linux1 and the other on linux2. From either of these consoles, you can manage and monitor all targets in the cluster.
For information on the current cluster configuration, you can run:
$ emca -displayConfig dbcontrol –cluster
Create Database Console
$ emca -config dbcontrol db -repos create –cluster
Drop Database Console
$ emca -deconfig dbcontrol db -repos drop -cluster
Troubleshooting EMCA
If you have any problems when running emca, check the log file under:
ORACLE_HOME/cfgtoollogs/emca/<ORACLE_SID>/
Log Directory:
$ORACLE_HOME/cfgtoollogs/emca
For Linux:
u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca
For Windows:
C:\oracle\product\10.2.0\db_1\cfgtoollogs\emca
No comments:
Post a Comment