Re: DB Server Alias
Posted in 2004
abanero@supereva.it (Abanero) wrote in message news:<ad9fb198.0405270320.7bc98fd5@posting.google.com>...
> Hi All,
>
> I have the following issue:
>
> I need to connect the same instance through 2 IP addresses, i read in
> this newsgroup that there is a variable in ONCONFIG file called
> DBSERVERALIASES, this variable permits to set more than one
> ipaddress/aliasName for the same instance after that I have to
> configure also sqlhost file to add a new tcp port for the second
> ipaddress that is associated to the new alias.
>
> example:
>
> Current ONCONFIG File:
>
> # System Configuration
>
> SERVERNUM 0 # Unique id corresponding to a OnLine> instance
> DBSERVERNAME rmtnms02 # Name of default database server
> DBSERVERALIASES # List of alternate dbservernames
> DEADLOCK_TIMEOUT 60 # Max time to wait of lock in> distributed env.
> RESIDENT 0 # Forced residency flag (Yes = 1, No =
> 0)
>
> MULTIPROCESSOR 1 # 0 for single-processor, 1 for> multi-processor
> NUMCPUVPS 8 # Number of user (cpu) vps
> SINGLE_CPU_VP 0 # If non-zero, limit number of cpu vps> to one
>
> NOAGE 1 # Process aging>
> Current configuration sqlhost file:
>
> ### START OF RMCONF CONFIG
> rmtnms02 ontlitcp rmtnms02 rmtnms02_tcp
> ###>
> New configuration:
>
> Current ONCONFIG File:
>
> # System Configuration
>
> SERVERNUM 0 # Unique id corresponding to a OnLine> instance
> DBSERVERNAME rmtnms02 # Name of default database server
> DBSERVERALIASES rmtnms02b # List of alternate> dbservernames
> DEADLOCK_TIMEOUT 60 # Max time to wait of lock in> distributed env.
> RESIDENT 0 # Forced residency flag (Yes = 1, No =
> 0)
>
> MULTIPROCESSOR 1 # 0 for single-processor, 1 for> multi-processor
> NUMCPUVPS 8 # Number of user (cpu) vps
> SINGLE_CPU_VP 0 # If non-zero, limit number of cpu vps> to one
>
> NOAGE 1 # Process aging>
> Current configuration sqlhost file:
>
> ### START OF RMCONF CONFIG
> rmtnms02 ontlitcp rmtnms02 rmtnms02_tcp
> rmtnms02 ontlitcp rmtnms02b rmtnms02b_port
> ###>
> I have already configured /etc/services for new tcp port
> (rmtnms02b_port).
>
> Is it the correct way to obtain two ipaddres to listen to two
> different port on
> the same instance?
>
> Thanks in advance,
> Abanero.
No, you have an error in your sqlhosts file! The first column in the
sqlhosts file contains your dbserver names specified via the
DBSERVERNAME and DBSERVERALIASES onconfig parameters. You can't have
two rows with the same dbserver name (rmtnms02) and no row with the
name rmtnms02b. It should look like this:
rmtnms02 ontlitcp rmtnms02 rmtnms02_tcp
rmtnms02b ontlitcp rmtnms02b rmtnms02b_port
The third column sets your listening IP-adress (through a host name
found in /etc/hosts or via DNS) and the fourth, as you mention, the
port number via /etc/services.
Regards Christian Eriksson