Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Join Date
    Jul 2004
    Posts
    6

    Exclamation Unanswered: restore a backup

    I have a problem

    I have a full backup (done with control center) and a new server.
    Im trying to restore the backup but I cant. I use the control center to restor but it give me errors about timestamp and the database alias.
    Ive checked and the timestamp is correct.

    Can Anyone help me?

    What are the correct steps?

    I only have the backup

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

  3. #3
    Join Date
    Jul 2004
    Posts
    6

    sorry

    sorry it was so urgent that I forgot to put info

    Its a clean install
    Windows 2000 advance server
    DB2 8.1 Express

    I have a full backup done with control center

    Archivo:
    165744.001

    Directorio:
    D:\Backup\pepe.0\DB2\NODE0000\CATN0000\20041112

    commands::

    RESTORE DATABASE pepe FROM "D:\Backup\pepe.0\DB2\NODE0000\CATN0000\200411 12\" TAKEN AT 20041112165744 TO "D:" INTO pepe2 NEWLOGPATH "D:\DB2\" WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING;




    error

    SQL2542N No match for a database image file was found based on
    the source database alias "pepe" and timestamp
    "20041112165744" provided.

    Explanation:

    The backup image file filename consists of a database alias and a
    timestamp component. A filename is constructed from the source
    database alias and timestamp parameters provided in the Database
    Restore call. No filename existed in the source directory that
    matched based on the source database alias and timestamp
    provided. If this error was received from an automatic
    incremental restore then a required image was not found based on
    the timestamp and location in the database history.

    User Response:

    Ensure that the database backup image resides on the media
    source. Resubmit the operation by specifying a correct timestamp
    to result in a match.

    If this error was received from an automatic incremental restore,
    check the database history for the corresponding backup entry
    and verify that the location listed matches the actual location
    of the backup image. Either update the database history and
    retry the operation to result in a match or issue a RESTORE
    INCREMENTAL ABORT command to cleanup any resources that may have
    been created during processing.

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Try this:
    Code:
    RESTORE DATABASE pepe FROM "D:\Backup\" TAKEN AT ...

  5. #5
    Join Date
    Jul 2004
    Posts
    6
    Quote Originally Posted by n_i
    Try this:
    Code:
    RESTORE DATABASE pepe FROM "D:\Backup\" TAKEN AT ...

    ????
    Ive done that

    that is the command that i wrote

  6. #6
    Join Date
    Jul 2004
    Posts
    6
    thanks it worked
    my life is save now

  7. #7
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665
    Quote Originally Posted by npierri
    thanks it worked
    my life is save now

    Can anyone post the corrected code as an example. I have been fighting a very similar problem all day and cant seem to find a working example
    ------------
    And back to SQL Server....I always find my way home
    View my Linkedin profile

  8. #8
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by JDionne
    Can anyone post the corrected code as an example. I have been fighting a very similar problem all day and cant seem to find a working example
    The trick is to use the correct (shortened) directory path in Windows. Look carefully at the path statements in the backup and restore above to figure it out.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  9. #9
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665
    what if i move the file to f:\backup ?
    my code
    db2 restore database NAMTEST from f:\backup taken at 20051028165340 to FB2TEST into NAMTEST Redirect
    ------------
    And back to SQL Server....I always find my way home
    View my Linkedin profile

  10. #10
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Quote Originally Posted by JDionne
    what if i move the file to f:\backup ?
    my code
    db2 restore database NAMTEST from f:\backup taken at 20051028165340 to FB2TEST into NAMTEST Redirect
    DB2 on Windows needs the full path structure to be in place, but only wants the top level directory in the command.

    It won't work any other way.
    --
    Jonathan Petruk
    DB2 Database Consultant

  11. #11
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665
    so I need on the server
    f:\namdwh.0\db2test\node0000\catn0000\
    but i only put f:\namdwh.0?
    ------------
    And back to SQL Server....I always find my way home
    View my Linkedin profile

  12. #12
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Quote Originally Posted by JDionne
    so I need on the server
    f:\namdwh.0\db2test\node0000\catn0000\
    but i only put f:\namdwh.0?
    You'd actually only put f:\ in that case.

    Although I expect you'd want a sub directory, ie. f:\backup or something like that.

    ie. f:\backup\namdwh.0\db2test\node0000\catn0000\

    and supply f:\backup to the command.
    --
    Jonathan Petruk
    DB2 Database Consultant

  13. #13
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665
    my code:


    D:\Program Files\IBM\SQLLIB\BIN>db2 restore database NAMTEST user db2admin using 29DmJj13 from f:\NAMDWH.0 taken at 20051028165340 to f:\DB2TEST into NAMTEST redirect

    my error:
    SQL2542N No match for a database image file was found based on the source
    database alias "NAMTEST" and timestamp "20051028165340" provided.

    I have moved the backup file under its native file directory of F:\NAMDWH.0\DB2TEST\NODE0000\CATN0000\20051028

    The file name is 165340.001

    I realy dont know what I am doing wrong. It has to be something simple...
    ------------
    And back to SQL Server....I always find my way home
    View my Linkedin profile

  14. #14
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Read my last post again...

    FROM f:\NAMDWH.0 won't work.

    from f:\ should.
    --
    Jonathan Petruk
    DB2 Database Consultant

  15. #15
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665
    I have to be overlooking something because by changing my code to "From f:\" I recieved the same error.

    Is this case sensitive? Is there a way to validate my backup image?
    ------------
    And back to SQL Server....I always find my way home
    View my Linkedin profile

Posting Permissions

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