Go Premium for a chance to win a PS4. Enter to Win


db2 I need easiest way to create a user who can login via jdbc and has full access

Posted on 2017-04-20
Medium Priority
Last Modified: 2017-11-22
I want to do something that seems like it should be very simple... I have single db2 instance, single db on it, I need a single user's credentials that will work to login via jdbc and have full rights to the DB (i.e. create/drop schema, etc)   But I can't get it to work.

I have a db2 10.5 instance installed on a RHEL 7 VM - I have created a DB, lets call it db123

I can access the DB fine if I am logged into VM on command line.  The username is dbinst1.  

I just want to be able to connect to this via squirrel (or other jdbc based client).  But I am getting authentication failure.  As far as I understand db2 uses OS authentication.   I am unable to log in as user db2inst1 it says

com.ibm.db2.jcc.am.SqlInvalidAuthorizationSpecException: [jcc][t4][2013][11249][3.68.61] Connection authorization failure occurred.  Reason: User ID or Password invalid. ERRORCODE=-4214, SQLSTATE=28000

Open in new window

I thought maybe that user is now allowed to log in remote - so I create another user, lets say user123.  I added them to the db2inst1 group (which I think means they should have admin rights), I also get same message when I try to login to that user via squirrel.
Question by:Xetroximyn
LVL 46

Expert Comment

by:Kent Olsen
ID: 42104300
The problem seems to be in the connection string.  Can you post it?

Author Comment

ID: 42106515
thanks - so turns out there were issues with the db2 install - it needed some libraries or something.  DBA finally got it fixed.

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
The article covers five tools all IT professionals should know about, as they up productivity by a great deal!
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

824 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