PDA

View Full Version : Using IP address instead of FQN


Arjen Visser
04-12-2008, 09:38 AM
Question
In the process of setting up a new Standby DB I had to change the FQN in the DDC file to an IP address. When I did that and ran the dbvist process it gave the following error. It used the IP address of the standby DB to send the files but when it contacted the standby it gave an error. Curious why it returned an error. It looks like it returned the hostname of the standby server and compared that to the DESTINATION parameter and since one was a FQN and the other was an IP it didnít like that. Why should that matter?

[oracle@db1 dbvisit]$ ./dbvisit dbvprod1
================================================== ===========
Dbvisit Standby Database Technology (5.1.21.1441) (pid 24668)
dbvisit started on db1.1918.ash.prodata.com: Fri Apr 11 11:01:14 2008
================================================== ===========
First time Dbvisit runs, Dbvisit installation will be copied to 10.227.31.10...
Transferring dbv_functions to host 10.227.31.10:dbv_functions
Transferring dbvisit to host 10.227.31.10:dbvisit
Transferring dbvisit_setup to host 10.227.31.10:dbvisit_setup
Transferring dbv_oraStartStop to host 10.227.31.10:dbv_oraStartStop
Transferring dbv_dbvprod1.env to host 10.227.31.10:dbv_dbvprod1.env
Transferring dbv_ORACLE_SID.env to host 10.227.31.10:dbv_ORACLE_SID.env
Contacting Standby Database dbvprod1 on 10.227.31.10...
200804111101 - Problem with obtaining the last sequence from standby database on 10.227.31.10.
================================================== ===========
Dbvisit Standby Database Technology (5.1.21.1393)
================================================== ===========
Dbvisit Error: 705.

Unknown host server db1.1918.dr.prodata.com. Server name db1.1918.dr.prodata.com not found in Dbvisit Database configuration (DDC)
file dbv_dbvprod1.env. Server names in Dbvisit Database configuration (DDC) file are db1.1918.ash.prodata.com and 10.227.31.10.
HOSTNAME_CMD is set, so hostname is determined by HOSTNAME_CMD (/bin/hostname). Please ensure this command returns the correct hostname.
Note that server names are case sensitive.

================================================== ===========
Dbvisit Standby Database Technology
================================================== ===========
Please check Standby Database is up and runnning on 10.227.31.10, else please contact Dbvisit support.
Dbvisit terminated.
Return code = 193

Arjen Visser
04-12-2008, 09:40 AM
Answer
In order for Dbvisit to determine which function to perform (primary database functions or standby database functions) it compares the DESTINATION and SOURCE parameter to the hostname command of the server.
If you use an IP address for the DESTINATION, then this will not match what is returned by the hostname command on the server and Dbvisit will error.

There is a way round this by setting the HOSTNAME_CMD variable in the DDC file.
If this is set, then Dbvisit does not use the hostname command, but the result of HOSTNAME_CMD.

For example:
HOSTNAME_CMD=/usr/local/dbvisit/hostname.sh

If hostname.sh contains:
echo 10.236.34.9

Then Dbvisit will accept this IP address as the hostname.

This is useful when Dbvisit is used in a cluster and the virtual cluster name should be used instead of the physical hostname.