Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2007
    Posts
    288

    Unanswered: Db2 V9 on windows restore problem

    trying to do a redirected restore into an existing database:

    Code:
    db2 RESTORE DATABASE PRODDM FROM I:\ProdDMBackup\ TO G: INTO DUTDMA  WITH 2 BUFFERS BUFFER 1024 REPLACE EXISTING  REDIRECT PARALLELISM 1 WITHOUT PROMPTING
    and I get this:

    SQL1350N The application is not in the correct state to process this request.Reason code="1".

    Code:
    C:\db2 connect to dutdma
    SQL0752N Connecting to a database is not permitted within a logical unit of work when the CONNECT type 1 setting is in use. SQLSTATE=0A001

    Code:
    C:\db2 restart database dutdma
    SQL0752N Connecting to a database is not permitted within a logical unit of work when the CONNECT type 1 setting is in use. SQLSTATE=0A001

    I've looked up these errors and nothing is making sense. I can connect to DUTDMA from the control center but not from a command prompt..

    can anyone help????

  2. #2
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Try "db2 terminate" and then restore

  3. #3
    Join Date
    Dec 2007
    Posts
    288
    you are the best.. db2 terminate and now the restore is running!!

  4. #4
    Join Date
    Dec 2007
    Posts
    288
    I thought I had it!!!! restore was running and looks like it finished but I cannot access the database. I get an error that a previous restore is still in progress......

    Code:
    2009-08-04-21.56.20.444000-240 E51313H499         LEVEL: Info
    PID     : 2668                 TID  : 6156        PROC : db2syscs.exe
    INSTANCE: DB2_02               NODE : 000         DB   : DUTDMA
    APPHDL  : 0-3970               APPID: *LOCAL.DB2_02.090805015620
    AUTHID  : ISJXR18 
    EDUID   : 6156                 EDUNAME: db2agent (DUTDMA)
    FUNCTION: DB2 UDB, database utilities, sqludPrintStartingMsg, probe:1292
    DATA #1 : <preformatted>
    Starting a full database restore.
    Agent EDU ID: 6156
    
    2009-08-04-21.56.20.444000-240 E51814H554         LEVEL: Warning
    PID     : 2668                 TID  : 6156        PROC : db2syscs.exe
    INSTANCE: DB2_02               NODE : 000         DB   : DUTDMA
    APPHDL  : 0-3970               APPID: *LOCAL.DB2_02.090805015620
    AUTHID  : ISJXR18 
    EDUID   : 6156                 EDUNAME: db2agent (DUTDMA)
    FUNCTION: DB2 UDB, database utilities, sqluCompareDB, probe:1399
    DATA #1 : Sqlcode, PD_TYPE_SQLCODE, 4 bytes
    2528
    DATA #2 : Hexdump, 4 bytes
    0xB5E75570 : E009 0000                                  ....
    
    2009-08-04-21.56.20.444000-240 E52370H1000        LEVEL: Warning
    PID     : 2668                 TID  : 6156        PROC : db2syscs.exe
    INSTANCE: DB2_02               NODE : 000         DB   : DUTDMA
    APPHDL  : 0-3970               APPID: *LOCAL.DB2_02.090805015620
    AUTHID  : ISJXR18 
    EDUID   : 6156                 EDUNAME: db2agent (DUTDMA)
    FUNCTION: DB2 UDB, database utilities, sqluCompareDB, probe:1399
    MESSAGE : SQL2540W  Restore is successful, however a warning "" was encountered 
              during Database Restore while processing in No Interrupt mode.
    DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
     sqlcaid : SQLCA     sqlcabc: 136   sqlcode: 2540   sqlerrml: 4
     sqlerrmc: 2528
     sqlerrp : sqluComp
     sqlerrd : (1) 0x00000000      (2) 0x00000000      (3) 0x00000000
               (4) 0x00000000      (5) 0x00000000      (6) 0x00000000
     sqlwarn : (1)      (2)      (3)      (4)        (5)       (6)    
               (7)      (8)      (9)      (10)        (11)     
     sqlstate:      
    
    2009-08-04-21.56.23.022000-240 E53372H555         LEVEL: Warning
    PID     : 2668                 TID  : 6156        PROC : db2syscs.exe
    INSTANCE: DB2_02               NODE : 000         DB   : DUTDMA
    APPHDL  : 0-3970               APPID: *LOCAL.DB2_02.090805015620
    AUTHID  : ISJXR18 
    EDUID   : 6156                 EDUNAME: db2agent (DUTDMA)
    FUNCTION: DB2 UDB, database utilities, sqludBMResponse, probe:307
    DATA #1 : Sqlcode, PD_TYPE_SQLCODE, 4 bytes
    1277
    DATA #2 : Hexdump, 4 bytes
    0xB5E75570 : FD04 0000                                  ....
    
    2009-08-04-21.56.23.038000-240 E53929H1073        LEVEL: Warning
    PID     : 2668                 TID  : 6156        PROC : db2syscs.exe
    INSTANCE: DB2_02               NODE : 000         DB   : DUTDMA
    APPHDL  : 0-3970               APPID: *LOCAL.DB2_02.090805015620
    AUTHID  : ISJXR18 
    EDUID   : 6156                 EDUNAME: db2agent (DUTDMA)
    FUNCTION: DB2 UDB, database utilities, sqludBMResponse, probe:307
    MESSAGE : SQL1277W  A redirected restore operation is being performed.  Table 
              space configuration can now be viewed and table spaces that do not 
              use automatic storage can have their containers reconfigured.
    DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
     sqlcaid : SQLCA     sqlcabc: 136   sqlcode: 1277   sqlerrml: 0
     sqlerrmc: 
     sqlerrp : sqludBMR
     sqlerrd : (1) 0x00000000      (2) 0x00000000      (3) 0x00000000
               (4) 0x00000000      (5) 0x00000000      (6) 0x00000000
     sqlwarn : (1)      (2)      (3)      (4)        (5)       (6)    
               (7)      (8)      (9)      (10)        (11)     
     sqlstate:      
    
    2009-08-04-21.56.40.351000-240 I55004H449         LEVEL: Warning
    PID     : 2668                 TID  : 8064        PROC : db2syscs.exe
    INSTANCE: DB2_02               NODE : 000         DB   : DUTDMA
    APPHDL  : 0-3972               APPID: *LOCAL.DB2_02.090805015641
    AUTHID  : DB2ADMIN
    EDUID   : 8064                 EDUNAME: db2agent (DUTDMA)
    FUNCTION: DB2 UDB, base sys utilities, sqleCheckForRestore, probe:10
    RETCODE : ZRC=0xFFFFFBA1=-1119
    
    2009-08-04-21.56.40.382000-240 I55455H457         LEVEL: Warning
    PID     : 2668                 TID  : 8064        PROC : db2syscs.exe
    INSTANCE: DB2_02               NODE : 000         DB   : DUTDMA
    APPHDL  : 0-3972               APPID: *LOCAL.DB2_02.090805015641
    AUTHID  : DB2ADMIN
    EDUID   : 8064                 EDUNAME: db2agent (DUTDMA)
    FUNCTION: DB2 UDB, base sys utilities, sqlePrepareForSerialization, probe:20
    RETCODE : ZRC=0xFFFFFBA1=-1119

  5. #5
    Join Date
    Aug 2009
    Posts
    8
    What error do you see while accessing database ?

    From db2diag.log entries, it seems that RESTORE is not completed yet.

    "-1119" errors are there because someone is trying to connect to database when restore is in progress.

    Check RESTORE progress with "list utilities show detail" command.

  6. #6
    Join Date
    Dec 2007
    Posts
    288
    I am getting this trying to connect to DB
    Code:
    A connection to or activation of database "DUTDMA" cannot be made 
    because a previous restore is incomplete or still in progress.  
    SQLSTATE=57019
    
    Explanation: 
    
    The database is in an inconsistent state because a system error occurred
    during a restore function or a restore is still in progress.
    List utilities shows NO activity . No one else was connected to this instance while restore was running.. i wonder if it was something like the health monitor???

    I really need to get this restored....

  7. #7
    Join Date
    Aug 2009
    Posts
    8
    if possible.. go for fresh restore operation. How much time does it take for restore ?

    - First of all, drop the database.
    - Then recycle the db2 instance. (if possible, recycle the server).
    - Start new RESTORE operation.

    Also, archive db2diag.log file before staring new RESTORE so that we can have new entries in db2diag.log for this restore operation.

  8. #8
    Join Date
    Dec 2007
    Posts
    288
    Thank you. I'll give it a try

  9. #9
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Redirected restore consists of 3 steps: 1) restore... redirect, 2) set containers, 3) restore ... continue. Based on the db2diag.log messages you pasted, you only performed step #1. I don't see any messages indicating whether restore completed or failed.

Posting Permissions

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