Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2013
    Posts
    80

    Unanswered: DB2 Online Backup including logs from Production Server and Restore into Dev

    Hi All,
    I testing the db2 backup online including logs option as shown following

    Code:
    db2 "backup database <DBNAME> online to $BKUPDIR compress UTIL_IMPACT_PRIORITY 50 INCLUDE LOGS without prompting"
    
    db2 "archive log for database <DBNAME>"
    Q: As you can see that the backup command is including the logs files, to my understanding the backup should also include the logs, why db2 didn't clear it after the backup ? is that we need to manually clear it ?

    To confirm the db2 restoration possibilities, Is it possible for me to use the online production db backup image to restore to another development database ? If yes, what's the steps ? I have been trying to use db2 restore but not successful, any workaround ?


    Thanks.

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    yes restore is possible. there are cases that this will not work..of course
    as not having any details on source/target/message/commands for restore ...
    there can be many reasons why restore would fail.
    steps for restore and messages are in infocenter at well known location
    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
    Aug 2013
    Posts
    80
    Thanks for reply following is the error I encounter after I issue the restore redirect command.

    Code:
     db2 "restore db <dbname> from /usr/backup taken at 20140520123225 into <dbname> redirect without rolling forward"
    
    SQL2537N  Roll-forward is required following the Restore.

  4. #4
    Join Date
    Aug 2013
    Posts
    80
    Code:
    db2 "restore database <dbname> from /usr/backup taken at 20140520123225  into <DBNAME> redirect without prompting"
    
    SQL1277W  A redirected restore operation is being performed. During a table
    space restore, only table spaces being restored can have their paths
    reconfigured. During a database restore, storage group storage paths and DMS
    table space containers can be reconfigured.
    DB20000I  The RESTORE DATABASE command completed successfully.

    For your information, I am using the create database by stripping to disks following are my create database script for the production and development server

    Code:
    db2 "create database <dbname> on /db2/data1, /db2/data2  dbpath on /db2log using codeset IBM-1252 TERRITORY US COLLATE USING SYSTEM PAGESIZE
    32768"
    How can I SET TABLESPACE after restore redirect ?

    Thanks.

  5. #5
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    You should read the documentation before doing things that can break everything.
    IBM DB2 9.7 for Linux, UNIX and Windows Information Center
    Tke a look at performing a redirected restore using an automatically generated script.
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

Posting Permissions

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