Results 1 to 14 of 14
  1. #1
    Join Date
    May 2016
    Posts
    9

    Unanswered: DB2 system commands are not working and giving error "cannot execute"

    Hi All,
    One of our DB2 environment is having issues such as unable to execute db2stop, db2start etc..etc.. (DB2/10.5/Unix)

    $ db2level
    DB21085I This instance or install (instance name, where applicable:
    "db2inst1") uses "64" bits and DB2 code release "SQL10054" with level
    identifier "0605010E".
    Informational tokens are "DB2 v10.5.0.4", "special_33140", "IP23616_33140", and
    Fix Pack "4".
    Product is installed at "/opt/ibm/db2/V10.5".

    I am able to execute commands such as db2top, db2set etc.. I can run DML, DDL and DCL's ..

    Here is the snippet of some of the commands and the errors ..

    $ db2level
    DB21085I This instance or install (instance name, where applicable:
    "db2inst1") uses "64" bits and DB2 code release "SQL10054" with level
    identifier "0605010E".
    Informational tokens are "DB2 v10.5.0.4", "special_33140", "IP23616_33140", and
    Fix Pack "4".
    Product is installed at "/opt/ibm/db2/V10.5".

    $ db2 connect to cm user db2inst1
    Enter current password for db2inst1:

    Database Connection Information

    Database server = DB2/AIX64 10.5.4
    SQL authorization ID = DB2INST1
    Local database alias = CM

    $ db2 "select dbadmauth,SECURITYADMAUTH, grantee from sysibm.sysdbauth where grantee = 'DB2INST1' "

    DBADMAUTH SECURITYADMAUTH GRANTEE
    --------- --------------- --------------------------------------------------------------------------------------------------------------------------------
    Y Y DB2INST1

    1 record(s) selected.

    $ db2stop
    ksh: db2stop: cannot execute
    $ db2start
    ksh: db2start: cannot execute
    $ db2set -ALL
    [e] DB2PATH=/opt/ibm/db2/V10.5
    [i] DB2COMM=TCPIP
    $ db2ilist
    Error encountered during the Add record action: Failed to lock the registry
    db2inst1
    $ db2licm -L
    ksh: db2licm: cannot execute

    Thanks in advance ..

  2. #2
    Join Date
    Jan 2003
    Posts
    4,286
    Provided Answers: 5
    Check the permissions on the commands.

    Andy

  3. #3
    Join Date
    May 2016
    Posts
    9
    Thanks Andy for the info..

    Verified permissions for the files that are not working and they look exactly same in all the other environments and these commands work fine every where else ..

    --permissions in not working envrionment
    -r-sr-sr-x 1 root db2iadm1 127247 Aug 08 14:18 db2stop
    -r-sr-sr-x 1 root db2iadm1 121913 Aug 08 14:18 db2start
    -r-sr-sr-x 1 db2inst1 db2iadm1 385663 Aug 08 14:18 db2star2
    -r-xr-xr-x 1 db2inst1 db2iadm1 111022 Aug 08 14:18 db2set

    ---permissions in working environment
    -r-sr-sr-x 1 root db2iadm1 127247 Feb 25 2016 db2stop
    -r-sr-sr-x 1 root db2iadm1 121913 Feb 25 2016 db2start
    -r-sr-sr-x 1 db2inst1 db2iadm1 385663 Feb 25 2016 db2star2
    -r-xr-xr-x 1 db2inst1 db2iadm1 111022 Feb 25 2016 db2set

    any more help is much appreciated ...

    Thanks

  4. #4
    Join Date
    Apr 2012
    Posts
    1,006
    Provided Answers: 16
    You are running a special build of V10.5.0.4 on some unspecified unix.
    Your post does not specify which account is getting the 'cannot execute' messages.
    If you are getting these messages with the instance owner account (example db2inst1) then check if there's been a fixpack installation screw up and in this case try db2iupdt.
    Another possibility is something has aliased these commands and messed that up, so try running the command with the *fully qualified absolute path* to check that and if they then work when running as the instance-owner then your environment needs checking.

  5. #5
    Join Date
    Jul 2016
    Location
    Moscow
    Posts
    66
    Provided Answers: 6
    Hi,

    what are the mount options of the file systems where the instance owner's home directory and the ${DB2PATH} directory reside?
    Regards,
    Mark.

  6. #6
    Join Date
    Jul 2016
    Location
    Germany
    Posts
    20
    Provided Answers: 1

    quick and dirty

    Hi newBeeHADR,


    how about a

    set | grep DB2

    (especially DB2INSTANCE)

    set | grep USER

    DB2INSTANCE and USER should be the same

    pwd

    find / -name global.reg

    ls -l on that path

    diaglog messages if existing


    Good luck
    db2dp

  7. #7
    Join Date
    May 2016
    Posts
    9
    Quote Originally Posted by db2dp View Post
    Hi newBeeHADR,


    how about a

    set | grep DB2

    (especially DB2INSTANCE)

    set | grep USER

    DB2INSTANCE and USER should be the same

    pwd

    find / -name global.reg

    ls -l on that path

    diaglog messages if existing


    Good luck
    db2dp
    Thanks a lot..

    here is the info ...

    $ db2level
    DB21085I This instance or install (instance name, where applicable:
    "db2inst1") uses "64" bits and DB2 code release "SQL10054" with level
    identifier "0605010E".
    Informational tokens are "DB2 v10.5.0.4", "special_33140", "IP23616_33140", and
    Fix Pack "4".
    Product is installed at "/opt/ibm/db2/V10.5".

    Operating System is AIX, version 7.1

    $ set | grep DB2
    DB2DIR=/opt/ibm/db2/V10.5
    DB2INSTANCE=db2inst1
    DB2LIB=/opt/ibm/db2/V10.5/lib
    DB2NODE=0
    DB2PATH=/opt/ibm/db2/V10.5
    DB2_HOME=/opt/ibm/db2/V10.5
    PREV_DB2_PATH=''
    $ set | grep USER
    USER=db2inst1

    $ pwd
    /var/db2

    $ ls -l
    total 8
    -rw-r--r-- 1 root system 308 Aug 8 14:18 global.reg
    $ ls -ltr
    total 8
    -rw-r--r-- 1 root system 308 Aug 8 14:18 global.reg
    $ ls -latr
    total 24
    -rw-r--r-- 1 root system 0 Aug 8 14:14 .global.reg.lock
    drwxr-xr-x 33 bin bin 4096 Aug 8 14:14 ..
    -rw-r--r-- 1 root system 308 Aug 8 14:18 global.reg
    drwxr-xr-x 2 root system 256 Aug 8 14:19 .
    -rw-r--r-- 1 root system 16 Aug 30 14:26 .fmcd.lock

    $ strings global.reg
    /opt/ibm/db2/V10.5
    DB2GPRF
    DB2SYSTEM
    !od-son-u-ax-354.dev.server.com
    /opt/ibm/db2/V10.5
    db2inst1
    /home/db2inst1/sqllib
    /opt/ibm/db2/V10.5

    any help is much appreciated ..

  8. #8
    Join Date
    May 2016
    Posts
    9
    Thanks db2mor...

    here is my environment ..

    $ db2level
    DB21085I This instance or install (instance name, where applicable:
    "db2inst1") uses "64" bits and DB2 code release "SQL10054" with level
    identifier "0605010E".
    Informational tokens are "DB2 v10.5.0.4", "special_33140", "IP23616_33140", and
    Fix Pack "4".
    Product is installed at "/opt/ibm/db2/V10.5".

    Operating System is AIX, version 7.1

    -- i am able to execute these commands using absolute path both as root user as well as instance owner..
    How ever I am unable to execute if path is not mentioned ...

    Thanks a lot..

  9. #9
    Join Date
    May 2016
    Posts
    9
    Mark,

    thanks for your tip..Unfortunately I don't know how to find the mount options ..

    this is what I got when I issued mount command ...

    $ mount
    node mounted mounted over vfs date options
    -------- --------------- --------------- ------ ------------ ---------------
    /dev/hd4 / jfs2 Aug 11 16:19 rw,log=/dev/hd8
    /dev/hd2 /usr jfs2 Aug 11 16:19 rw,log=/dev/hd8
    /dev/hd9var /var jfs2 Aug 11 16:19 rw,log=/dev/hd8
    /dev/hd3 /tmp jfs2 Aug 11 16:19 rw,log=/dev/hd8
    /dev/hd11admin /admin jfs2 Aug 11 16:19 rw,log=/dev/hd8
    /proc /proc procfs Aug 11 16:19 rw
    /dev/livedump /var/adm/ras/livedump jfs2 Aug 11 16:19 rw,log=/dev/hd8
    /dev/fslv00 /db2fs jfs2 Aug 11 16:19 rw,log=/dev/loglv00
    /dev/fslv01 /home/db2inst1 jfs2 Aug 11 16:19 rw,log=/dev/loglv00

    Your help is much appreciated ...

  10. #10
    Join Date
    Jul 2016
    Location
    Moscow
    Posts
    66
    Provided Answers: 6
    What's the output of
    /opt/ibm/db2/V10.5/bin/db2greg -dump
    Regards,
    Mark.

  11. #11
    Join Date
    May 2016
    Posts
    9
    Quote Originally Posted by mark.bb View Post
    What's the output of
    /opt/ibm/db2/V10.5/bin/db2greg -dump
    i am not getting for db2greg -dump

    $ db2greg -dump

    ----
    $ strings db2greg
    @(#)23 1.6 src/bos/usr/ccs/lib/libpthreads/init.c, libpth, bos610 6/21/07 15:28:59
    @(#)61
    1.16 src/bos/usr/ccs/lib/libc/__threads_init.c, libcthrd, bos610 8/2/07 13:09:21
    P@(#)42
    1.1 src/bos/usr/ccs/lib/libc/POWER/crti.C, libcproc, bos610 3/13/07 11:03:08

  12. #12
    Join Date
    Jul 2016
    Location
    Moscow
    Posts
    66
    Provided Answers: 6
    What does it mean: "i am not getting for db2greg -dump"?
    Aren't you able to run this command as root?
    Regards,
    Mark.

  13. #13
    Join Date
    Apr 2012
    Posts
    1,006
    Provided Answers: 16
    Quote Originally Posted by newBeeHADR View Post
    Thanks db2mor...


    -- i am able to execute these commands using absolute path both as root user as well as instance owner..
    How ever I am unable to execute if path is not mentioned ...
    If the commands run correctly as db2inst1 when fully qualified with their correct path then I suggest you carefully compare working and failing versions of the db2inst1 shell-startup scripts (like .profile, .kshrc, .bashrc depending on which shell the db2inst1 is using), in addition to the db2inst1 home directory /sqllib/db2profile and db2inst1 home directory /sqllib/userprofile (if that exists)

  14. #14
    Join Date
    Jul 2016
    Location
    Germany
    Posts
    20
    Provided Answers: 1

    quick and dirty

    Hi newBeeHADR,

    it's getting warmer:
    The /opt/ibm/db2/V10.5/bin/db2greg -dump
    should give us a readable Version of your
    strings global.reg
    please give us an
    ls -l /opt/ibm/db2/V10.5/bin/db2greg
    should look like
    -r-xr-xr-x 1 bin bin 111184 17 Nov 2015 /opt/IBM/db2/V10.5/bin/db2greg
    Our IBM is uppercase !
    We had some trouble with our TSM Installation of DB2,
    where the DB2DIR has not been exactly /opt/IBM/db2/V10.5

    Good luck
    db2dp

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •