Results 1 to 4 of 4

Thread: db restore

  1. #1
    Join Date
    Apr 2007
    Posts
    26

    Unanswered: db restore

    I have tried to restore a database but my efforts are fruitless this far please assist. The command am using is as follows: "Restore database sample from C:\Backup\Sample.0\ into myDb without prompting". When i run this command when there I have no other databases it runs successfully but in the case where there are other databases in existence, it does not run successfully.What am i missing?

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    DB2 can only have 1 database at a particular path location. Since you are not specifying a path to restore the DB to, it will use the default path (dftdbpath) config parameter. One of your existing DB is located there.

    Andy

  3. #3
    Join Date
    Jun 2006
    Posts
    471
    and the syntax should also be :
    ... from c:\backup
    the \sample.0 is the name of the source db and is specified in the restore command .. restore db sample ....
    the error when restoring ????
    maybe try restore db sample from c:\backup into newdbname ....
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    They will also probably need a redirected restore, but I was just trying to inform them why it works without any DBs, but fails when some exist.

    Andy

Posting Permissions

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