Re: DBSERVERALIASES
Posted in 1998
Vic Goldberg wrote:
> Hi folks --
> In order to allow easy migration to a new box, I'm trying to use more
> than one
> alias for a database with the same connection type. I just added the
> dwdev alias
> to my onconfig:
> DBSERVERNAME psdev # Name of default database server
> DBSERVERALIASES psdev_tcp # List of alternate dbservernames
> DBSERVERALIASES dwdev # List of alternate dbservernames vg
> 5/12/98
> In my sqlhosts, I've got:
> psdev onipcshm spef2n09 sqlexec
> psdev_tcp onsoctcp spef2n09 sqlexec
> dwdev onsoctcp spef2n09 sqlexec
> When I try to run with this, I get no errors bringing up the engine.
> But if I try to use
> either psdev_tcp (which used to work), or dwdev (the new one), I get an
> error in
> dbaccess saying that the "INFORMIXSERVER value is not in DBSERVERNAME or
> DBSERVERALIASES".
> What am I doing wrong? I was under the distinct impression that more
> than one
> socket based alias could use the same port. Or am I wrong?
You may only have one DBSERVERALIASES entry. For multiple aliases set
DBSERVERALIASES to a delimited list of names. Valid delimiters are
comma and colon. Hence:
DBSERVERNAME psdevDBSERVERALIASES dwdev,psdev_tcp
Also note that you may only have one alias using any service name. You
should have a separate service (port) for each name. Having the one
service for shared memory and TCP/IP worked fine because the service is
not used for shared memory connections and is just a dummy. (However,
when I had the same service for onipcshm and ontlitcp I noticed
excessive system call activity which cleared up when I changed the
service for onipcshm!)
Having said this, on a client machine, you can use the shared memory
hostname remotely by changing the sqlhosts entry to use the same host,
protocol, and service as one of the network connections, ie:
On the host:
psdev onipcshm spef2n09 sqlshm
psdev_tcp onsoctcp spef2n09 sqlexec
dwdev onsoctcp spef2n09 sqlexec2
On the client:
psdev onsoctcp spef2n09 sqlexec2
psdev_tcp onsoctcp spef2n09 sqlexec
dwdev onsoctcp spef2n09 sqlexec2
This will make psdev an alias for dwdev and if the hostnames
represented different paths to the same machine (ex: we have one
hostname that uses 100MB ethernet and another using FDDI to get to the
same machine) it would use the interface specified for dwdev not the
one specified.
Art S. Kagel
by psdev_tcp.