Sqlhost entry on the client server
Posted in 2016
A poster consolidating two Informix instances onto one host asked how client and server sqlhosts/etc/services entries interact, since his two client machines both used the service name "sv" but mapped it to different ports (750 and 7002). Answers: the server's sqlhosts tells the engine which ports to listen on at startup; the client's sqlhosts tells applications which host/port to connect to. Only the resolved port number must match -- service names on clients need not match the server's, though keeping them consistent avoids confusion. Also noted: onipcshm (shared memory) entries are useless on remote clients, and the shared-memory line should use a dummy service name not shared with a real TCP port, to avoid flaky connections.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Security, Permissions & Auditing, Networking & sqlhosts Configuration
Hi All,
I have two client server and one database server.
In the database server sqlhost file defined as
db1 onipcshm serverA sv
db1.1 onsoctcp ServerA sv
db2 onipcshm serverA sv1
db2.1 onsoctcp ServerA sv1
etc/services
sv -750
sv1 -7002
Client A
db1 onipcshm serverA sv
db1.1 onsoctcp ServerA sv
/etc/services
sv 750/tcp
Client B
db2 onipcshm serverA sv
db2.1 onsoctcp ServerA sv
/etc/services
sv 7002/tcp
If the connection happened from client server A and how they use services
port i..e using client port no or server port no?
if the client sqlhost file is used then What is the role of server sqlhost
file?
Thank you very much
--001a113f0e7cc55492052cfdee51
The SERVER sqlhosts file is used to set up listeners on the ports that are
listed for the onsoctcp entries in the file. So when your server (serverA)
is running, it will be listening on ports 750 and 7002 for incoming
connections.
The CLIENT sqlhosts file is used so the applications know where to connect
to - server address and port. Note how the client sqlhosts refers to the
remote server (serverA) and not the local server.
By the way, the onipcshm connections (shared memory) in the client sqlhosts
file are of no value - unless those clients reside on ServerA.
Mike Walker
Advanced DataTools
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of medkba
Sent: Tuesday, March 01, 2016 7:54 AM
To: ids@iiug.org
Subject: Sqlhost entry on the client server [36668]
Hi All,
I have two client server and one database server.
In the database server sqlhost file defined as
db1 onipcshm serverA sv
db1.1 onsoctcp ServerA sv
db2 onipcshm serverA sv1
db2.1 onsoctcp ServerA sv1
etc/services
sv -750
sv1 -7002
Client A
db1 onipcshm serverA sv
db1.1 onsoctcp ServerA sv
/etc/services
sv 750/tcp
Client B
db2 onipcshm serverA sv
db2.1 onsoctcp ServerA sv
/etc/services
sv 7002/tcp
If the connection happened from client server A and how they use services
port i..e using client port no or server port no?
if the client sqlhost file is used then What is the role of server sqlhost
file?
Thank you very much
--001a113f0e7cc55492052cfdee51
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
Original post:
Hi All,
I have two client server and one database server.
In the database server sqlhost file defined as
db1 onipcshm serverA sv
db1.1 onsoctcp ServerA sv
db2 onipcshm serverA sv1
db2.1 onsoctcp ServerA sv1
etc/services
sv -750
sv1 -7002
Client A
db1 onipcshm serverA sv
db1.1 onsoctcp ServerA sv
/etc/services
sv 750/tcp
Client B
db2 onipcshm serverA sv
db2.1 onsoctcp ServerA sv
/etc/services
sv 7002/tcp
If the connection happened from client server A and how they use services
port i..e using client port no or server port no?
if the client sqlhost file is used then What is the role of server sqlhost
file?
Thank you very much
Response:
So the sqlhosts file on the server is what the server looks at, during start
up, to listen on the specific ports it's configured to listen on (so to be
able accept those connections coming into those ports). The sqlhosts file on
the client is what the client application looks at, to make sure it attempts
it's connection to the correct machine/port number combination.
So if a client from Client A, having INFORMIXSERVER set to db1.1 (which is the
only 1 that would work if machine Client A was different then ServerA as
shared memory protocol can only be used when on the same machine) tried to
connect. It looks at the sqlhosts file on ClientA and looks for the line where
the servername was "db1.1". It finds that line and gets the remote machine
name, ServerA, and the service name, sv. Then the appropriate OS library calls
are made to get the IP address of ServerA and the port number associated with
service sv. Once that's looked up the appropriate network calls are made to
attempt to connect to that port on that machine.
So the sqlhosts file on the client machines tell the client where the server
is supposed to be, and the sqlhost files on the server machine tells the
server what port it needs to start listening on to be able to accept incoming
connections.
Jacques Renaut
IBM Informix Advanced Support
APD Team
Thank you very much Mike Walker
But the current setup is *client server A* and *client server B* is using
the name SV but the /etc/Services defined different port.
In the server side SV and SV1. Is it required to change client to adapt
same as server side?
By the way, the onipcshm connections (shared memory) in the client sqlhosts
file are of no value - unless those clients reside on ServerA.
>> Will remove this entry
On Tue, Mar 1, 2016 at 11:07 PM, Mike Walker <mike@advancedatatools.com>
wrote:
> The SERVER sqlhosts file is used to set up listeners on the ports that are
> listed for the onsoctcp entries in the file. So when your server (serverA)
> is running, it will be listening on ports 750 and 7002 for incoming
> connections.
>
> The CLIENT sqlhosts file is used so the applications know where to connect
> to - server address and port. Note how the client sqlhosts refers to the
> remote server (serverA) and not the local server.
>
> By the way, the onipcshm connections (shared memory) in the client sqlhosts
> file are of no value - unless those clients reside on ServerA.
>
> Mike Walker
> Advanced DataTools
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> medkba
> Sent: Tuesday, March 01, 2016 7:54 AM
> To: ids@iiug.org
> Subject: Sqlhost entry on the client server [36668]
>
> Hi All,
>
> I have two client server and one database server.
>
> In the database server sqlhost file defined as
>
> db1 onipcshm serverA sv
> db1.1 onsoctcp ServerA sv
> db2 onipcshm serverA sv1
> db2.1 onsoctcp ServerA sv1>
> etc/services
> sv -750
> sv1 -7002
>
> Client A
> db1 onipcshm serverA sv
> db1.1 onsoctcp ServerA sv>
> /etc/services
> sv 750/tcp
>
> Client B
> db2 onipcshm serverA sv
> db2.1 onsoctcp ServerA sv>
> /etc/services
> sv 7002/tcp
>
> If the connection happened from client server A and how they use services
> port i..e using client port no or server port no?
>
> if the client sqlhost file is used then What is the role of server sqlhost
> file?
>
> Thank you very much
>
> --001a113f0e7cc55492052cfdee51
>
>
> ****************************************************************************
> ***
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--047d7bf0c28e84efb0052cfe3703
The sv and sv1 are only used to look up the port number in /etc/services -
it's the port number that is important. Once the client connection has the
port that is what is used to establish the connection.
The service name in sqlhosts entry in /etc/services on the client does NOT
need to match that used by the server - just the port number.
So this set up is fine, but is confusing because Client B is has the service
name of "sv" using port 7002, where on the server, "sv" refers to port 750.
It is not necessary to change the name in the client, but might simply be
less confusing.
Mike Walker
Advanced DataTools
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of medkba
Sent: Tuesday, March 01, 2016 8:14 AM
To: ids@iiug.org
Subject: Re: Sqlhost entry on the client server [36671]
Thank you very much Mike Walker
But the current setup is *client server A* and *client server B* is using
the name SV but the /etc/Services defined different port.
In the server side SV and SV1. Is it required to change client to adapt same
as server side?
By the way, the onipcshm connections (shared memory) in the client sqlhosts
file are of no value - unless those clients reside on ServerA.
>> Will remove this entry
On Tue, Mar 1, 2016 at 11:07 PM, Mike Walker <mike@advancedatatools.com>
wrote:
> The SERVER sqlhosts file is used to set up listeners on the ports that are
> listed for the onsoctcp entries in the file. So when your server (serverA)
> is running, it will be listening on ports 750 and 7002 for incoming
> connections.
>
> The CLIENT sqlhosts file is used so the applications know where to connect
> to - server address and port. Note how the client sqlhosts refers to the
> remote server (serverA) and not the local server.
>
> By the way, the onipcshm connections (shared memory) in the client
sqlhosts
> file are of no value - unless those clients reside on ServerA.
>
> Mike Walker
> Advanced DataTools
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> medkba
> Sent: Tuesday, March 01, 2016 7:54 AM
> To: ids@iiug.org
> Subject: Sqlhost entry on the client server [36668]
>
> Hi All,
>
> I have two client server and one database server.
>
> In the database server sqlhost file defined as
>
> db1 onipcshm serverA sv
> db1.1 onsoctcp ServerA sv
> db2 onipcshm serverA sv1
> db2.1 onsoctcp ServerA sv1>
> etc/services
> sv -750
> sv1 -7002
>
> Client A
> db1 onipcshm serverA sv
> db1.1 onsoctcp ServerA sv>
> /etc/services
> sv 750/tcp
>
> Client B
> db2 onipcshm serverA sv
> db2.1 onsoctcp ServerA sv>
> /etc/services
> sv 7002/tcp
>
> If the connection happened from client server A and how they use services
> port i..e using client port no or server port no?
>
> if the client sqlhost file is used then What is the role of server sqlhost
> file?
>
> Thank you very much
>
> --001a113f0e7cc55492052cfdee51
>
>
>
****************************************************************************
> ***
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
****************************************************************************
***
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--047d7bf0c28e84efb0052cfe3703
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
It is because two different client server and different database server as
well. No issue on the name i.e.SV. but now consolidating to one DB server
so the service name should be unique. I.e.SV and SV1. but client servers
side use the name SV but different port. In this case, is it require to
change client name as SV and SV1.
Thank you very much
On 1 Mar 2016 11:24 pm, "Mike Walker" <mike@advancedatatools.com> wrote:
> The sv and sv1 are only used to look up the port number in /etc/services -
> it's the port number that is important. Once the client connection has the
> port that is what is used to establish the connection.
>
> The service name in sqlhosts entry in /etc/services on the client does NOT
> need to match that used by the server - just the port number.
>
> So this set up is fine, but is confusing because Client B is has the
> service
> name of "sv" using port 7002, where on the server, "sv" refers to port 750.
> It is not necessary to change the name in the client, but might simply be
> less confusing.
>
> Mike Walker
> Advanced DataTools
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> medkba
> Sent: Tuesday, March 01, 2016 8:14 AM
> To: ids@iiug.org
> Subject: Re: Sqlhost entry on the client server [36671]
>
> Thank you very much Mike Walker
>
> But the current setup is *client server A* and *client server B* is using
> the name SV but the /etc/Services defined different port.
>
> In the server side SV and SV1. Is it required to change client to adapt
> same
> as server side?
>
> By the way, the onipcshm connections (shared memory) in the client sqlhosts
> file are of no value - unless those clients reside on ServerA.
> >> Will remove this entry
>
> On Tue, Mar 1, 2016 at 11:07 PM, Mike Walker <mike@advancedatatools.com>
> wrote:
>
> > The SERVER sqlhosts file is used to set up listeners on the ports that
> are
>
> > listed for the onsoctcp entries in the file. So when your server
> (serverA)
>
> > is running, it will be listening on ports 750 and 7002 for incoming
> > connections.
> >
> > The CLIENT sqlhosts file is used so the applications know where to
> connect
>
> > to - server address and port. Note how the client sqlhosts refers to the
> > remote server (serverA) and not the local server.
> >
> > By the way, the onipcshm connections (shared memory) in the client
> sqlhosts
> > file are of no value - unless those clients reside on ServerA.
> >
> > Mike Walker
> > Advanced DataTools
> >
> > -----Original Message-----
> > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> > medkba
> > Sent: Tuesday, March 01, 2016 7:54 AM
> > To: ids@iiug.org
> > Subject: Sqlhost entry on the client server [36668]
> >
> > Hi All,
> >
> > I have two client server and one database server.
> >
> > In the database server sqlhost file defined as
> >
> > db1 onipcshm serverA sv
> > db1.1 onsoctcp ServerA sv
> > db2 onipcshm serverA sv1
> > db2.1 onsoctcp ServerA sv1> >
> > etc/services
> > sv -750
> > sv1 -7002
> >
> > Client A
> > db1 onipcshm serverA sv
> > db1.1 onsoctcp ServerA sv> >
> > /etc/services
> > sv 750/tcp
> >
> > Client B
> > db2 onipcshm serverA sv
> > db2.1 onsoctcp ServerA sv> >
> > /etc/services
> > sv 7002/tcp
> >
> > If the connection happened from client server A and how they use services
> > port i..e using client port no or server port no?
> >
> > if the client sqlhost file is used then What is the role of server
> sqlhost
>
> > file?
> >
> > Thank you very much
> >
> > --001a113f0e7cc55492052cfdee51
> >
> >
> >
>
> ****************************************************************************
>
> > ***
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
> >
> >
>
> ****************************************************************************
> ***
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --047d7bf0c28e84efb0052cfe3703
>
>
> ****************************************************************************
> ***
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a1141b24ef2b377052cfe76c3
Don't worry about the NAME of the service used in the sqlhosts on the client
- what matters is the port in /etc/services that it maps to, and that must
be consistent with the port number on the server.
When you consolidate the servers, you will probably remove one of the
listeners on the server (although you don't have to - but let's assume
that's your plan).
Let's say that you remove the db2.* entries from the sqlhosts on the server
side. Now you will expect all traffic to come in to the db1 listener on
port 750. In that case, change the /etc/services on both clients so that
"sv" points to port 750. You may also want to change the server name used
for Client B to be db1.1 to avoid any confusion. If both servers have been
consolidated into one, then I would expect the sqlhosts on both Client A and
Client B to be the same, although technically they don't have to be.
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of medkba
Sent: Tuesday, March 01, 2016 8:32 AM
To: ids@iiug.org
Subject: RE: Sqlhost entry on the client server [36673]
It is because two different client server and different database server as
well. No issue on the name i.e.SV. but now consolidating to one DB server so
the service name should be unique. I.e.SV and SV1. but client servers side
use the name SV but different port. In this case, is it require to change
client name as SV and SV1.
Thank you very much
On 1 Mar 2016 11:24 pm, "Mike Walker" <mike@advancedatatools.com> wrote:
> The sv and sv1 are only used to look up the port number in
> /etc/services - it's the port number that is important. Once the
> client connection has the port that is what is used to establish the
connection.
>
> The service name in sqlhosts entry in /etc/services on the client does
> NOT need to match that used by the server - just the port number.
>
> So this set up is fine, but is confusing because Client B is has the
> service name of "sv" using port 7002, where on the server, "sv" refers
> to port 750.
> It is not necessary to change the name in the client, but might simply
> be less confusing.
>
> Mike Walker
> Advanced DataTools
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> medkba
> Sent: Tuesday, March 01, 2016 8:14 AM
> To: ids@iiug.org
> Subject: Re: Sqlhost entry on the client server [36671]
>
> Thank you very much Mike Walker
>
> But the current setup is *client server A* and *client server B* is
> using the name SV but the /etc/Services defined different port.
>
> In the server side SV and SV1. Is it required to change client to
> adapt same as server side?
>
> By the way, the onipcshm connections (shared memory) in the client
> sqlhosts file are of no value - unless those clients reside on ServerA.
> >> Will remove this entry
>
> On Tue, Mar 1, 2016 at 11:07 PM, Mike Walker
> <mike@advancedatatools.com>
> wrote:
>
> > The SERVER sqlhosts file is used to set up listeners on the ports
> > that
> are
>
> > listed for the onsoctcp entries in the file. So when your server
> (serverA)
>
> > is running, it will be listening on ports 750 and 7002 for incoming
> > connections.
> >
> > The CLIENT sqlhosts file is used so the applications know where to
> connect
>
> > to - server address and port. Note how the client sqlhosts refers to
> > the remote server (serverA) and not the local server.
> >
> > By the way, the onipcshm connections (shared memory) in the client
> sqlhosts
> > file are of no value - unless those clients reside on ServerA.
> >
> > Mike Walker
> > Advanced DataTools
> >
> > -----Original Message-----
> > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf
> > Of medkba
> > Sent: Tuesday, March 01, 2016 7:54 AM
> > To: ids@iiug.org
> > Subject: Sqlhost entry on the client server [36668]
> >
> > Hi All,
> >
> > I have two client server and one database server.
> >
> > In the database server sqlhost file defined as
> >
> > db1 onipcshm serverA sv
> > db1.1 onsoctcp ServerA sv
> > db2 onipcshm serverA sv1
> > db2.1 onsoctcp ServerA sv1> >
> > etc/services
> > sv -750
> > sv1 -7002
> >
> > Client A
> > db1 onipcshm serverA sv
> > db1.1 onsoctcp ServerA sv> >
> > /etc/services
> > sv 750/tcp
> >
> > Client B
> > db2 onipcshm serverA sv
> > db2.1 onsoctcp ServerA sv> >
> > /etc/services
> > sv 7002/tcp
> >
> > If the connection happened from client server A and how they use
> > services port i..e using client port no or server port no?
> >
> > if the client sqlhost file is used then What is the role of server
> sqlhost
>
> > file?
> >
> > Thank you very much
> >
> > --001a113f0e7cc55492052cfdee51
> >
> >
> >
>
> **********************************************************************
> ******
>
> > ***
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
> >
> >
>
> **********************************************************************
> ******
> ***
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --047d7bf0c28e84efb0052cfe3703
>
>
> **********************************************************************
> ******
> ***
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
****************************************************************************
***
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a1141b24ef2b377052cfe76c3
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
Please note that it is NOT recommended for the shared memory connection to
use the same port number or service name as any network connection.
Although shared memory connections don't actually use any ports and the
port/service for those lines in the sqlhosts file are just placeholders
that do not have to be real port numbers of defined service names, having
it the same as an actual port used by a network connection to the same
server will often cause flaky connection problems. I would change the
shared memory connection lines to read:
db1 onipcshm serverA shmdummy1
db2 onipcshm serverA shmdummy2
There is no requirement to enter shmdummy1 or shmdummy2 into the
/etc/services file and assign a port number to either.
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Tue, Mar 1, 2016 at 10:10 AM, JACQUES RENAUT <jrenaut@us.ibm.com> wrote:
> Original post:
>
> Hi All,
>
> I have two client server and one database server.
>
> In the database server sqlhost file defined as
>
> db1 onipcshm serverA sv
> db1.1 onsoctcp ServerA sv
> db2 onipcshm serverA sv1
> db2.1 onsoctcp ServerA sv1>
> etc/services
> sv -750
> sv1 -7002
>
> Client A
> db1 onipcshm serverA sv
> db1.1 onsoctcp ServerA sv>
> /etc/services
> sv 750/tcp
>
> Client B
> db2 onipcshm serverA sv
> db2.1 onsoctcp ServerA sv>
> /etc/services
> sv 7002/tcp
>
> If the connection happened from client server A and how they use services
> port i..e using client port no or server port no?
>
> if the client sqlhost file is used then What is the role of server sqlhost
> file?
>
> Thank you very much
>
> Response:
>
> So the sqlhosts file on the server is what the server looks at, during
> start
> up, to listen on the specific ports it's configured to listen on (so to be
> able accept those connections coming into those ports). The sqlhosts file
> on
> the client is what the client application looks at, to make sure it
> attempts
> it's connection to the correct machine/port number combination.
>
> So if a client from Client A, having INFORMIXSERVER set to db1.1 (which is
> the
> only 1 that would work if machine Client A was different then ServerA as
> shared memory protocol can only be used when on the same machine) tried to
> connect. It looks at the sqlhosts file on ClientA and looks for the line
> where
> the servername was "db1.1". It finds that line and gets the remote machine
> name, ServerA, and the service name, sv. Then the appropriate OS library
> calls
> are made to get the IP address of ServerA and the port number associated
> with
> service sv. Once that's looked up the appropriate network calls are made to
> attempt to connect to that port on that machine.
>
> So the sqlhosts file on the client machines tell the client where the
> server
> is supposed to be, and the sqlhost files on the server machine tells the
> server what port it needs to start listening on to be able to accept
> incoming
> connections.
>
> Jacques Renaut
> IBM Informix Advanced Support
> APD Team
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a113eb324c2426e052d000ad9
Thank you very much Art Kagel
On 2 Mar 2016 1:25 am, "Art Kagel" <art.kagel@gmail.com> wrote:
> Please note that it is NOT recommended for the shared memory connection to
> use the same port number or service name as any network connection.
> Although shared memory connections don't actually use any ports and the
> port/service for those lines in the sqlhosts file are just placeholders
> that do not have to be real port numbers of defined service names, having
> it the same as an actual port used by a network connection to the same
> server will often cause flaky connection problems. I would change the
> shared memory connection lines to read:
>
> db1 onipcshm serverA shmdummy1
> db2 onipcshm serverA shmdummy2>
> There is no requirement to enter shmdummy1 or shmdummy2 into the
> /etc/services file and assign a port number to either.
>
> Art
>
> Art S. Kagel, President and Principal Consultant
> ASK Database Management
> www.askdbmgt.com
>
> Blog: http://informix-myview.blogspot.com/
>
> Disclaimer: Please keep in mind that my own opinions are my own opinions
> and do not reflect on the IIUG, nor any other organization with which I am
> associated either explicitly, implicitly, or by inference. Neither do
> those opinions reflect those of other individuals affiliated with any
> entity with which I am affiliated nor those of the entities themselves.
>
> On Tue, Mar 1, 2016 at 10:10 AM, JACQUES RENAUT <jrenaut@us.ibm.com>
> wrote:
>
> > Original post:
> >
> > Hi All,
> >
> > I have two client server and one database server.
> >
> > In the database server sqlhost file defined as
> >
> > db1 onipcshm serverA sv
> > db1.1 onsoctcp ServerA sv
> > db2 onipcshm serverA sv1
> > db2.1 onsoctcp ServerA sv1> >
> > etc/services
> > sv -750
> > sv1 -7002
> >
> > Client A
> > db1 onipcshm serverA sv
> > db1.1 onsoctcp ServerA sv> >
> > /etc/services
> > sv 750/tcp
> >
> > Client B
> > db2 onipcshm serverA sv
> > db2.1 onsoctcp ServerA sv> >
> > /etc/services
> > sv 7002/tcp
> >
> > If the connection happened from client server A and how they use services
> > port i..e using client port no or server port no?
> >
> > if the client sqlhost file is used then What is the role of server
> sqlhost
> > file?
> >
> > Thank you very much
> >
> > Response:
> >
> > So the sqlhosts file on the server is what the server looks at, during
> > start
> > up, to listen on the specific ports it's configured to listen on (so to
> be
> > able accept those connections coming into those ports). The sqlhosts file
> > on
> > the client is what the client application looks at, to make sure it
> > attempts
> > it's connection to the correct machine/port number combination.
> >
> > So if a client from Client A, having INFORMIXSERVER set to db1.1 (which
> is
> > the
> > only 1 that would work if machine Client A was different then ServerA as
> > shared memory protocol can only be used when on the same machine) tried
> to
> > connect. It looks at the sqlhosts file on ClientA and looks for the line
> > where
> > the servername was "db1.1". It finds that line and gets the remote
> machine
> > name, ServerA, and the service name, sv. Then the appropriate OS library
> > calls
> > are made to get the IP address of ServerA and the port number associated
> > with
> > service sv. Once that's looked up the appropriate network calls are made
> to
> > attempt to connect to that port on that machine.
> >
> > So the sqlhosts file on the client machines tell the client where the
> > server
> > is supposed to be, and the sqlhost files on the server machine tells the
> > server what port it needs to start listening on to be able to accept
> > incoming
> > connections.
> >
> > Jacques Renaut
> > IBM Informix Advanced Support
> > APD Team
> >
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --001a113eb324c2426e052d000ad9
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--089e013a0c1e4aef08052d06a71a
Two instances into one host so that we need to have two entry sv and sv1.
I undserstand that listening port on server side for waiting for connection
at the same time application is also coming same port for the connection.
Am i right? If this is corrrect, i need to have both entry client and
server should be same.
Thank you very much Mike Walker
On 1 Mar 2016 11:51 pm, "Mike Walker" <mike@advancedatatools.com> wrote:
> Don't worry about the NAME of the service used in the sqlhosts on the
> client
> - what matters is the port in /etc/services that it maps to, and that must
> be consistent with the port number on the server.
>
> When you consolidate the servers, you will probably remove one of the
> listeners on the server (although you don't have to - but let's assume
> that's your plan).
>
> Let's say that you remove the db2.* entries from the sqlhosts on the server
> side. Now you will expect all traffic to come in to the db1 listener on
> port 750. In that case, change the /etc/services on both clients so that
> "sv" points to port 750. You may also want to change the server name used
> for Client B to be db1.1 to avoid any confusion. If both servers have been
> consolidated into one, then I would expect the sqlhosts on both Client A
> and
> Client B to be the same, although technically they don't have to be.
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> medkba
> Sent: Tuesday, March 01, 2016 8:32 AM
> To: ids@iiug.org
> Subject: RE: Sqlhost entry on the client server [36673]
>
> It is because two different client server and different database server as
> well. No issue on the name i.e.SV. but now consolidating to one DB server
> so
> the service name should be unique. I.e.SV and SV1. but client servers side
> use the name SV but different port. In this case, is it require to change
> client name as SV and SV1.
>
> Thank you very much
> On 1 Mar 2016 11:24 pm, "Mike Walker" <mike@advancedatatools.com> wrote:
>
> > The sv and sv1 are only used to look up the port number in
> > /etc/services - it's the port number that is important. Once the
> > client connection has the port that is what is used to establish the
> connection.
> >
> > The service name in sqlhosts entry in /etc/services on the client does
> > NOT need to match that used by the server - just the port number.
> >
> > So this set up is fine, but is confusing because Client B is has the
> > service name of "sv" using port 7002, where on the server, "sv" refers
> > to port 750.
> > It is not necessary to change the name in the client, but might simply
> > be less confusing.
> >
> > Mike Walker
> > Advanced DataTools
> >
> > -----Original Message-----
> > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> > medkba
> > Sent: Tuesday, March 01, 2016 8:14 AM
> > To: ids@iiug.org
> > Subject: Re: Sqlhost entry on the client server [36671]
> >
> > Thank you very much Mike Walker
> >
> > But the current setup is *client server A* and *client server B* is
> > using the name SV but the /etc/Services defined different port.
> >
> > In the server side SV and SV1. Is it required to change client to
> > adapt same as server side?
> >
> > By the way, the onipcshm connections (shared memory) in the client
> > sqlhosts file are of no value - unless those clients reside on ServerA.
> > >> Will remove this entry
> >
> > On Tue, Mar 1, 2016 at 11:07 PM, Mike Walker
> > <mike@advancedatatools.com>
> > wrote:
> >
> > > The SERVER sqlhosts file is used to set up listeners on the ports
> > > that
> > are
> >
> > > listed for the onsoctcp entries in the file. So when your server
> > (serverA)
> >
> > > is running, it will be listening on ports 750 and 7002 for incoming
> > > connections.
> > >
> > > The CLIENT sqlhosts file is used so the applications know where to
> > connect
> >
> > > to - server address and port. Note how the client sqlhosts refers to
> > > the remote server (serverA) and not the local server.
> > >
> > > By the way, the onipcshm connections (shared memory) in the client
> > sqlhosts
> > > file are of no value - unless those clients reside on ServerA.
> > >
> > > Mike Walker
> > > Advanced DataTools
> > >
> > > -----Original Message-----
> > > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf
> > > Of medkba
> > > Sent: Tuesday, March 01, 2016 7:54 AM
> > > To: ids@iiug.org
> > > Subject: Sqlhost entry on the client server [36668]
> > >
> > > Hi All,
> > >
> > > I have two client server and one database server.
> > >
> > > In the database server sqlhost file defined as
> > >
> > > db1 onipcshm serverA sv
> > > db1.1 onsoctcp ServerA sv
> > > db2 onipcshm serverA sv1
> > > db2.1 onsoctcp ServerA sv1> > >
> > > etc/services
> > > sv -750
> > > sv1 -7002
> > >
> > > Client A
> > > db1 onipcshm serverA sv
> > > db1.1 onsoctcp ServerA sv> > >
> > > /etc/services
> > > sv 750/tcp
> > >
> > > Client B
> > > db2 onipcshm serverA sv
> > > db2.1 onsoctcp ServerA sv> > >
> > > /etc/services
> > > sv 7002/tcp
> > >
> > > If the connection happened from client server A and how they use
> > > services port i..e using client port no or server port no?
> > >
> > > if the client sqlhost file is used then What is the role of server
> > sqlhost
> >
> > > file?
> > >
> > > Thank you very much
> > >
> > > --001a113f0e7cc55492052cfdee51
> > >
> > >
> > >
> >
> > **********************************************************************
> > ******
> >
> > > ***
> > > Forum Note: Use "Reply" to post a response in the discussion forum.
> > >
> > >
> > >
> > >
> >
> > **********************************************************************
> > ******
> > ***
> > > Forum Note: Use "Reply" to post a response in the discussion forum.
> > >
> > >
> >
> > --047d7bf0c28e84efb0052cfe3703
> >
> >
> > **********************************************************************
> > ******
> > ***
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
> >
> >
>
> ****************************************************************************
> ***
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --001a1141b24ef2b377052cfe76c3
>
>
> ****************************************************************************
> ***
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a1141b24ee15d95052d06bc82
Both the server and client must reference the same port, regardless of the
name that's being using in the services file.
Don't think of the client connection coming FROM a port - the sqlhosts on
the client just lists the port that the client must connect to on the
SERVER.
Mike
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of medkba
Sent: Tuesday, March 01, 2016 6:24 PM
To: ids@iiug.org
Subject: RE: Sqlhost entry on the client server [36686]
Two instances into one host so that we need to have two entry sv and sv1.
I undserstand that listening port on server side for waiting for connection
at the same time application is also coming same port for the connection.
Am i right? If this is corrrect, i need to have both entry client and server
should be same.
Thank you very much Mike Walker
On 1 Mar 2016 11:51 pm, "Mike Walker" <mike@advancedatatools.com> wrote:
> Don't worry about the NAME of the service used in the sqlhosts on the
> client
> - what matters is the port in /etc/services that it maps to, and that
> must be consistent with the port number on the server.
>
> When you consolidate the servers, you will probably remove one of the
> listeners on the server (although you don't have to - but let's assume
> that's your plan).
>
> Let's say that you remove the db2.* entries from the sqlhosts on the
> server side. Now you will expect all traffic to come in to the db1
> listener on port 750. In that case, change the /etc/services on both
> clients so that "sv" points to port 750. You may also want to change
> the server name used for Client B to be db1.1 to avoid any confusion.
> If both servers have been consolidated into one, then I would expect
> the sqlhosts on both Client A and Client B to be the same, although
> technically they don't have to be.
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> medkba
> Sent: Tuesday, March 01, 2016 8:32 AM
> To: ids@iiug.org
> Subject: RE: Sqlhost entry on the client server [36673]
>
> It is because two different client server and different database
> server as well. No issue on the name i.e.SV. but now consolidating to
> one DB server so the service name should be unique. I.e.SV and SV1.
> but client servers side use the name SV but different port. In this
> case, is it require to change client name as SV and SV1.
>
> Thank you very much
> On 1 Mar 2016 11:24 pm, "Mike Walker" <mike@advancedatatools.com> wrote:
>
> > The sv and sv1 are only used to look up the port number in
> > /etc/services - it's the port number that is important. Once the
> > client connection has the port that is what is used to establish the
> connection.
> >
> > The service name in sqlhosts entry in /etc/services on the client
> > does NOT need to match that used by the server - just the port number.
> >
> > So this set up is fine, but is confusing because Client B is has the
> > service name of "sv" using port 7002, where on the server, "sv"
> > refers to port 750.
> > It is not necessary to change the name in the client, but might
> > simply be less confusing.
> >
> > Mike Walker
> > Advanced DataTools
> >
> > -----Original Message-----
> > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf
> > Of medkba
> > Sent: Tuesday, March 01, 2016 8:14 AM
> > To: ids@iiug.org
> > Subject: Re: Sqlhost entry on the client server [36671]
> >
> > Thank you very much Mike Walker
> >
> > But the current setup is *client server A* and *client server B* is
> > using the name SV but the /etc/Services defined different port.
> >
> > In the server side SV and SV1. Is it required to change client to
> > adapt same as server side?
> >
> > By the way, the onipcshm connections (shared memory) in the client
> > sqlhosts file are of no value - unless those clients reside on ServerA.
> > >> Will remove this entry
> >
> > On Tue, Mar 1, 2016 at 11:07 PM, Mike Walker
> > <mike@advancedatatools.com>
> > wrote:
> >
> > > The SERVER sqlhosts file is used to set up listeners on the ports
> > > that
> > are
> >
> > > listed for the onsoctcp entries in the file. So when your server
> > (serverA)
> >
> > > is running, it will be listening on ports 750 and 7002 for
> > > incoming connections.
> > >
> > > The CLIENT sqlhosts file is used so the applications know where to
> > connect
> >
> > > to - server address and port. Note how the client sqlhosts refers
> > > to the remote server (serverA) and not the local server.
> > >
> > > By the way, the onipcshm connections (shared memory) in the client
> > sqlhosts
> > > file are of no value - unless those clients reside on ServerA.
> > >
> > > Mike Walker
> > > Advanced DataTools
> > >
> > > -----Original Message-----
> > > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf
> > > Of medkba
> > > Sent: Tuesday, March 01, 2016 7:54 AM
> > > To: ids@iiug.org
> > > Subject: Sqlhost entry on the client server [36668]
> > >
> > > Hi All,
> > >
> > > I have two client server and one database server.
> > >
> > > In the database server sqlhost file defined as
> > >
> > > db1 onipcshm serverA sv
> > > db1.1 onsoctcp ServerA sv
> > > db2 onipcshm serverA sv1
> > > db2.1 onsoctcp ServerA sv1> > >
> > > etc/services
> > > sv -750
> > > sv1 -7002
> > >
> > > Client A
> > > db1 onipcshm serverA sv
> > > db1.1 onsoctcp ServerA sv> > >
> > > /etc/services
> > > sv 750/tcp
> > >
> > > Client B
> > > db2 onipcshm serverA sv
> > > db2.1 onsoctcp ServerA sv> > >
> > > /etc/services
> > > sv 7002/tcp
> > >
> > > If the connection happened from client server A and how they use
> > > services port i..e using client port no or server port no?
> > >
> > > if the client sqlhost file is used then What is the role of server
> > sqlhost
> >
> > > file?
> > >
> > > Thank you very much
> > >
> > > --001a113f0e7cc55492052cfdee51
> > >
> > >
> > >
> >
> > ********************************************************************
> > **
> > ******
> >
> > > ***
> > > Forum Note: Use "Reply" to post a response in the discussion forum.
> > >
> > >
> > >
> > >
> >
> > ********************************************************************
> > **
> > ******
> > ***
> > > Forum Note: Use "Reply" to post a response in the discussion forum.
> > >
> > >
> >
> > --047d7bf0c28e84efb0052cfe3703
> >
> >
> > ********************************************************************
> > **
> > ******
> > ***
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
> >
> >
>
> **********************************************************************
> ******
> ***
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --001a1141b24ef2b377052cfe76c3
>
>
> ************
Yes. As Mike said, the service names do not have to be the same only the
port numbers, However, to eliminate confusion for users and administrators
and simplify administration it is a good idea for service names to
represent the same port numbers on all hosts on your network.
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Tue, Mar 1, 2016 at 8:24 PM, medkba <medkba@gmail.com> wrote:
> Two instances into one host so that we need to have two entry sv and sv1.
> I undserstand that listening port on server side for waiting for connection
> at the same time application is also coming same port for the connection.
> Am i right? If this is corrrect, i need to have both entry client and
> server should be same.
>
> Thank you very much Mike Walker
> On 1 Mar 2016 11:51 pm, "Mike Walker" <mike@advancedatatools.com> wrote:
>
> > Don't worry about the NAME of the service used in the sqlhosts on the
> > client
> > - what matters is the port in /etc/services that it maps to, and that
> must
> > be consistent with the port number on the server.
> >
> > When you consolidate the servers, you will probably remove one of the
> > listeners on the server (although you don't have to - but let's assume
> > that's your plan).
> >
> > Let's say that you remove the db2.* entries from the sqlhosts on the
> server
> > side. Now you will expect all traffic to come in to the db1 listener on
> > port 750. In that case, change the /etc/services on both clients so that
> > "sv" points to port 750. You may also want to change the server name used
> > for Client B to be db1.1 to avoid any confusion. If both servers have
> been
> > consolidated into one, then I would expect the sqlhosts on both Client A
> > and
> > Client B to be the same, although technically they don't have to be.
> >
> > -----Original Message-----
> > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> > medkba
> > Sent: Tuesday, March 01, 2016 8:32 AM
> > To: ids@iiug.org
> > Subject: RE: Sqlhost entry on the client server [36673]
> >
> > It is because two different client server and different database server
> as
> > well. No issue on the name i.e.SV. but now consolidating to one DB
> server
> > so
> > the service name should be unique. I.e.SV and SV1. but client servers
> side
> > use the name SV but different port. In this case, is it require to change
> > client name as SV and SV1.
> >
> > Thank you very much
> > On 1 Mar 2016 11:24 pm, "Mike Walker" <mike@advancedatatools.com> wrote:
> >
> > > The sv and sv1 are only used to look up the port number in
> > > /etc/services - it's the port number that is important. Once the
> > > client connection has the port that is what is used to establish the
> > connection.
> > >
> > > The service name in sqlhosts entry in /etc/services on the client does
> > > NOT need to match that used by the server - just the port number.
> > >
> > > So this set up is fine, but is confusing because Client B is has the
> > > service name of "sv" using port 7002, where on the server, "sv" refers
> > > to port 750.
> > > It is not necessary to change the name in the client, but might simply
> > > be less confusing.
> > >
> > > Mike Walker
> > > Advanced DataTools
> > >
> > > -----Original Message-----
> > > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> > > medkba
> > > Sent: Tuesday, March 01, 2016 8:14 AM
> > > To: ids@iiug.org
> > > Subject: Re: Sqlhost entry on the client server [36671]
> > >
> > > Thank you very much Mike Walker
> > >
> > > But the current setup is *client server A* and *client server B* is
> > > using the name SV but the /etc/Services defined different port.
> > >
> > > In the server side SV and SV1. Is it required to change client to
> > > adapt same as server side?
> > >
> > > By the way, the onipcshm connections (shared memory) in the client
> > > sqlhosts file are of no value - unless those clients reside on ServerA.
> > > >> Will remove this entry
> > >
> > > On Tue, Mar 1, 2016 at 11:07 PM, Mike Walker
> > > <mike@advancedatatools.com>
> > > wrote:
> > >
> > > > The SERVER sqlhosts file is used to set up listeners on the ports
> > > > that
> > > are
> > >
> > > > listed for the onsoctcp entries in the file. So when your server
> > > (serverA)
> > >
> > > > is running, it will be listening on ports 750 and 7002 for incoming
> > > > connections.
> > > >
> > > > The CLIENT sqlhosts file is used so the applications know where to
> > > connect
> > >
> > > > to - server address and port. Note how the client sqlhosts refers to
> > > > the remote server (serverA) and not the local server.
> > > >
> > > > By the way, the onipcshm connections (shared memory) in the client
> > > sqlhosts
> > > > file are of no value - unless those clients reside on ServerA.
> > > >
> > > > Mike Walker
> > > > Advanced DataTools
> > > >
> > > > -----Original Message-----
> > > > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf
> > > > Of medkba
> > > > Sent: Tuesday, March 01, 2016 7:54 AM
> > > > To: ids@iiug.org
> > > > Subject: Sqlhost entry on the client server [36668]
> > > >
> > > > Hi All,
> > > >
> > > > I have two client server and one database server.
> > > >
> > > > In the database server sqlhost file defined as
> > > >
> > > > db1 onipcshm serverA sv
> > > > db1.1 onsoctcp ServerA sv
> > > > db2 onipcshm serverA sv1
> > > > db2.1 onsoctcp ServerA sv1> > > >
> > > > etc/services
> > > > sv -750
> > > > sv1 -7002
> > > >
> > > > Client A
> > > > db1 onipcshm serverA sv
> > > > db1.1 onsoctcp ServerA sv> > > >
> > > > /etc/services
> > > > sv 750/tcp
> > > >
> > > > Client B
> > > > db2 onipcshm serverA sv
> > > > db2.1 onsoctcp ServerA sv> > > >
> > > > /etc/services
> > > > sv 7002/tcp
> > > >
> > > > If the connection happened from client server A and how they use
> > > > services port i..e using client port no or server port no?
> > > >
> > > > if the client sqlhost file is used then What is the role of server
> > > sqlhost
> > >
> > > > file?
> > > >
> > > > Thank you very much
> > > >
> > > > --001a113f0e7cc55492052cfdee51
> > > >
> > > >
> > > >
> > >
> > > **********************************************************************
> > > ******
> > >
> > > > ***
> > > > Forum Note: Use "Reply" to post a response in the discussion forum.
> > > >
> > > >
> > > >
> > > >
> > >
> > > **********************************************************************