Change Oracle IP
-
22-10-2019 - |
Question
If I change Oracle database server IP , what problems may be caused and how to solve them?
- modify
hosts
file - modify
tnsnames.ora
file - modify
listener.ora
file - modify clients'
tnsnames.ora
files
As I know it is not necessary to have listener.ora
and tnsnames.ora
files on the database server; it is necessary if you need to connect to another database. Am I right?
I have single-instance database, version 11.2.0.1.0
Solution
None of what you have listed as required is necessary if you use fully qualified domain names in the TNSNAMES
and client TNSNAMES
files, and you are using a Windows domain.
This is the reason why hard coding IP addresses is a maintenance headache. Instead of:
MY_DB= (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=192.168.0.2) (PORT=1521) ) (CONNECT_DATA= (SERVICE_NAME=MY_DB.HOME.LOCAL) ) )
Use:
MY_DB= (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=DB_MACHINE_NAME.HOME.LOCAL) (PORT=1521) ) (CONNECT_DATA= (SERVICE_NAME=MY_DB.HOME.LOCAL) ) )
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange