Unix Technical Forum

Help: connecting to db2 udb v8.1.9 linux

This is a discussion on Help: connecting to db2 udb v8.1.9 linux within the DB2 forums, part of the Database Server Software category; --> I have the subject system set up, and can connect to it with several userids. I can login to ...


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 07:16 AM
Bob Stearns
 
Posts: n/a
Default Help: connecting to db2 udb v8.1.9 linux

I have the subject system set up, and can connect to it with several
userids. I can login to it (ssh) with a new userid I created, but when I
try to use those credentials to connect to db2, I get password invalid.
I have checked the groups of the new userid and made its password the
same as one of the successful userids with the same results. This one
baffles me. I'm obviously missing something very elementary, but I can't
figure out what. Any ideas, rtfm references, etc. greatly appreciated.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 07:16 AM
Serge Rielau
 
Posts: n/a
Default Re: Help: connecting to db2 udb v8.1.9 linux

Bob Stearns wrote:
> I have the subject system set up, and can connect to it with several
> userids. I can login to it (ssh) with a new userid I created, but when I
> try to use those credentials to connect to db2, I get password invalid.
> I have checked the groups of the new userid and made its password the
> same as one of the successful userids with the same results. This one
> baffles me. I'm obviously missing something very elementary, but I can't
> figure out what. Any ideas, rtfm references, etc. greatly appreciated.

Q1: Does the ID have connect privileges? I think that's in SYSCAT.DBAUTH
Q2: How is authentication set up? Server, Client, .. ? I think that's
part of the DBM CONFIG.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 07:16 AM
Bob Stearns
 
Posts: n/a
Default Re: Help: connecting to db2 udb v8.1.9 linux

Serge Rielau wrote:
> Bob Stearns wrote:
>
>> I have the subject system set up, and can connect to it with several
>> userids. I can login to it (ssh) with a new userid I created, but when
>> I try to use those credentials to connect to db2, I get password
>> invalid. I have checked the groups of the new userid and made its
>> password the same as one of the successful userids with the same
>> results. This one baffles me. I'm obviously missing something very
>> elementary, but I can't figure out what. Any ideas, rtfm references,
>> etc. greatly appreciated.

>
> Q1: Does the ID have connect privileges? I think that's in SYSCAT.DBAUTH
> Q2: How is authentication set up? Server, Client, .. ? I think that's
> part of the DBM CONFIG.
>
> Cheers
> Serge


1 I checked, an is has connect authority
2 Server, I think. Where do I find DBM CONFIG to verify
3 db2diag gives check password failed with rc = -2146500502. That is
800F006A in 32 bit hex.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 07:16 AM
Leo
 
Posts: n/a
Default Re: Help: connecting to db2 udb v8.1.9 linux

I'm not sure how you are trying to connect but here is what I would to
to troubleshoot this thing.

1 - Ssh to the db2 server using the userid (not with another id and
su-ing to the user - the user account may be set to change the password
on next login if you just created it that way), load the database
db2profile for the user and connect from there, which rules out the
database authorization

