What is the impact on Oracle if the host IP address is changed?

book

Article ID: 159419

calendar_today

Updated On:

Products

Data Loss Prevention Enforce

Issue/Introduction

Oracle and Changing the IP Address

Resolution

Relevant versions:  ALL

The Oracle database should be OK provided the hostname is being used by the listener rather than a hardcoded IP (a very bad practice!). As long as the hostname resolves to the correct IP, Oracle should be happy.

Usually  the  listener  on oracle is configured with the FQDN of box,  you can confirm in the  listener.ora   file,   look in  there,  if FQDN  then make sure  DNS  resolves to the new IP address,

 

If  IP address is in there make sure new IP address is listed.   Listener.ora  on oracle box.

 

  

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = win-2k8r2ee-ora.dlpsupport.test)(PORT = 1521))

      (ADDRESS = (PROTOCOL = IPC)(KEY = PROTECT))

    )

 

2.   Oracle uses  the net service account,  typically  “PROTECT”  make sure it has the new  IP address:     This is in the  tnsnames.ora    

 

PROTECT =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.100)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = PROTECT)

    )

  )

 

3.   They may have rebooted the  box,  but not necessary,    just  restart the listener    dos command>   lsnrctl  stop and   lsnrctl  start,    listener  should restart.

4.  On oracle box  then  connect  as  sys as sysdba  and also as protect.  To test the connections with New IP.  Once you can connect or oracle box  as  “protect”   enforce   won’t have any problems once IP is changed.

 

5.  On enforce box  the only change is in the jdbc.properties  file   change the host=IPaddress to new IP of oracle,  If host=FDQN,  make sure it resolves in dns on enforce server to new IP address of the oracle server.    sample  jdbc.properties   file on enforce:  This is single tier, therefore  oracle is on same box as enforce.

 

# JDBC connection information for the "oracle-thin" connection

jdbc.username.oracle-thin=protect

jdbc.driver.oracle-thin=oracle.jdbc.OracleDriver

# use the P6Spy driver in order to see the SQL generated by OJB

# jdbc.driver.oracle-thin=com.p6spy.engine.spy.P6SpyDriver

jdbc.subprotocol.oracle-thin=oracle:thin

[email protected](description=(address=(host=127.0.0.1)(protocol=tcp)(port=1521))(connect_data=(sid=protect)))

 

stop  the Vontu services,   change the IP in the  jdbc.properties,    start the services,    check the incidentpersister0.log in debug folder,  at end  it will tell you if connection to oracle with new IP is successfu or not. 

Note:   the  tnsnames.ora   file  if found on enforce can be changed as well, however we only use this  file  with sqlplus  for troubleshooting,  or  during initial installs,  upgrades,  You can change IP  on enforce in tnsnames.ora  file,   but there should never be a listener on enforce  or listener.ora file on enforce,  unless oracle is on same box.