Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2012
    Posts
    177

    Unanswered: Issues with connect the database after restore

    Hi all,

    In our setup db2 v9.7 with fixpack 4

    Facing issues with connecting the database:
    =================================

    When I tried to restore the incremental backup it's went fine:

    db2 restore db XXXX incremental automatic load /usr/openv/netbackup/bin/xxx

    SQL2593W Warning ! Restoring to an existing database that is the same as
    the backup image . The databases files will be deleted.

    Do you want to continue ? (Y/n) Y
    DB20000I The Restore DATABASE command completed successfully.

    I tried to connect the database i am getting the below error:
    =============================================

    SQL1117N A connection to or activation of database "XXX" cannot be made
    because of ROLL-FORWARD PENDING. SQLSTATE=57019

    Could you please give me the suggestions how to connect the database?



    Thanks,
    laxman..

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    what a nice invention the doc is .....
    please read and do as indicated
    SQL1117N
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Sep 2012
    Posts
    177
    Hi guy,

    Thx for your reply..

    I tried the rollforward command also:

    db2 rollforward to end of logs and stop

    Even i am not able to connect the database.

    Input database alias = TIS_DWHP
    Number of nodes have returned status = 3

    Node number Rollforward Next log Log files processed Last committed transaction
    status to be read
    ----------- -------------------------- ------------------- ------------------------- --------------------------
    0 DB pending S0000022.LOG - 2012-12-12-00.36.45.000000 UTC

    DB status is in pending, Could you pleae suggestion how to connect the database?

    Thanks,
    laxman..

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    that is the answer when not supplying all info : platform - dpf / non-dpf .....
    look at message : Number of nodes have returned status = 3
    check diaglog
    have you restored only the incremental backup ? on same machine or different and all log files available ??
    the restore sequence is different if using incremental backup
    always specify all complete commands/output/info... otherwise you get 20 updates just with part of info...
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  5. #5
    Join Date
    Sep 2012
    Posts
    177
    Hi guy,

    Environment is DPF running with 3 nodes.

    Tried to restore the incremental backup only for this particular machine only.

    Command to use the restore:
    =====================

    db2 restore db XXXX incremental automatic load /usr/openv/netbackup/bin/xxx

    Mentioned the db2diag.log:
    ====================

    Information in this record is only valid at the time when this file was
    created (see this record's time stamp)

    2012-12-13-19.57.23.896249+660 I1551E374 LEVEL: Event
    PID : 21640 TID : 47227462565680PROC : db2diag
    INSTANCE: db2inst1 NODE : 000
    FUNCTION: DB2 UDB, RAS/PD component, pdDiagArchiveDiagnosticLog, probe:88
    CREATE : DB2DIAG.LOG ARCHIVE : /db2home/db2inst1/sqllib/db2dump/db2diag.log_2012-12-13-19.57.23 : success
    IMPACT : Potential

    2012-12-13-19.57.36.495300+660 I1926E523 LEVEL: Severe
    PID : 14965 TID : 46939294918976PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : TIS_DWHP
    APPHDL : 0-189 APPID: *N0.db2inst1.121213085736
    AUTHID : DB2INST1
    EDUID : 73 EDUNAME: db2agent (TIS_DWHP) 0
    FUNCTION: DB2 UDB, base sys utilities, sqeLocalDatabase::FirstConnect, probe:125
    DATA #1 : Hexdump, 4 bytes
    0x00000002007F5B84 : A3FB FFFF ....

    2012-12-13-19.57.36.502928+660 E2450E471 LEVEL: Event
    PID : 14965 TID : 46939294918976PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : TIS_DWHP
    APPHDL : 0-189 APPID: *N0.db2inst1.121213085736
    AUTHID : DB2INST1
    EDUID : 73 EDUNAME: db2agent (idle) 0
    FUNCTION: DB2 UDB, base sys utilities, sqeLocalDatabase::TermDbConnect, probe:2000
    STOP : DATABASE: TIS_DWHP : DEACTIVATED: NO


    rollforward status for the 3 nodes:
    ==========================

    Rollforward Status

    Input database alias = TIS_DWHP
    Number of nodes have returned status = 3

    Node number Rollforward Next log Log files processed Last committed transaction
    status to be read
    ----------- -------------------------- ------------------- ------------------------- --------------------------
    0 DB pending S0000022.LOG - 2012-12-12-00.36.45.000000 UTC
    1 not pending - 1970-01-01-00.00.00.000000 UTC
    2 not pending - 1970-01-01-00.00.00.000000 UTC



    After restoring the incremental backup only not able to connect the database.

    Thanks,
    laxman..

  6. #6
    Join Date
    Nov 2009
    Posts
    21
    Provided Answers: 1
    Laxman

    For DPF setup.. you need to restore every partition individually... are you restoring from online backup ? If so use logtarget option in the restore command and extract the log files in the backup to a location.

    then run the rollforward command with overflow log path and mentioned the logtarget path.

    sample below

    restore db <dbname> taken at <timestamp> on <dbpath> logtarget </logs/extract/> without prompting;

    once restore is complete.

    "rollforward db <dbname> to end of logs and complete overflow log path ('/logs/extract')"

    Try this option. Database should be out of roll forward pending state.

  7. #7
    Join Date
    Sep 2012
    Posts
    177
    Thanks surgeon, it's working fine now..

Posting Permissions

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