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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| |||
| 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/ |
| |||
| 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. |
| |||
| 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.... |
| |||
| 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. |
| |||
| 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> |
| |||
| 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? |
| |||
| 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. |
| |||
| 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/ |
| ||||
| 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. |