DB2 Connection failure

Posted on 2003-10-21
Last Modified: 2008-03-04
Hi Experts,

     Previousely  I've tried to connecting (AIX based) DB2 databases from my linux box thru perl module were sucessful, but when try to connect (Win based) DB2 database I'm getting the following errors.

    "TLMA" is my DB2 db.
       "SQL1403N  The username and/or password supplied is incorrect.  SQLSTATE=08004"

Here are my configurations :-

  Database Directory List :-

      $ db2 list database directory
                  Database alias                     = TLMA
                  Database name                   = TLMA
                  Node name                         = TLMA
                  Database release level         = 9.00
                  Comment                           =
                  Directory entry type             = Remote
                  Catalog node number          = -1

  Node Listing :-

      $ db2 list node directory

                  Node name                       = TLMA
                  Comment                         =
                  Protocol                           = TCPIP
                  Hostname                        =
                  Service name                   = 50000

     I feel I'm not connected with the above error, but I don't know where the error lies on. I'm Sure the username and password are correct.

Plz. Help me on this.
Question by:clickrajkumar

Expert Comment

ID: 9597340
Your logged on userid is not authorised to connect to the database.

Try these commands from the db2 shell.

d:> db2cmd

e:> db2 connect to "yourdatabase" user "youruserid" using "yourpassword"

The default DB2 installation on a winnt machine only grants access rights to the local administrator
on the machine i.e the "administrator" userid.

If you are logged on via an NT domain log off the domain, log back on to the local machine as
"administrator"(you must know the password). Once logged in either add your domain userid to the
LOCAL administrators group or create a new local id for yourself. If you choose the former you can
access DB2 from the domain, choose the latter and you must log on locally to the machine to access
DB2. Once you have administrator rights you can add domain users to DB2 group objects and restrict
access rights.

Author Comment

ID: 9597501

   I'm trying to Connect DB2 database in a Win2000 Server and 'm having myown userid (other than Administrator) which has proper access privileges.

   I've tried connecting to the DB thru DB2 Connect from my Linux Box it throws the following.

[db2inst1@AAA db2inst1]$ db2 connect to TLMA user db2 using db2admin
SQL1403N  The username and/or password supplied is incorrect.  SQLSTATE=08004
[db2inst1@AAA db2inst1]$

   Even I'm getting the same error when try to connect by my perl module.

  What I've to do more on this???


Expert Comment

ID: 9597569
As far as I know, you need an account with Administrator access for this. Is your account in this kind?
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.


Author Comment

ID: 9597709
Yep Fantasy,

   I've also tried with both (As by my userid aswell as with Admin id), Still the same problem is choking my neck.


Expert Comment

ID: 9597753
From others sources:

Check the ownership and permissions on the db2ckpw program. They should look like this:
bash$ ls -al ~/sqllib/security/db2ckpw
-rwsr-s--x    1 root     build       15989 Oct 17 07:22 sqllib/security/db2ckpw*
If this program is not owned by root, then do the following as root:
bash# chown root db2ckpw
bash# chmod ug+s db2ckpw

Author Comment

ID: 9597897
Yes Fantasy,
   I've read same answer from IBM site itself, and when I try to search for db2ckpw file in the 2000 Server (Win) Machine I was unable to get it. It seem the above soluiton is only fit for Linux Flavoured Servers...

LVL 20

Expert Comment

ID: 10030553
Nothing has happened on this question in over 2 months. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
PAQ, refund points (unanswered, but some interesting steps along the way).


EE Cleanup Volunteer

Accepted Solution

SpazMODic earned 0 total points
ID: 10078697
PAQed, with points refunded (50)

EE Moderator

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Perl Script - Remove column of data based on column value 2 51
Insert Text into odbc.ini file 15 64
Regex rule to match two different url 5 71
Perl File::Find alternative 1 67
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now