2 - From the client machine catalog the node and the database (if you
haven't done so) - use command line instead of the control center, it's
faster and better to troubleshoot.

3 - Test the connection using the command line from the client machine
with a userid you know it works

4 - Test using the new userid using the command line

To check the authentication type (doesn't sound like this is the
problem because you said you were able to connect using another
user....)

$ db2 get dbm cfg | grep AUTHENTICATION
Database manager authentication (AUTHENTICATION) = SERVER

To check if your user has connect privileges (just in case)

$ db2 "select grantee from syscat.dbauth where connectauth='Y'"

Lastly either change the password to something extremely easy to type,
or start over creating a new user.

If still doesn't work go have a beer, take some time off and get back
to it later....

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 07:16 AM
Bob Stearns
 
Posts: n/a
Default Re: Help: connecting to db2 udb v8.1.9 linux

Leo wrote:
> I'm not sure how you are trying to connect but here is what I would to
> to troubleshoot this thing.
>
> 1 - Ssh to the db2 server using the userid (not with another id and
> su-ing to the user - the user account may be set to change the password
> on next login if you just created it that way), load the database
> db2profile for the user and connect from there, which rules out the
> database authorization
>
> 2 - From the client machine catalog the node and the database (if you
> haven't done so) - use command line instead of the control center, it's
> faster and better to troubleshoot.
>
> 3 - Test the connection using the command line from the client machine
> with a userid you know it works
>
> 4 - Test using the new userid using the command line
>
> To check the authentication type (doesn't sound like this is the
> problem because you said you were able to connect using another
> user....)
>
> $ db2 get dbm cfg | grep AUTHENTICATION
> Database manager authentication (AUTHENTICATION) = SERVER
>
> To check if your user has connect privileges (just in case)
>
> $ db2 "select grantee from syscat.dbauth where connectauth='Y'"
>
> Lastly either change the password to something extremely easy to type,
> or start over creating a new user.
>
> If still doesn't work go have a beer, take some time off and get back
> to it later....
>

1 I did and works.

2 It is.

3 I'm using a Windows machine and I've never user the command line to
access db2 (can you believe it :-), so I need a pointer for this.

4 Likewise

5 Authentication is server

6 the userid was shown by the select

7 I tried making it the same as mine, which I type many time a day.

All to no avail.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-27-2008, 07:16 AM
Leo
 
Posts: n/a
Default Re: Help: connecting to db2 udb v8.1.9 linux

First you catalog the node

db2 "catalog tcpip node <nodename> remote <server hostname> server
<port>"

Then you catalog the database on that node

db2 "catalog database <dbname> at node <nodename>"

Check your catalogs:

db2 "list node directory"

db2 "list db directory"

Then you connect...

db2 connect to <dbname>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-27-2008, 07:16 AM
Bob Stearns
 
Posts: n/a
Default Re: Help: connecting to db2 udb v8.1.9 linux

Leo wrote:

> First you catalog the node
>
> db2 "catalog tcpip node <nodename> remote <server hostname> server
> <port>"
>
> Then you catalog the database on that node
>
> db2 "catalog database <dbname> at node <nodename>"
>
> Check your catalogs:
>
> db2 "list node directory"
>
> db2 "list db directory"
>
> Then you connect...
>
> db2 connect to <dbname>
>

I didn't even know I had a db2 executable on my windows box. However it
is not happy: DB21061E Command line environment not initialized. What now?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-27-2008, 07:16 AM
Leo
 
Posts: n/a
Default Re: Help: connecting to db2 udb v8.1.9 linux

You have to initialize the profile.

The easy painless way. Start -> Programs -> IBM DB2 -> Command Line
Tools -> Command Line Processor

Just remember to remove the quotes from the commands and the starting
"db2" keyword, since you are in the clp already.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-27-2008, 07:16 AM
Serge Rielau
 
Posts: n/a
Default Re: Help: connecting to db2 udb v8.1.9 linux

Bob Stearns wrote:
> Leo wrote:
>
>> First you catalog the node
>>
>> db2 "catalog tcpip node <nodename> remote <server hostname> server
>> <port>"
>>
>> Then you catalog the database on that node
>>
>> db2 "catalog database <dbname> at node <nodename>"
>>
>> Check your catalogs:
>>
>> db2 "list node directory"
>>
>> db2 "list db directory"
>>
>> Then you connect...
>>
>> db2 connect to <dbname>
>>

> I didn't even know I had a db2 executable on my windows box. However it
> is not happy: DB21061E Command line environment not initialized. What now?

type: db2cmd
It will open a new shell with the environment.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-27-2008, 07:16 AM
Bob Stearns
 
Posts: n/a
Default Re: Help: connecting to db2 udb v8.1.9 linux

Serge Rielau wrote:
> Bob Stearns wrote:
>
>> Leo wrote:
>>
>>> First you catalog the node
>>>
>>> db2 "catalog tcpip node <nodename> remote <server hostname> server
>>> <port>"
>>>
>>> Then you catalog the database on that node
>>>
>>> db2 "catalog database <dbname> at node <nodename>"
>>>
>>> Check your catalogs:
>>>
>>> db2 "list node directory"
>>>
>>> db2 "list db directory"
>>>
>>> Then you connect...
>>>
>>> db2 connect to <dbname>
>>>

>> I didn't even know I had a db2 executable on my windows box. However
>> it is not happy: DB21061E Command line environment not initialized.
>> What now?

>
> type: db2cmd
> It will open a new shell with the environment.
>
> Cheers
> Serge
>

I uncataloged until there was nothing, then cataloged my server/database.

I then tried to connect with: connect to animals using U00001 using
pwd00001. It failed with "USERNAME AND/OR PASSWORD INVALID". I
immediately tried ssh with those credentials and they worked. I then
tried db2 with another userid/passwd and got in with no problem.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:10 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com