Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2002
    Location
    Germany
    Posts
    9

    Unanswered: create a new database from an old backup

    Hi all

    How can I create a new database on a totally new environment. Has any body any idea or "cookbook" script. thanx in advance.

    cheers
    mehdi

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: create a new database from an old backup

    If both the databases are on the same platform, the answer to your question is YES ...


    If the backup is on Windows then make sure you copy a directory tree rather than just the backup image.

    If the backup image is in C:\DB2\SAMPLE.0\DB2\NODE0000\CATN0000\20020808 , then copy the directory SAMPLE.0 to the target machine, say to C:\backup . Then issue

    db2 restore database sample from C:\backup taken at <timestamp>

    if on unix, copy the backup image to the target machine and use the restore command

    HTH

    Cheers

    Sathyaram

    Originally posted by mehdi shahbazi
    Hi all

    How can I create a new database on a totally new environment. Has any body any idea or "cookbook" script. thanx in advance.

    cheers
    mehdi
    Last edited by sathyaram_s; 10-01-02 at 16:11.

  3. #3
    Join Date
    Sep 2002
    Posts
    30
    Just a reminder, if the backup taken is an online backup, please copy the DB2 transaction logs to the target machine as well. After restore the database backup, execute the rollforward db command to apply the transaction logs to recover the db.

  4. #4
    Join Date
    Dec 2002
    Posts
    4

    2542n

    I ve the same problem...
    i try as you tell... but db2 gives me "not valid timestamp found for db sample"(sql2542n).
    Help

  5. #5
    Join Date
    Dec 2002
    Posts
    4
    dear mehdi, it's simple!

    Machine time: windows 2k server, 1 giga ram, 3 hd raid 5.
    Db2: ibm db2 version 7, no personalization during backup phase, exept for olap(not installed)

    i make a ofline backup usig gui control center.
    then i drop the db2.
    (the machine is the same, so db2 version is the same)
    using the funct "create new db from backup" the only thing that I obtained is sql2542n & no db! Then I use the restore command as you told and as ibm says and there the first problem: db2 uses c:\ or c:\\ sintax??? the response it's the same, 2542n! Peraps it seem to be no disk access! I recorded the entire backup path to a cd. Then i tried to restore the image from cd and i noticed that there's no disk access (I PHISICALLY REMOVED THE CD YUST BEFORE TO CLICK ENTER!!!)!

    It's possible that ibm implemented a so silly backup that refuses to reimport it's image?

    I tried all. Some one tell me to restore the timestamp list by restore cmd on new empty db from the image. no way.
    I tried to check the redirect option on the gui interface to se if it read the tables on image. No way. I got an error. And i'm unable to read nothing...

    I installed db2 on 4 different machine... no way...

    Help Me! I'm more into Microsoft & Cisco. My skill on db2 it's very low!

    Happy new Year!

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    It's a bit strange to hear this ....

    I have personally done it more than once .....

    Can you check whether there is any entry in the db2diag.log file ...

    Cheers

    Sathyaram


    Originally posted by manuelpal
    dear mehdi, it's simple!

    Machine time: windows 2k server, 1 giga ram, 3 hd raid 5.
    Db2: ibm db2 version 7, no personalization during backup phase, exept for olap(not installed)

    i make a ofline backup usig gui control center.
    then i drop the db2.
    (the machine is the same, so db2 version is the same)
    using the funct "create new db from backup" the only thing that I obtained is sql2542n & no db! Then I use the restore command as you told and as ibm says and there the first problem: db2 uses c:\ or c:\\ sintax??? the response it's the same, 2542n! Peraps it seem to be no disk access! I recorded the entire backup path to a cd. Then i tried to restore the image from cd and i noticed that there's no disk access (I PHISICALLY REMOVED THE CD YUST BEFORE TO CLICK ENTER!!!)!

    It's possible that ibm implemented a so silly backup that refuses to reimport it's image?

    I tried all. Some one tell me to restore the timestamp list by restore cmd on new empty db from the image. no way.
    I tried to check the redirect option on the gui interface to se if it read the tables on image. No way. I got an error. And i'm unable to read nothing...

    I installed db2 on 4 different machine... no way...

    Help Me! I'm more into Microsoft & Cisco. My skill on db2 it's very low!

    Happy new Year!

Posting Permissions

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