I am trying to use the "db2" command-line client on Linux to connect to
a UDB7.1 server running on a remote NT machine.
At startup I get an error message:
SQL10007N Message "-1390" could not be retrieved. Reason code: "1".
This reference for this code leads me to believe that the DB2INSTANCE
variable must be set. The question is what should this be set to in the
case of connecting to a remote machine?
Any help is much appreciated!
-- john
===============================================================================
John Cartwright
Professional Research Assistant / Associate Scientist
CIRES, SEG/NGDC/NOAA
(303) 497-6284
jcart...@ngdc.noaa.gov
===============================================================================
It should be set to the userid of the instance on the client machine
(and yes, you have to create an instance on the client machine, but it
can be a client instance).
WW
--
Susan Williams
Technical Lead, DB2 on Linux
susa...@vnet.ibm.com
>I am trying to use the "db2" command-line client on Linux to connect to
>a UDB7.1 server running on a remote NT machine.
>
>At startup I get an error message:
>SQL10007N Message "-1390" could not be retrieved. Reason code: "1".
>
>This reference for this code leads me to believe that the DB2INSTANCE
>variable must be set. The question is what should this be set to in the
>case of connecting to a remote machine?
>
>Any help is much appreciated!
DB2INSTANCE isn't the only thing missing, most likely. You should source the
sqllib/db2profile of the instance on the client.
If your instance is 'db2inst1' (the default on Linux), you should do the
following:
# Bourne shell derivitives - ksh, bash, etc.:
. ~db2inst1/sqllib/db2profile
# C shell derivitives - csh, etc.:
source ~db2inst1/sqllib/db2cshrc
Hope this helps!
thanks for your help. I had not understood that an "instance" was
required even on client-only machines. I went back and re-installed the
client and created and instance using my username and set the
DB2INSTANCE variable. "db2" now starts up fine, however it is still not
clear to me how I specify that I want to connect to a database on a
remote machine. Is this done through the CONNECT statement or set
somehow in a environment variable?
Thanks again!
-- john
--
> db2 catalog tcpip node myserver remote ...
> db2 catalog database dbalias on node myserver ...
From then on, you simply "db2 connect to dbalias"... the CONNECT command doesn't
know or care if the database is local or remote.
John Cartwright wrote:
--
Larry Menard
IBM Workstation Database (DB2) Performance Team
Defender of Geese and of all things Natural
-- john