Db2

Db2

Where DBAs and data experts come together to stop operating and start innovating. Connect, share, and shape the AI era with us.


#Data


#Data
 View Only
Expand all | Collapse all

SQL30082N error

  • 1.  SQL30082N error

    Posted Tue February 17, 2026 07:23 AM

    Goodday

    I get this error:

    SQL30082N  Attempt to establish connection failed with security reason "19" 

    ("USERID DISABLED or RESTRICTED").  SQLSTATE=08001

    The command is:

    dsna@xxxxxx # db2 connect to DBALIAS user dsna using xxxxxxx

    SQL30082N  Attempt to establish connection failed with security reason "19" 

    ("USERID DISABLED or RESTRICTED").  SQLSTATE=08001

    I can login with user dsna on AIX with the same password. So that is OK.

    Hints on internet is not getting me to the solution.

    I am also not able to db2 connect to DBALIAS, because it is asking for a password which I do not know.

    Does anybody have any ideas?

    Thankyou,

    Kind regards,

    Michel.



    ------------------------------
    Michel de Kraker
    ------------------------------


  • 2.  RE: SQL30082N error

    Posted Tue February 17, 2026 09:31 AM

    Where is database DBALIAS defined? On Aix, on z/OS or elsewhere?



    ------------------------------
    Jan Nelken
    Db2 (LUW) DBA
    Open for work
    Katowice or Krakow
    +48 783 109 863
    ------------------------------



  • 3.  RE: SQL30082N error

    Posted Tue February 17, 2026 09:48 AM

    This is on AIX Jan.

    regards

    Michel.



    ------------------------------
    Michel de Kraker
    ------------------------------



  • 4.  RE: SQL30082N error

    Posted Tue February 17, 2026 10:58 AM
    Can you log on the AIX server using the user dsna ?
    If yes, after login using the user dsna, type "db2 connect to DBALIAS".It won't ask for a password now.Can you connect to the DB successfully? What is the error you are getting?





  • 5.  RE: SQL30082N error

    Posted Tue February 17, 2026 12:49 PM

    It could be an issue with db2ckpw service - on the other hand - better show us:

    output of db2level;
    output of db2set -all
    characteristic of the user dsna from smitty - in particular - whether user is allowed remote login
    db2diag.log capturing the SQL30082 error.




    ------------------------------
    Jan Nelken
    Db2 (LUW) DBA
    Open for work
    Katowice or Krakow
    +48 783 109 863
    ------------------------------



  • 6.  RE: SQL30082N error

    Posted Wed February 18, 2026 02:46 AM

    I know this is way too old.....

    dsna@xxxxx # db2level

    DB21085I  Instance "dsna" uses "64" bits and DB2 code release "SQL08027" with 

    level identifier "03080106".

    Informational tokens are "DB2 v8.1.1.128", "s061108", "U810098", and FixPak 

    "14".

    Product is installed at "/usr/opt/db2_08_01".

    dsna@xxxxxx # db2set -all

    [i] DB2_LOAD_COPY_NO_OVERRIDE=COPY YES TO /dsna/loadcopy

    [i] DB2TCPCONNMGRS=1

    [i] DB2MEMMAXFREE=2000000

    [i] DB2MEMDISCLAIM=YES

    [i] DB2COMM=tcpip

    [i] DB2AUTOSTART=YES

    [g] DB2SYSTEM=xxxxxxx

    [g] DB2ADMINSERVER=db2das

    rlogin = true for user dsna

    strangely enough SQL30082N is not recorded in db2diag.log:

    [root@xxxxxx]/dsna/db2dump>grep 30082N db2diag.log

    [root@xxxxxx]/dsna/db2dump>



    ------------------------------
    Michel de Kraker
    ------------------------------



  • 7.  RE: SQL30082N error

    Posted Wed February 18, 2026 04:44 AM
    Edited by Jan Nelken Wed February 18, 2026 05:23 AM

    It's only 20 years old code...

    It's more like issue with Aix interaction with db2ckpw I think. 

    Usual questions:
    - did it ever worked before?
    - if so - when it stopped working?
    - when it stopped working - what has been changed?

    When you establish telnet session to Aix as user dsna and source Db2 environment (by executing db2profile), you can connect to DBALIAS by:

    db2 connect to DBALIAS

    ?

    What client you are using (local or remote? - what protocol? JDBC, ODBC?



    ------------------------------
    Jan Nelken
    Db2 (LUW) DBA
    Open for work
    Katowice or Krakow
    +48 783 109 863
    ------------------------------



  • 8.  RE: SQL30082N error

    Posted Wed February 18, 2026 02:39 AM

    Hi Madhusudan,

    This is what I get when I login with the Aix user and then perform db2 connect to:

    dsna@xxxxxx # db2 connect to A01DSNA user dsna using xxxxxx

    SQL30082N  Attempt to establish connection failed with security reason "19" 

    ("USERID DISABLED or RESTRICTED").  SQLSTATE=08001



    ------------------------------
    Michel de Kraker
    ------------------------------



  • 9.  RE: SQL30082N error

    Posted Wed February 18, 2026 04:50 AM
    Did you try running "db2 connect to A01DSNA" after logging into the AIX DB server box   using the user dsna ? What is the message you are getting now?
    Try deleting this user and creating a new one with the same name.





  • 10.  RE: SQL30082N error

    Posted Wed February 18, 2026 05:12 AM
    Alternatively, you can try restarting the instance-earlier versions would not refresh the buffer or recognize that your expired password had been updated after a failed login attempt.





  • 11.  RE: SQL30082N error

    Posted Wed February 18, 2026 10:31 AM
    Hi Michel,

    Can you let us know if the error has been addressed?





  • 12.  RE: SQL30082N error

    Posted Thu February 19, 2026 03:40 AM

    Unfortunately I cannot delete the user because there is an important database running with this user.

    This is what I after  I login with the user in AIX :

    dsna@tsaix18 # db2 connect to A01DSNA

    SQL30082N  Attempt to establish connection failed with security reason "3" 

    ("PASSWORD MISSING").  SQLSTATE=08001

    dsna@tsaix18 # 



    ------------------------------
    Michel de Kraker
    ------------------------------



  • 13.  RE: SQL30082N error

    Posted Thu February 19, 2026 04:43 AM

    Michel,

    Let me clearly understand - you are running important database - presumably production - on unsupported code 20 years old? Is it correct?

    For completeness please show us output of the commands (on Aix):

    db2 list db directory
    db2 list node directory show detail



    ------------------------------
    Jan Nelken
    Db2 (LUW) DBA
    Open for work
    Katowice or Krakow
    +48 783 109 863
    ------------------------------



  • 14.  RE: SQL30082N error

    Posted Thu February 19, 2026 04:55 AM

    Jan,

    You are absolutely right, but there is no way to update unfortunately.

    But since this is indeed very old software, let's stop this discussion (do not want to waste your time on this).

    Appreciate yours and Madhusudan effort on this.

    Thankyou,

    Regards

    Michel.



    ------------------------------
    Michel de Kraker
    ------------------------------



  • 15.  RE: SQL30082N error

    Posted Thu February 19, 2026 06:21 AM

    As you wish; I still would like to glance at the output of those two db2 list .... commands:
    I suspect that database pointed to by DBALIAS is remote to Aix - which would explain this behavior.
    If this is true - then check userid dsna in the OS hosting database pointed to by the alias DBALIAS - db2 performs OS authentication on the host O/S.
    Another ondirect proof would be to create on Aix user dsnx or similiar new user - and try |db2 connect to| DBALIAS" as such user.
    If it fails the same way - suspition that databse is remote to Aix is stronger; if it works - then issue is on Aix with dsna user and/or db2ckpwd.



    ------------------------------
    Jan Nelken
    Db2 (LUW) DBA
    Open for work
    Katowice or Krakow
    +48 783 109 863
    ------------------------------



  • 16.  RE: SQL30082N error

    Posted Thu February 19, 2026 06:42 AM

    Thankyou Jan,

    dsna@tsaix18 # db2 list node directory show detail

    Only showing the one which is important:

     Node Directory

     Number of entries in the directory = 1

    Node 1 entry:

     Node name                      = DB2GW1

     Comment                        =

     Directory entry type           = LOCAL

     Protocol                       = TCPIP

     Hostname                       = xxxxxx

     Service name                   = 52001

     Remote instance name           =

     System                         =

     Operating system type          = None

    db2 list db directory

    Database 13 entry:

     Database alias                       = A01DSNA

     Database name                        = A01DSNA

     Node name                            = DB2GW1

     Database release level               = a.00

     Comment                              =

     Directory entry type                 = Remote

     Catalog database partition number    = -1

     Alternate server hostname            =

     Alternate server port number         =

    will perform your other question tomorrow.

    Thank you.

    Regards

    Michel



    ------------------------------
    Michel de Kraker
    ------------------------------



  • 17.  RE: SQL30082N error

    Posted Thu February 19, 2026 06:55 AM
    Edited by Jan Nelken Thu February 19, 2026 06:56 AM

    In previous messages you stated DBALIAS as database name; it looks like database A01DSNA is hosted on host of name or ip addres xxxxx defined in node DB2GW1:

    Database alias                       = A01DSNA
    Database name                     = A01DSNA
    Node name                            = DB2GW1

    All the naming suggest real database is on z/OS - and you are using Db2 Connect as gateway; I suggest checking in z/OS whether user dsna is restricted, expired or disabled.



    ------------------------------
    Jan Nelken
    Db2 (LUW) DBA
    Open for work
    Katowice or Krakow
    +48 783 109 863
    ------------------------------



  • 18.  RE: SQL30082N error

    Posted Thu February 19, 2026 07:08 AM

    Correct Jan,

    I changed it to DBALIAS because of security.

    Forget to change it to DBALIAS again :-)

    But DBGW1 is pointing to the same AIX system where the user dsna is defined. So definitely  not mainframe.

    dsna user has rlogin=true

    [root@xxxxxx]/>lsuser -a rlogin dsna

    dsna rlogin=true



    ------------------------------
    Michel de Kraker
    ------------------------------



  • 19.  RE: SQL30082N error

    Posted Thu February 19, 2026 08:19 AM

    What was rationale to treat this database as remote, if it is local?

    Directory entry type                 = Remote

    It should never worked before (connection to local database as remote - without password.

    So back to original question:

    Usual questions:
    - did it ever worked before?
    - if so - when it stopped working?
    - when it stopped working - what has been changed?


    What is stopping you from defining (i.e. cataloguing) this database as local to AIx?

    Can user dsna perform:

    db2 attach to DBGW1

    without specifying password?



    ------------------------------
    Jan Nelken
    Db2 (LUW) DBA
    Open for work
    Katowice or Krakow
    +48 783 109 863
    ------------------------------



  • 20.  RE: SQL30082N error

    Posted Thu February 19, 2026 09:20 AM
    Edited by Michel de Kraker Thu February 19, 2026 09:23 AM

    Hi Jan,

    I took over admin task from outsourcing company without any knowledge transfer on setup. So cannot answer your 3 questions.

    However I will catalogue the db to local. Good tip.

    This is also working!

    dsna@tsaix18 # db2 attach to DB2GW1 user dsna using xxxxxx          

       Instance Attachment Information

     Instance server        = DB2/AIX64 8.2.7

     Authorization ID       = DSNA

     Local instance alias   = DB2GW1

    Could I be able now to unlock the user this way , or is LOCAL the best way to go forward?

    Regards

    Michel



    ------------------------------
    Michel de Kraker
    ------------------------------



  • 21.  RE: SQL30082N error

    Posted Thu February 19, 2026 10:04 AM
    Treating local database as local is the best and cleanest solution.

    After ATTACH to node can user dsna connect to database without password?






  • 22.  RE: SQL30082N error

    Posted Thu February 19, 2026 10:09 AM

    Jan,

    unfortunately not

     

    dsna@tsaix18 # db2 attach to DB2GW1 user dsna using xxxxxxx

       Instance Attachment Information

     Instance server        = DB2/AIX64 8.2.7

     Authorization ID       = DSNA

     Local instance alias   = DB2GW1

    dsna@tsaix18 # db2 connect to A01DSNA

    SQL30082N  Attempt to establish connection failed with security reason "3" 

    ("PASSWORD MISSING").  SQLSTATE=08001

    dsna@tsaix18 # 



    ------------------------------
    Michel de Kraker
    ------------------------------



  • 23.  RE: SQL30082N error

    Posted Thu February 19, 2026 11:55 AM

    So the only test left is to have local database defined as local.

    To complete this saga - verify that authentication is set to SERVER:

    db2 get dbm cfg | grep AUTHENTICATION



    ------------------------------
    Jan Nelken
    Db2 (LUW) DBA
    Open for work
    Katowice or Krakow
    +48 783 109 863
    ------------------------------



  • 24.  RE: SQL30082N error

    Posted Thu February 19, 2026 01:00 PM
    When you provide user/password in the DB2 attach command , you must  provide the same user/password in the DB2 connect command as well.Hence, you are getting the password Missing error.

    For reason code 19, test telnet or ssh connection to the remote host  using dsna?





  • 25.  RE: SQL30082N error

    Posted Thu February 19, 2026 03:15 PM

    I did a quick test on my Linux machine:

    I verified that having local database catalogued as remote implies userid/password needed (although I got reason code 3 instead of 19):



    ------------------------------
    Jan Nelken
    Db2 (LUW) DBA
    Open for work
    Katowice or Krakow
    +48 783 109 863
    ------------------------------



  • 26.  RE: SQL30082N error

    Posted Thu February 19, 2026 02:41 PM

    Michel,

    Just to complete this interrogation, do you have anything defined in DCS directory?

    db2 list dcs directory



    ------------------------------
    Jan Nelken
    Db2 (LUW) DBA
    Open for work
    Katowice or Krakow
    +48 783 109 863
    ------------------------------



  • 27.  RE: SQL30082N error

    Posted Thu February 19, 2026 12:43 PM
    Can you telnet or ssh to the remote host xxxxxx (as provided in the output below) using the user dsna ?







  • 28.  RE: SQL30082N error

    Posted Thu February 19, 2026 02:46 PM

    As you wish - but I would still like to have a glance at those 2 db2 list xxx commands - as I have suspicion, that database resides elsewhere - not on Aix, but on mainframe.
    You could also create user dsnx on Aix and try - as user dsnx issue db2 connect to dbalias (without password).
    If it succeed - you will know, that issue is with dsna userid and/or db2ckpwd; if it fails the same way - it will strongly suggests that database is remote to Aix (hence the 2 db2 list ... commands to prove or disprove that.
    If database is remote - on the host where database resides check whether dsna user is suspended, revoked or has password changed - as Db2 performs authentication on the OS hosting database.



    ------------------------------
    Jan Nelken
    Db2 (LUW) DBA
    Open for work
    Katowice or Krakow
    +48 783 109 863
    ------------------------------



  • 29.  RE: SQL30082N error

    Posted Thu February 19, 2026 03:07 PM

    Hello.

    What's the full output of the following command on AIX?

    lsuser -f dsna



    ------------------------------
    Mark Barinstein
    ------------------------------



  • 30.  RE: SQL30082N error

    Posted Fri February 20, 2026 02:08 AM

    Hi Mark,

    [root@xxxxx]/>lsuser -f dsna

    dsna:

            id=235

            pgrp=dsnaadm

            groups=dsnaadm,db2asgrp,dsnqadm,db2batch,jraf,jgaf,jbaf,jeaf,hraf,jpaf

            home=/dsna/home

            shell=/usr/bin/ksh

            login=true

            su=true

            rlogin=true

            daemon=true

            admin=false

            sugroups=ALL

            admgroups=

            tpath=nosak

            ttys=ALL

            expires=0

            auth1=SYSTEM

            auth2=NONE

            umask=22

            registry=files

            SYSTEM=compat

            logintimes=

            loginretries=0

            pwdwarntime=0

            account_locked=false

            minage=0

            maxage=0

            maxexpired=-1

            minalpha=0

            minother=0

            mindiff=0

            maxrepeats=8

            minlen=0

            histexpire=0

            histsize=0

            pwdchecks=

            dictionlist=

            default_roles=

            fsize=-1

            cpu=-1

            data=491519

            stack=65536

            core=-1

            rss=-1

            nofiles=2000

            time_last_login=1771513654

            time_last_unsuccessful_login=1770717920

            tty_last_login=

            tty_last_unsuccessful_login=ssh

            host_last_login=tsaix18

            host_last_unsuccessful_login=10.11.12.23

            unsuccessful_login_count=0

            roles=



    ------------------------------
    Michel de Kraker
    ------------------------------



  • 31.  RE: SQL30082N error

    Posted Fri February 20, 2026 01:21 PM

    Michel,

    You may try the utility aixAuthTest as root from the link below to check if the problem is outside db2 (as it believes) and show its output here.
    https://www.ibm.com/support/pages/authenticationauthorization-return-sql30082n-rc24-sql1092n-sql0551n

    sudo ./aixAuthTest -OSAUTH dsna xxx

    Unfortunately, you need IBM ID with some db2 product entitlement to get an access to this page...



    ------------------------------
    Mark Barinstein
    ------------------------------



  • 32.  RE: SQL30082N error

    Posted Fri February 27, 2026 10:39 AM

    Michel,

    I provided the wrong command of the aixAuthTest utility use. Sorry for that.
    The proper one is as follows if the DB2AUTH registry variable is not set to OSAUTHDB as in your case.


    sudo ./aixAuthTest -FILE dsna xxx

    By the way it's worth to check if your db2 instance uses some non-standard auth menthod.

    Please, shot the output of the following command as dsna on the server:

    db2 get dbm cfg | grep -E 'SRVCON_AUTH|AUTHENTICATION|PLUGIN'



    ------------------------------
    Mark Barinstein
    ------------------------------



  • 33.  RE: SQL30082N error

    Posted Thu February 19, 2026 11:41 PM

    For AIX did you check to make sure user ID is still a member of the Admin and User Groups for DB2.  If the ID is not in one of those groups you won't be able to connect or attach to DB2.  You will need to add them back in.   You may need to run the DBM DB get configuration commands to see what groups DB2 is using if the default groups are not used.  

    However one big concern is the version you are using.   You need to upgrade to protect DB2 from security threats as well as for our reasons.  



    ------------------------------
    Douglas Partch
    CEO
    Database Nerds
    Omaha NE
    ------------------------------



  • 34.  RE: SQL30082N error

    Posted Sun February 22, 2026 04:52 PM

    Hi Michel,

    I note..

    • Security Policy/Network Interruption: Corporate security policies (similar to firewall rules) activated on a network can trigger SQL30082N RC 19 or 15.

    So, asking security if you've been blocked...
    Also I wonder if you are authenticating against the local AIX server.. if so "db2 set DB2AUTH=OSAUTHDB" would tell db2 that..

    Regards Robert



    ------------------------------
    Robert Clow
    ------------------------------



  • 35.  RE: SQL30082N error

    Posted Mon February 23, 2026 12:23 AM
    Edited by Jan Nelken Mon February 23, 2026 11:23 AM

    Hi Robert,

    Since Michel is running museum quality Db2 (version 8.2) - DB2AUTH environment variable was not known at that time.

    Your advise about Security policy is well taken though - this would be indicated by AixAuthTest results.



    ------------------------------
    Jan Nelken
    Db2 (LUW) DBA
    Open for work
    Katowice or Krakow
    +48 783 109 863
    ------------------------------