Oracle modifies the ip address or host name and re-creates the em and listener
Detailed operations for modifying the ip address and host name of an oracle Database
Modify ip
1. Modify the IP address of the host name in the hosts file.
2. restart the server network service network restart
3. Delete the original listener emca-deconfig dbcontrol db-repos drop
(If you do not remember the sysman password, you can first modify alter user sysman identified by oracle ;)
4. Modify
$ ORACLE_HOME/network/admin/listener. ora
$ ORACLE_HOME/network/admin/tnsnames. ora
The corresponding host address in is a new IP address. This step must be performed after the listener is deleted. Otherwise, the listener cannot be deleted.
5. Re-monitor emca-config dbcontrol db-repos create
(If an object or sysman error exists in this step, follow these steps:
1. delete users created on the early DBCONSOLE:
SQL> drop role MGMT_USER;
SQL> drop user MGMT_VIEW cascade;
SQL> drop user sysman cascade;
2. Delete the objects created on the early DBCONSOLE:
SQL> drop PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;
SQL> drop PUBLIC SYNONYM SETEMVIEWUSERCONTEXT;
Then re-execute the reconstruction operation .)
Modify host name
1. Modify the host name in the hosts file
2. Restart the server reboot
3. If the listener and tnsnames records the host name, modify
$ ORACLE_HOME/network/admin/listener. ora
$ ORACLE_HOME/network/admin/tnsnames. ora
The corresponding host address in is the new host name address. This step must be performed before deleting the listener. Otherwise, the listener cannot be deleted.
4. Restart the listener lsnrctl stop lsnrctl start
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 60. localdomain) (PORT = 1521) in lsnrctl status )))
The Host must be consistent with the Host in listener. ora and tnsnames. ora to delete the Host correctly.
5. Delete the original listener emca-deconfig dbcontrol db-repos drop
(If you do not remember the sysman password, you can first modify alter user sysman identified by oracle ;)
6. Re-monitor emca-config dbcontrol db-repos create
(If an object or sysman error exists in this step, follow these steps:
1. delete users created on the early DBCONSOLE:
SQL> drop role MGMT_USER;
SQL> drop user MGMT_VIEW cascade;
SQL> drop user sysman cascade;
2. Delete the objects created on the early DBCONSOLE:
SQL> drop PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;
SQL> drop PUBLIC SYNONYM SETEMVIEWUSERCONTEXT;
Then re-execute the reconstruction operation .)