NETTYPE and sqlhosts workings
Posted in 2000
Topics: Server Administration, Networking & sqlhosts Configuration, Platform-Specific Issues, Versions, Editions & End-of-Life
The facts: IDS 7.31.UC2 on HP K260 w/ HP-UX 10.20
If I have the following in my $ONCONFIG:
NETTYPE ipcshm,2,75,CPU
NETTYPE soctcp,2,75,NET
But only have the following in my sqlhosts file:
ndrmain onsoctcp ndrmain sqlexec
Does this mean that my server will only handle socket connections, and
not shared mem connections? Does the $ONCONFIG NETTYPE ipcshm line make
the server handle shared mem connections even though the sqlhosts file
does not specify ipcshm? Do I need to add another line to the sqlhosts
file for shared mem?
The doc mentions creating a DBSERVERALIAS for my DBSERVERNAME, and then
using that alias in sqlhosts for onipcshm connections. Why would I want
to use an alias for shmem connections? Its simple: If a client app is
running local, use shmem. If its running across the n/w, use a n/w
connection.
Am I trying to read too much into this?
Thanks for any help
Allen
allenj wrote:
> The facts: IDS 7.31.UC2 on HP K260 w/ HP-UX 10.20
>
> If I have the following in my $ONCONFIG:
> NETTYPE ipcshm,2,75,CPU
> NETTYPE soctcp,2,75,NET>
> But only have the following in my sqlhosts file:
> ndrmain onsoctcp ndrmain sqlexec>
> Does this mean that my server will only handle socket connections, and
Yes.
>
> not shared mem connections? Does the $ONCONFIG NETTYPE ipcshm line make
> the server handle shared mem connections even though the sqlhosts file
> does not specify ipcshm? Do I need to add another line to the sqlhosts
> file for shared mem?
>
Yes.
>
> The doc mentions creating a DBSERVERALIAS for my DBSERVERNAME, and then
> using that alias in sqlhosts for onipcshm connections. Why would I want
>
Yes you must have a separate alias to use on each line in the sqlhosts file
for each
protocol. On the other hand on a remote client machine there is no reason
you
cannot use the same name as the server side uses for shared memory for
network
connections. I use DBSERVERNAME for the ipcshm connection on the server
but make that name an alias for the tlitcp connection on clients. Thus:
DBSERVERNAME ids7n125 #Informix IDS 7 on machine n125DBSERVERALIASES ids7n125_tcp,ids7n125_fddi #Ethernet & FDDI connects
Server sqlhosts:
ids7n125 onipcshm n125 sqlexec
ids7n125_tcp ontlitcp n125 sqltcp
ids7n125_fddi ontlitcp n125fddi sqlfddi
Client sqlhosts
ids7n125 ontlitcp n125fddi sqlfddi
ids7n125_tcp ontlitcp n125 sqltcp
ids7n125_fddi ontlitcp n125fddi sqlfddi
Remeber it is the combination of hostname and service that the engine is
listening for
on the network and the actual servername is ONLY used to lookup the correct
hostname, protocol, and service in the sqlhosts file so you can fudge in
this way.
By doing this I just set INFORMIXSERVER=ids7n125 in all the client
environments and use the primary servername exclusively in CONNECT
statements and I can run the apps on either client or server.
Art S. Kagel
> to use an alias for shmem connections? Its simple: If a client app is
> running local, use shmem. If its running across the n/w, use a n/w
> connection.
>
> Am I trying to read too much into this?
>
> Thanks for any help
>
> Allen