Most people face
problem while working on the database whenever they changed the ip-address and/or hostname of the machine. Enterprise manager may not working properly.
I am mentioning this issue in this post with the problem
that I face. My machine is
configured with DHCP. Oracle recommends to use static IP address.
So I also want to change this. To
configure static address in rhel5, you need to follow these two steps:
1. Assigning static IP address
log in as root
issue neat command
It will open network configuration GUI window.
Select eth0 here, go
to edit. Select statically set IP address.
Enter ip address and mention subnet mask. Click on OK button. After, click on File >> save to save
your changes. After ,you will get the
dialogue saying
Changes are saved. You
may want to restart the network and network services or restart the computer.
click on OK. Exit the network configuration window.
Then, logged in as root user, issue
service network restart.
Now, to change the host name(if you want), make modification
in /etc/sysconfig/network. My /etc/sysconfig/network
looks like:
----------------------------------------------------------------------------------------------------------------------
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=host2.oracle.com
--------------------------------------------------------------------------------------------------------------------
2. Now, as a second
step, make appropriate entry in /etc/hosts. My /etc/hosts after
modification looks like:
-----------------------------------------------------------------------------------------------------------------------------------
# Do not remove the following line,
or various programs that require network
functionality will fail.
127.0.0.1 localhost.localdomain localhost
#::1 localhost6.localdomain6
localhost6
192.168.2.102 host2.oracle.com host2
------------------------------------------------------------------------------------------------------------------------------------
Now, reboot the system.
Now, after changing ip address and /or hostname ,you may
face certain problems while working on the database. Your listener and/or em
console may not working properly.
Use netmgr to configure your listener again.
And to enable proper
functioning of em console, start your
listener after proper configuration, then start database. .
Firstly, I issued
emca
-config dbcontrol db
Command ran successfully. But after getting enterprise
manager console , homepage shows
Error : java.lang.Exception: UnknownHostException
sending request :: host1.oracle.com.
The solution is to issue below command , not above.
[Below command won't work if you do not start the database]
[oracle@host2 ~]$ emca
-config dbcontrol db -repos recreate
And, answer the questions that it asks. Here is the output:
-------------------------------------------------------------------------------------------------------------
STARTED EMCA at Oct 19, 2012
11:27:22 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: orcl
Database Control is already
configured for the database orcl
You have chosen to configure
Database Control for managing the database orcl
This will remove the existing
configuration and the default settings and perform a fresh configuration
Do you wish to continue?
[yes(Y)/no(N)]: y
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications
(optional): sys
Invalid email.
Email address for notifications
(optional):
Outgoing Mail (SMTP) server for
notifications (optional):
-----------------------------------------------------------------
You have specified the following
settings
Database ORACLE_HOME
................ /u01/app/oracle/product/10.2.0/db_1
Database hostname ................
host2.oracle.com
Listener port number
................ 1521
Database SID ................ orcl
Email address for notifications
...............
Outgoing Mail (SMTP) server for
notifications ...............
-----------------------------------------------------------------
Do you wish to continue?
[yes(Y)/no(N)]: y
Oct 19, 2012 11:27:45 AM
oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged
at
/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_2012-10-19_11-27-22-AM.log.
Oct 19, 2012 11:27:46 AM oracle.sysman.emcp.util.DBControlUtil
stopOMS
INFO: Stopping Database Control
(this may take a while) ...
Oct 19, 2012 11:27:48 AM
oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository
(this may take a while) ...
Oct 19, 2012 11:28:56 AM oracle.sysman.emcp.EMReposConfig
invoke
INFO: Repository successfully
dropped
Oct 19, 2012 11:28:56 AM
oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository
(this may take a while) ...
Oct 19, 2012 11:32:41 AM
oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully
created
Oct 19, 2012 11:32:44 AM
oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control
(this may take a while) ...
Oct 19, 2012 11:34:22 AM
oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started
successfully
Oct 19, 2012 11:34:22 AM
oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO:
>>>>>>>>>>> The Database Control URL is
http://host2.oracle.com:5501/em <<<<<<<<<<<
Enterprise Manager configuration
completed successfully
FINISHED EMCA at Oct 19, 2012
11:34:31 AM
[oracle@host2 ~]$ emctl start
dbconsole
TZ set to Asia/Calcutta
Oracle Enterprise Manager 10g
Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle
Corporation. All rights reserved.
http://host2.oracle.com:5501/em/console/aboutApplication
- An instance of Oracle Enterprise Manager 10g
Database Control is already running.
And Enjoy..............