Results 1 to 11 of 11

Thread: DB2 backup hang

  1. #1
    Join Date
    Nov 2015
    Posts
    36
    Provided Answers: 2

    Unanswered: DB2 backup hang

    in LUW 9.7.7 online backup stuck and can't find details on it.

    every other day I get the backup script hang on different DB:

    Code:
    -bash-4.2$ ps -ef | grep 1339524
    db2inst1  884990       1   0 02:17:45      -  0:00 /db2/home/db2inst1/sqllib/bin/db2bp 1339524A302 5 A
    db2inst1 1310876  823348   0 10:10:23  pts/0  0:00 grep 1339524
    db2inst1 1327232 1339524   0 02:17:46      -  0:00 db2 -v
    db2inst1 1339524  381016   0 02:17:45      -  0:00 /usr/bin/bash /db2/home/db2inst1/Scripts/backup_database.sh DBDEV153
    -bash-4.2$ db2 list utilities
    SQL1611W  No data was returned by Database System Monitor.  SQLSTATE=00000
    so I know the process but I dont see anything and in db2top also I dont see anything, no errors in db2diag


    If I'll kill it and start again usually it will stuck again unless I'll restart the instance(which also problematic because only db2_kill works)
    Last edited by AntiLopa; 11-17-15 at 05:10.

  2. #2
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Collect diagnostic data by the following command and open PMR with IBM Support.
    db2fodc -hang full -db DBDEV153
    Regards,
    Mark.

  3. #3
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    What are the complete contents of the script?
    /db2/home/db2inst1/Scripts/backup_database.sh
    Are you backing up to disk or tape or what, with which options?
    Does the problem repeat if you don't use the script, but use the same command-line as the script would do?
    What's in the db_history table for the backup, starttime/endtime/sqlcode/sqlstate etc?

  4. #4
    Join Date
    Nov 2015
    Posts
    36
    Provided Answers: 2
    the content is:

    Code:
    db2 -v archive log for db $SRC_DB
    
    db2 -v BACKUP DATABASE $SRC_DB ONLINE TO $BCK_DIR WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 COMPRESS WITHOUT PROMPTING
    if I doesnt use the script it's still hang and no activity shows from db2 list utilities

    Code:
    -bash-4.2$ db2 "SELECT DBPARTITIONNUM, EID, OPERATION, OPERATIONTYPE,START_TIME, ENTRY_STATUS,SQLSTATE,SQLCODE FROM SYSIBMADM.DB_HISTORY"
    
    DBPARTITIONNUM EID                  OPERATION OPERATIONTYPE START_TIME     ENTRY_STATUS SQLSTATE SQLCODE
    -------------- -------------------- --------- ------------- -------------- ------------ -------- -----------
    ...
                 0                  314 X         1             20151117182050 A            -                  -
                 0                  315 X         N             20151118020803 A            -                  -
                 0                  316 X         1             20151118020846 A            -                  -
                 0                  317 X         P             20151118113655 A            -                  -
    
    -bash-4.2$ ps -ef | grep backup
    db2inst1 1167614 1331402   0 02:08:02      -  0:00 /usr/bin/bash /db2/home/db2inst1/Scripts/backup_database.sh DBDEV153
    Last edited by AntiLopa; 11-18-15 at 07:34.

  5. #5
    Join Date
    Sep 2012
    Posts
    11
    Provided Answers: 1
    You might want to look into latch contention. Utility could be waiting on a latch held by another request.
    While hang occurs output from db2pd -latches could show you this.

    This article might be useful.
    http://www-01.ibm.com/support/docvie...id=swg21456306

  6. #6
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    The DB_History in your post shows no DB2-backup has started (assuming you gave the full content).
    Depending on what is in your script (in terms of actual values of the variables) you might never have started a DB2-backup - hence I ask for stdout/stderr of the script.
    Ensure your DIAGLEVEL is 3 at least.
    Post the output of the command line "db2 backup database DBDEV153 online to $BCK_DIR compress" (make sure you substitute a real path instead of $BCK_DIR to which the db2inst1 account has full permissions to write).

  7. #7
    Join Date
    Nov 2015
    Posts
    36
    Provided Answers: 2
    That's exactly the issue - it doesn't logged anywhere

    You can see the TS it is very close to the start of the script

  8. #8
    Join Date
    May 2012
    Location
    Canberra, Australia
    Posts
    176
    Provided Answers: 6
    Did you open the PMR as Mark suggested?
    Andy

    "All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can’t get them together again, there must be a reason. By all means, do not use hammer.” — IBM maintenance manual, 1975 "

  9. #9
    Join Date
    Nov 2015
    Posts
    36
    Provided Answers: 2
    I'm waiting for some info for the PMR

  10. #10
    Join Date
    May 2012
    Location
    Canberra, Australia
    Posts
    176
    Provided Answers: 6
    I would have opened the PMR, get the contact from IBM and get the info they ask for. The first thing they will probably want is the db2support o/p file but they will give you specifics. You can run it in parallel with a question here
    Andy

    "All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can’t get them together again, there must be a reason. By all means, do not use hammer.” — IBM maintenance manual, 1975 "

  11. #11
    Join Date
    Nov 2015
    Posts
    36
    Provided Answers: 2
    it looked like (lack of) ram/swap issue

Posting Permissions

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