Re: Connecting to DB2
"Larry Menard" <lmenard@ca.ibm.com> wrote in message
news:bh8j3d$hg3$1@hanover.torolab.ibm.com...
> When an Instance is first created, it does not have a Node Directory or
> even a Database Directory. So when you query it, you'll get the "cannot
be
> found" message.
>
> These Node and Database directories are created when the first Node or
DB
> are cataloged. If you query them then, you should see the directory
> entries.
>
> Then when you delete (uncatalog) all entries in these directories, the
> individual entries are removed but the directory itself still remains even
> though it is empty. In this case you get the "is empty" message.
>
> As far as connecting to them, the two phenomena might be related, but
I'm
> not sure if that is by design. On your 2nd Instance you can just create
an
> empty Node Directory (by cataloging and uncataloging some dummy node), and
> see if that fixes your connect problem.
> --
> Larry Menard
> IBM Workstation Database (DB2) Information Development, Samples
Coordinator
> Defender of Geese and of All Things Natural
>
>
> "Nenad" <nskrijelj@yahoo.com> wrote in message
> news:bh892p$c24$1@balder.stud.idb.hist.no...
> > Is there a difference in connecting to DB2 when node directory is empty
> and
> > when node directory is not exists ?
> >
> > There are two DB2 (V.8) instances on the same machine. When I issue a
list
> > node directory I get:
> > 1st instance: SQL1037W The node directory is empty. SQLSTATE=01606
> > 2nd instance: SQL1027N The node directory cannot be found.
> >
> > I cannot connect to the 1st instance as another user, but on 2nd I can.
> > I'm not a DBA, so please forgive me if this is totally wrong.
> >
> >
>
Thank you for a detailed explanation.
However, it seems that I didn't emphasize the problem.
First of all - those instances are on the production system, so I cannot
play with them unless I'm 100% sure in what I'm doing.
Problem explanation:
First there was instance1. It worked fine for some time and then suddenly no
one could connect to it.
When I'm instance owner and issue a command to connect to DB (with my 2nd
username) I get:
db2 => connect to DSLIP user NENAD
Enter current password for NENAD:
SQL30082N Attempt to establish connection failed with security reason "24"
("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001
Instance is using Server authentication:
Database manager authentication (AUTHENTICATION) = SERVER
Cataloging allowed without authority (CATALOG_NOAUTH) = NO
Trust all clients (TRUST_ALLCLNTS) = YES
Trusted client authentication (TRUST_CLNTAUTH) = CLIENT
Use SNA authentication (USE_SNA_AUTH) = NO
Bypass federated authentication (FED_NOAUTH) = NO
After this happened, DBA created another instance - instance2 on the same
node, and there are all things right !?
DBA is on the vacation, and I'm looking at those two databases trying to
solve the mystery.
I've issued this script:
#!/bin/ksh
for inst in `/usr/opt/db2_08_01/bin/db2ilist`
do
su - $inst << EOX
db2 get dbm cfg > /tmp/dbback/dbmcfg.bk.$inst
db2set -all > /tmp/dbback/db2set.bk.$inst
db2 list db directory > /tmp/dbback/systemdbdir.bk.$inst
db2 list node directory > /tmp/dbback/nodedir.bk.$inst
db2 list dcs directory > /tmp/dbback/dcsdir.bk.$inst
exit
EOX
done
and have compared the output difference for those databases. One of the
major things that differ is state of node directory. Here is a difference
between dbmcfg.bk files:
hrasirprod/tmp/dbback> diff dbm*1 dbm*2
22c22
< Diagnostic data directory path (DIAGPATH) =
/home/db2inst1/sqllib/db2dump
---
> Diagnostic data directory path (DIAGPATH) =
/home/db2inst2/sqllib/db2dump
26,29c26,29
< Lock (DFT_MON_LOCK) = OFF
< Sort (DFT_MON_SORT) = OFF
< Statement (DFT_MON_STMT) = OFF
< Table (DFT_MON_TABLE) = OFF
---
> Lock (DFT_MON_LOCK) = ON
> Sort (DFT_MON_SORT) = ON
> Statement (DFT_MON_STMT) = ON
> Table (DFT_MON_TABLE) = ON
31,32c31,32
< Unit of work (DFT_MON_UOW) = OFF
< Monitor health of instance and databases (HEALTH_MON) = OFF
---
> Unit of work (DFT_MON_UOW) = ON
> Monitor health of instance and databases (HEALTH_MON) = ON
45c45
< Default database path (DFTDBPATH) = /home/db2inst1
---
> Default database path (DFTDBPATH) = /home/db2inst2
81c81
< SPM name (SPM_NAME) = hrasirpr
---
> SPM name (SPM_NAME) = hrasirp1
86c86
< TCP/IP Service name (SVCENAME) = db2c_db2inst1
---
> TCP/IP Service name (SVCENAME) = 50002 |