Shared memory connection - IDS 10.00.FC8 on HP-UX
Posted in 2010
A user running dbaccess from a shell script on HP-UX (IDS 10.00.FC8) found the session always used a shared-memory connection instead of TCP, despite having an onsoctcp entry in sqlhosts. Responders explained the connection path is chosen by INFORMIXSERVER, which must name an sqlhosts entry using onsoctcp (and be defined as DBSERVERNAME/DBSERVERALIAS in onconfig). When setting it didn't help, it was pointed out he used 'set' rather than 'export INFORMIXSERVER', and that a 'dbaccess db@server' syntax would override the variable. No confirmation back from the poster is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Server Administration, Networking & sqlhosts Configuration, Platform-Specific Issues, Versions, Editions & End-of-Life
HI all,
I have shell script which am running from server has dbaccess command (
example - dbaccess database_name test.sql ) (test.sql contains delete
statements)
while running this shell script it takes shared memory connection which I
can see through (onstat -g nss and ps -eaf)
I have set socket connection in .profile and in shell script as well as in
sqlhosts file (test_s1_tcp onsoctcp test test_s1_net b=8192)
My question is there any way to set socket connection for shell script
running dbaccess command ?
I want this shell script to take socket connection instead of shared memory
connection.
Thanks in advance
Rahul
--000e0cd144f0ded0640494b42826
Rahul,
If I understand you correctly you can add the following line to your shell
script.
INFORMIXSERVER=<tcp_connection>set INFORMIXSERVER
Why do you want to use the tcp connection rather than the shared memory one?
Unless you are going to communicate with an external instance it makes no
difference.
> To: ids@iiug.org
> From: myinformix@gmail.com
> Subject: Shared memory connection - IDS 10.00.FC8 on HP.... [21921]
> Date: Wed, 10 Nov 2010 10:03:31 -0500
>
> HI all,
>
> I have shell script which am running from server has dbaccess command (
> example - dbaccess database_name test.sql ) (test.sql contains delete
> statements)
>
> while running this shell script it takes shared memory connection which I
> can see through (onstat -g nss and ps -eaf)
>
> I have set socket connection in .profile and in shell script as well as in
> sqlhosts file (test_s1_tcp onsoctcp test test_s1_net b=8192)
>
> My question is there any way to set socket connection for shell script
> running dbaccess command ?
>
> I want this shell script to take socket connection instead of shared memory
> connection.
>
> Thanks in advance
>
> Rahul
>
> --000e0cd144f0ded0640494b42826
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
On Wed, Nov 10, 2010 at 3:03 PM, Rahul <myinformix@gmail.com> wrote:
> HI all,
>
> I have shell script which am running from server has dbaccess command (
> example - dbaccess database_name test.sql ) (test.sql contains delete
> statements)
>
> while running this shell script it takes shared memory connection which I
> can see through (onstat -g nss and ps -eaf)
>
> I have set socket connection in .profile and in shell script as well as in
> sqlhosts file (test_s1_tcp onsoctcp test test_s1_net b=8192)
>
> My question is there any way to set socket connection for shell script
> running dbaccess command ?
>
> I want this shell script to take socket connection instead of shared memory
> connection.
>
> Thanks in advance
>
> Rahul
>
> --000e0cd144f0ded0640494b42826
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
In Informix you can have several "listeners" for the same instance.
Each "listener" must have an entry in SQLHOSTS file and the corresponding
"INFORMIXSERVER" (first column in SQLHOSTS file) must be reference in either
DBSERVERNAME or DBSERVERALIAS entry in $ONCONFIG.
Assuming all this is properly setup, you define which connection to use by
changing your INFORMIXSERVER environment variable. This has to match an
SQLHOSTS entry which uses socket/tli protocol.
Regards.
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--00504502c3968743640494b4599d
The path that you take to get to the server is determined by the
INFORMIXSERVER environment variable. If you want to use the tcp connection
from a script, then you need to set your environment correctly within the
script.
From: "Rahul" <myinformix@gmail.com>
To: ids@iiug.org
Date: 11/10/2010 01:04 PM
Subject: Shared memory connection - IDS 10.00.FC8 on HP.... [21921]
Sent by: ids-bounces@iiug.org
HI all,
I have shell script which am running from server has dbaccess command (
example - dbaccess database_name test.sql ) (test.sql contains delete
statements)
while running this shell script it takes shared memory connection which I
can see through (onstat -g nss and ps -eaf)
I have set socket connection in .profile and in shell script as well as in
sqlhosts file (test_s1_tcp onsoctcp test test_s1_net b=8192)
My question is there any way to set socket connection for shell script
running dbaccess command ?
I want this shell script to take socket connection instead of shared memory
connection.
Thanks in advance
Rahul
--000e0cd144f0ded0640494b42826
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Hi Andrew ,
Thanks for the quick reply,
I have already set this environment variable to my shell script
INFORMIXSERVER=<tcp_connection>set INFORMIXSERVER
Still it takes shared memory connection.
Is it because of *dbaccess* command in shell script ?
On Wed, Nov 10, 2010 at 8:44 PM, Andrew Grantham <agrantha@hotmail.com>wrote:
> Rahul,
>
> If I understand you correctly you can add the following line to your shell
> script.
>
> INFORMIXSERVER=<tcp_connection>> set INFORMIXSERVER
>
> Why do you want to use the tcp connection rather than the shared memory
> one?
> Unless you are going to communicate with an external instance it makes no
> difference.
>
> > To: ids@iiug.org
> > From: myinformix@gmail.com
> > Subject: Shared memory connection - IDS 10.00.FC8 on HP.... [21921]
> > Date: Wed, 10 Nov 2010 10:03:31 -0500
> >
> > HI all,
> >
> > I have shell script which am running from server has dbaccess command (
> > example - dbaccess database_name test.sql ) (test.sql contains delete
> > statements)
> >
> > while running this shell script it takes shared memory connection which I
> > can see through (onstat -g nss and ps -eaf)
> >
> > I have set socket connection in .profile and in shell script as well as
> in
> > sqlhosts file (test_s1_tcp onsoctcp test test_s1_net b=8192)
> >
> > My question is there any way to set socket connection for shell script
> > running dbaccess command ?
> >
> > I want this shell script to take socket connection instead of shared
> memory
> > connection.
> >
> > Thanks in advance
> >
> > Rahul
> >
> > --000e0cd144f0ded0640494b42826
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001636e1faf0a24bd80494b490c0
Sorry Raul it should be export INFORMIXSERVER not set.
> To: ids@iiug.org
> From: myinformix@gmail.com
> Subject: Re: Shared memory connection - IDS 10.00.FC8 o.... [21925]
> Date: Wed, 10 Nov 2010 10:32:33 -0500
>
> Hi Andrew ,
>
> Thanks for the quick reply,
>
> I have already set this environment variable to my shell script
>
> INFORMIXSERVER=<tcp_connection>> set INFORMIXSERVER
>
> Still it takes shared memory connection.
>
> Is it because of *dbaccess* command in shell script ?
>
> On Wed, Nov 10, 2010 at 8:44 PM, Andrew Grantham <agrantha@hotmail.com>wrote:
>
> > Rahul,
> >
> > If I understand you correctly you can add the following line to your shell
> > script.
> >
> > INFORMIXSERVER=<tcp_connection>> > set INFORMIXSERVER
> >
> > Why do you want to use the tcp connection rather than the shared memory
> > one?
> > Unless you are going to communicate with an external instance it makes no
> > difference.
> >
> > > To: ids@iiug.org
> > > From: myinformix@gmail.com
> > > Subject: Shared memory connection - IDS 10.00.FC8 on HP.... [21921]
> > > Date: Wed, 10 Nov 2010 10:03:31 -0500
> > >
> > > HI all,
> > >
> > > I have shell script which am running from server has dbaccess command (
> > > example - dbaccess database_name test.sql ) (test.sql contains delete
> > > statements)
> > >
> > > while running this shell script it takes shared memory connection which I
> > > can see through (onstat -g nss and ps -eaf)
> > >
> > > I have set socket connection in .profile and in shell script as well as
> > in
> > > sqlhosts file (test_s1_tcp onsoctcp test test_s1_net b=8192)
> > >
> > > My question is there any way to set socket connection for shell script
> > > running dbaccess command ?
> > >
> > > I want this shell script to take socket connection instead of shared
> > memory
> > > connection.
> > >
> > > Thanks in advance
> > >
> > > Rahul
> > >
> > > --000e0cd144f0ded0640494b42826
> > >
> > >
> > >
> >
> >
>
*******************************************************************************
> > > Forum Note: Use "Reply" to post a response in the discussion forum.
> > >
> >
> >
> >
> >
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --001636e1faf0a24bd80494b490c0
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
What is the dbaccess command syntax?
If you are doing somthing like "dbaccess somedb@someserver", then you
will connect via someserver. That would override what is in
INFORMIXSERVER.
M.Pruet
From: "Rahul" <myinformix@gmail.com>
To: ids@iiug.org
Date: 11/10/2010 01:33 PM
Subject: Re: Shared memory connection - IDS 10.00.FC8 o.... [21925]
Sent by: ids-bounces@iiug.org
Hi Andrew ,
Thanks for the quick reply,
I have already set this environment variable to my shell script
INFORMIXSERVER=<tcp_connection>set INFORMIXSERVER
Still it takes shared memory connection.
Is it because of *dbaccess* command in shell script ?
On Wed, Nov 10, 2010 at 8:44 PM, Andrew Grantham
<agrantha@hotmail.com>wrote:
> Rahul,
>
> If I understand you correctly you can add the following line to your
shell
> script.
>
> INFORMIXSERVER=<tcp_connection>> set INFORMIXSERVER
>
> Why do you want to use the tcp connection rather than the shared memory
> one?
> Unless you are going to communicate with an external instance it makes no
> difference.
>
> > To: ids@iiug.org
> > From: myinformix@gmail.com
> > Subject: Shared memory connection - IDS 10.00.FC8 on HP.... [21921]
> > Date: Wed, 10 Nov 2010 10:03:31 -0500
> >
> > HI all,
> >
> > I have shell script which am running from server has dbaccess command (
> > example - dbaccess database_name test.sql ) (test.sql contains delete
> > statements)
> >
> > while running this shell script it takes shared memory connection which
I
> > can see through (onstat -g nss and ps -eaf)
> >
> > I have set socket connection in .profile and in shell script as well as
> in
> > sqlhosts file (test_s1_tcp onsoctcp test test_s1_net b=8192)
> >
> > My question is there any way to set socket connection for shell script
> > running dbaccess command ?
> >
> > I want this shell script to take socket connection instead of shared
> memory
> > connection.
> >
> > Thanks in advance
> >
> > Rahul
> >
> > --000e0cd144f0ded0640494b42826
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001636e1faf0a24bd80494b490c0
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
In the shell script you just have to set INFORMIXSERVER to the connection
name associated with the TCP/IP connection.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art@iiug.org)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, 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 Wed, Nov 10, 2010 at 10:03 AM, Rahul <myinformix@gmail.com> wrote:
> HI all,
>
> I have shell script which am running from server has dbaccess command (
> example - dbaccess database_name test.sql ) (test.sql contains delete
> statements)
>
> while running this shell script it takes shared memory connection which I
> can see through (onstat -g nss and ps -eaf)
>
> I have set socket connection in .profile and in shell script as well as in
> sqlhosts file (test_s1_tcp onsoctcp test test_s1_net b=8192)
>
> My question is there any way to set socket connection for shell script
> running dbaccess command ?
>
> I want this shell script to take socket connection instead of shared memory
> connection.
>
> Thanks in advance
>
> Rahul
>
> --000e0cd144f0ded0640494b42826
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--000e0cd2e1fa2800930494b80e4e
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g