Db2

Db2

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  Rollforward from DB2 10.5 FP7 to DB2 11.1

    Posted Wed March 31, 2021 12:29 PM

    Hi,

     

    I try rollforward from V105FP7 to V11.1.

    I created a database DB01 with archive logging on DB2 V10.5 FP7 and an online backup.

    Then I upgraded the instance and the database to version 11.1.

    I did some work on version 11.1.

    Then I downgraded the instance from 11.1 to 10.5FP7 with

    mv sqllib sqllib_v111

    mv sqllib_v105 sqllib

     

    [db2inst3@lxdb205 ~]$ db2level
    DB21085I  This instance or install (instance name, where applicable:
    "db2inst3") uses "64" bits and DB2 code release "SQL10057" with level
    identifier "0608010E".
    Informational tokens are "DB2 v10.5.0.7", "s151221", "IP23956", and Fix Pack
    "7".
    Product is installed at "/opt/ibm/db2/db2v105fp7".

    Then I restored the online backup image from version 10.5 FP7 and rollforward to end of logs

    [db2inst3@lxdb205 ~]$ db2 restore database db01 from $PWD/db2bkp1 taken at 20160305211828

    DB20000I The RESTORE DATABASE command completed successfully.

    [db2inst3@lxdb205 ~]$ db2 rollforward db db01 to end of logs

    SQL2463N The roll forward stopped because the rollforward utility has reached

    an upgrade operation in the logs.

    Then I upgraded the instance from V10.5 FP7 to V11.1 again using

    mv sqllib sqllib_v105

    mv sqllib_v111 sqllib

     

    I started the instance again and did rollforward but it did not work

    [db2inst3@lxdb205 ~]$ db2start

    SQL8007W There are "56" day(s) left in the evaluation period for the product

    "DB2 Enterprise Server Edition". For evaluation license terms and conditions,

    refer to the License Agreement document located in the license directory in

    the installation path of this product. If you have licensed this product,

    ensure the license key is properly registered. You can register the license by

    using the db2licm command line utility. The license key can be obtained from

    your licensed product CD.

    03/05/2016 21:44:52 0 0 SQL1063N DB2START processing was successful.

    SQL1063N DB2START processing was successful.

     

    [db2inst3@lxdb205 ~]$ db2 rollforward db db01 to end of logs
    SQL5035N  The connection failed because the database product has been updated
    and the database needs to be upgraded  SQLSTATE=55001

     

    So is this not supported with the current drop s1601272100?

    DB21085I  This instance or install (instance name, where applicable:
    "db2inst3") uses "64" bits and DB2 code release "SQL11010" with level
    identifier "0201010F".
    Informational tokens are "DB2 v11.1.0.0", "s1601272100", "DYN1601272100", and
    Fix Pack "0".
    Product is installed at "/opt/ibm/db2/db2v111fp0s1601272100".

    Please describe why it does not work and document it how it should work!

     

    Thanks!

     

    Best regards,

    Gerhard


    #Db2
    #Db2EarlyAccessProgram(EAP)Forum


  • 2.  RE: Rollforward from DB2 10.5 FP7 to DB2 11.1
    Best Answer

    Posted Wed March 31, 2021 12:29 PM
    Hi. I see you are using build 11.1 s1601272100. The feature was not available yet in that build. I believe if you use the latest build (s1602242100 I think it is) your rollforward in 11.1 should work.

    Thanks.


  • 3.  RE: Rollforward from DB2 10.5 FP7 to DB2 11.1

    Posted Wed March 31, 2021 12:29 PM

    You have to perform all steps as in previous releases. The only difference is that you don't need to create OFFLINE backups. It is still recommended to perform an ONLINE backup shortly before you initiate the regular database upgrade.

    In cases of errors you can rollforward through a database upgrade, but rollforward command will not perform the version upgrade.




  • 4.  RE: Rollforward from DB2 10.5 FP7 to DB2 11.1

    Posted Wed March 31, 2021 12:29 PM

    I did an online backup shortly before the regular database upgrade! There was no error! And this answer is not helpful!

    As described I created a newly database on version 10.5 FP7 and did the following as already descriped

    - created a few tables with inserts
    - online backup.
    - archived a log.

    - deactivated database

    - db2stop

    - db2iupgrade

    - UPGRADE DATABASE

    - did some changes

    - DEACTIVATE DATABASE

    - db2stop

    - Downgrade instance to V105 FP7

    - RESTORE backup image from ONLINE backup before Version 10.5 FP7

    - Rollforward Backup images => Rollforward stops at Upgrade Log Record

    - db2stop

    - Upgrade instance to V11

    - db2start

    - Rollforward to end of logs => SQL5035N  The connection failed because the database product has been updated
    and the database needs to be upgraded  SQLSTATE=55001

    So this is the procedure IBM recommends for Rollforward through Versions starting from V105FP7 to V111!

     

    Where I did anything wrong? I did no anything wrong as I know!

    How should we test as beta testers when there is nothing documented?

     

    And by the way I already described the process in my initial post!

     

    Regards,

    Gerhard




  • 5.  RE: Rollforward from DB2 10.5 FP7 to DB2 11.1

    Posted Wed March 31, 2021 12:30 PM
    I am not the expert for this feature. I am only passing information that might help you to get through. Please don't blame me, if the feature does not work or does not work as you expect.
    
    Below the steps as I have received them. The only obvious difference I see, are the uncatalog/catalog db operations.
    I received the information about this feature beginning of February and don't know if the procedure is complete nor at which db2level this is supposed to work.
    
    You are free to ignore this information and wait until an expert on this topics guides you through this procedure.
    
    1. 
    VERY IMPORTANT
     As instance owner, protect the log files as in the next step you will be required to drop the database (in
       multi-database environments, apply this to all databases that require recovery). This step is necessary as some or all of the log files
       in the active or mirror log paths may not have been archived and the drop of the database will delete all of those log files. To get the
       current value of these log paths, use:
    
          db2 get db cfg for <database_name> | grep -i log
    
       Note that this copy must be retained until this recovery procedure is completed and a new online full database backup is completed and
       verified, which will include a copy of the log files.
    
    2. Log on to the DB2 server as a user with SYSADM authority, issue list database directory to view the database path where the database
       will be restored to (in multi-database environments, apply this to all databases that require recovery).
    
    3. Log on to the DB2 server as a user with SYSADM authority, drop all databases needing recovery in DB2 Version 11.1 by running the
       DROP DATABASE command. 
    
    4. As instance owner, stop the instance using db2stop.
    
    5. Drop your DB2 Version 11.1 instance by running the db2idrop command. This command does not remove the database files.
    
    6. Recreate your instance in the pre-DB2 Version 11.1 by running the db2icrt command. Then restore the database manager
       configuration parameter values for each instance using the UPDATE DATABASE MANAGER CONFIGURATION command.
    
    7. As instance owner, start the instance using db2start.
    
    8. For each database needing recovery, restore your databases from a pre-DB2 Version 11.1 backup by running the RESTORE DATABASE
       command to the database paths listed in step 2.
    
    9. Roll forward all databases restored in step 8 to a point in time before the failure. Ensure that you supply the log files saved off
       in step 1 to the ROLLFORWARD DATABASE command. This can be done by copying the log files back into the active log paths or by
       supplying the OVERFLOW LOG PATH parameter on the ROLLFORWARD DATABASE command.  If log archiving is being used ensure that the archive
       location is available.  When the roll forward hits SQL2463N or SQL2464N that means the end of release has been reached.
    
    10. As instance owner, stop the instance using db2stop.
    
    11. Uncatalog all databases using the UNCATALOG DATABASE command.
    
    12. Log on the the DB2 server as root on Linux and UNIX operating systems and move the prior release's sqllib directory.
    
    13. As root on Linux and UNIX operating systems, upgrade the instance to DB2 Version 11.1 using db2iupgrade.
    
    14. As instance owner, start the instance using db2start.
    
    15. Catalog all databases using the CATALOG DATABASE command.
    
    16. For all databases needing recovery, continue the roll forward done in step 11 until complete.



  • 6.  RE: Rollforward from DB2 10.5 FP7 to DB2 11.1

    Posted Wed March 31, 2021 12:29 PM

    Hi,

    you are right - uncatalog is the only difference in the decribed procedure and I did.
    I'll try it with uncatalog - maybe that's the solution - interesting ...

    Best regards,

    Gerhard




  • 7.  RE: Rollforward from DB2 10.5 FP7 to DB2 11.1

    Posted Wed March 31, 2021 12:30 PM

    Hi,

    did not work ....

    I get every time SQL5035N.

    SQL5035N  The connection failed because the database product has been updated
    and the database needs to be upgraded  SQLSTATE=55001

    Maybe it works with the new build from yesterday when the download works ....

    Regards,

    Gerhard




  • 8.  RE: Rollforward from DB2 10.5 FP7 to DB2 11.1

    Posted Wed March 31, 2021 12:29 PM

    Hi,

     

    with the new build it works.

     

    Best regards,

    Gerhard




  • 9.  RE: Rollforward from DB2 10.5 FP7 to DB2 11.1

    Posted Wed March 31, 2021 12:30 PM
    Hi, glad to hear. Please feel free to provide any feedback you may have with this feature.

    Thanks.