Results 1 to 2 of 2

Thread: Restore

  1. #1
    Join Date
    May 2012
    Location
    Chennai
    Posts
    45

    Question Unanswered: Restore

    Hi All,

    Please can you assist to me, I have taken online incremental backup and i have restored into another db redirect. Everything was fine and able to connect db but i didn't get tables. Can you tell what is the wrong in my commands. Please find the commands below

    C:\Program Files\IBM\SQLLIB\BIN>db2 connect to test1

    Database Connection Information

    Database server = DB2/NT 9.7.5
    SQL authorization ID = DBUSER
    Local database alias = TEST1


    C:\Program Files\IBM\SQLLIB\BIN>db2 list tables

    Table/View Schema Type Creation time
    ------------------------------- --------------- ----- --------------------------
    T1 DBUSER T 2012-06-13-14.47.51.912003

    1 record(s) selected.


    C:\Program Files\IBM\SQLLIB\BIN>db2 backup db test1 online incremental to c:\DB2\bkup_mydb4 compress

    Backup successful. The timestamp for this backup image is : 20120613174755
    -------------------------------------------------------------------------------------------------------------------------------------------------------------
    --Connect with another db to restore the db into db$1


    C:\PROGRA~1\IBM\SQLLIB\BIN>db2 restore database test1 incremental auto from c:\DB2\bkup_mydb4 taken at 20120613174755 dbpath on C:\DB2\NODE0000 into db$1 redirect generat
    e script c:\db$3.clp
    DB20000I The RESTORE DATABASE command completed successfully.

    C:\PROGRA~1\IBM\SQLLIB\BIN>db2 connect to db$1

    Database Connection Information

    Database server = DB2/NT 9.7.5
    SQL authorization ID = DBUSER
    Local database alias = DB$1


    C:\PROGRA~1\IBM\SQLLIB\BIN>db2 list tables

    Table/View Schema Type Creation time
    ------------------------------- --------------- ----- --------------------------

    0 record(s) selected.
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    --I try to set tablespace container for syscatspace

    C:\PROGRA~1\IBM\SQLLIB\BIN>db2 SET TABLESPACE CONTAINERS FOR 0 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE 'C:\DB2\NODE0000\DB$1\T0000000' 10000)
    SQL20319N The SET TABLESPACE CONTAINERS command is not allowed on an
    automatic storage table space. SQLSTATE=55061

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    You don't show where you have executed the generated restore script. Have you?

Posting Permissions

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