Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

If I change Oracle database server IP , what problem may exist and how to solve?

  1. modify hosts file
  2. modify tnsnames.ora file
  3. modify listener.ora file
  4. modify clients' tnsnames.ora files

As I know it is not necessary to have listener.ora and tnsnames.ora files on 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

Thank you.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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) ) )

share|improve this answer
    
thank you for your response. In these files there are written IPs, not domain names. –  kupa Jun 14 '12 at 11:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.