Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DB2 restore problem

824 views
Skip to first unread message

Fusheng Wang

unread,
Apr 8, 2003, 1:57:55 AM4/8/03
to
I backup a database from one machine with DB2 V7.2 and record it into a CD,
and I want to restore the database
to another DB2 server V8.1.

But when I restore it as follows:
RESTORE DATABASE MYDB FROM "D:\DB2\backup\" TAKEN AT 20030118145408 WITH 1
BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING;

It generates an error:
SQL2542N No match for a database image file was found based on
the source database alias "XMLDB" and timestamp
"20030118145408" provided.

However, the database name and timestamp are correct.

Can anybody show what the right way to move database around different
machines by backuping and restoring? Thanks a lot!


Fusheng

Fred Nurk

unread,
Apr 8, 2003, 6:24:16 AM4/8/03
to
Try doing a "db2ckbkp -H <image>" this will give you the correct path and
the timestamp for the backup image.

Once you have the correct path copy the image there, and try the restore
again.

Cheers

"Fusheng Wang" <wan...@cs.ucla.edu> wrote in message
news:b6tocu$h5q$1...@gladiola.noc.ucla.edu...

Fusheng Wang

unread,
Apr 8, 2003, 3:50:43 PM4/8/03
to
Thanks Fred. I followed your steps:

"db2ckbkp -H
D:\DB2\backup\XMLDB.0\DB2\NODE0000\CATN0000\20030118\135359.001"
and it returns as attached. Then I run:
"db2 RESTORE DATABASE XMLDB FROM D:\DB2\backup\XMLDB.0\ TAKEN AT
20030118135359 WITH 1 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING"

However, I got the same problem as before:


SQL2542N No match for a database image file was found based on the source

database alias "XMLDB" and timestamp "20030118135359" provided.

Can you let me know if there is any other option to restore instead of
specifying the taking time?

Fusheng


=====================
MEDIA HEADER REACHED:
=====================
Server Database Name -- XMLDB
Server Database Alias -- XMLDB
Client Database Alias -- XMLDB
Timestamp -- 20030118135359
Database Partition Number -- 0
Instance -- DB2
Sequence Number -- 1
Release ID -- 900
Database Seed -- 3DB0DA62
DB Comment's Codepage (Volume) -- 0
DB Comment (Volume) --
DB Comment's Codepage (System) -- 0
DB Comment (System) --
Authentication Value -- 255
Backup Mode -- 0
Backup Type -- 0
Backup Gran. -- 0
Status Flags -- 1
System Cats inc -- 1
Catalog Partition Number -- 0
DB Codeset -- IBM-1252
DB Territory --
Backup Buffer Size -- 4194304
Number of Sessions -- 1
Platform -- 5

The proper image path would be:
XMLDB.0\DB2\NODE0000\CATN0000\20030118\135359.001


"Fred Nurk" <frn...@yahoo.com.au> wrote in message
news:3e9293a8$0$26919$afc3...@news.optusnet.com.au...

Gert van der Kooij

unread,
Apr 8, 2003, 5:01:16 PM4/8/03
to
In article <b6v96f$f81$1...@gladiola.noc.ucla.edu>, wan...@cs.ucla.edu
says...

> Thanks Fred. I followed your steps:
>
> "db2ckbkp -H
> D:\DB2\backup\XMLDB.0\DB2\NODE0000\CATN0000\20030118\135359.001"
> and it returns as attached. Then I run:
> "db2 RESTORE DATABASE XMLDB FROM D:\DB2\backup\XMLDB.0\ TAKEN AT
> 20030118135359 WITH 1 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING"
>

Use 'from d:\db2\backup', XMLDB.0 belongs to the backup directory
structure.

Ian D. Bjorhovde

unread,
Apr 8, 2003, 5:17:16 PM4/8/03
to
Fusheng Wang wrote:
> Thanks Fred. I followed your steps:
>
> "db2ckbkp -H
> D:\DB2\backup\XMLDB.0\DB2\NODE0000\CATN0000\20030118\135359.001"
> and it returns as attached. Then I run:
> "db2 RESTORE DATABASE XMLDB FROM D:\DB2\backup\XMLDB.0\ TAKEN AT
> 20030118135359 WITH 1 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING"

Is D: the CD-Rom? I'm not sure, but I don't think that you can
restore from read-only media. You'd need to copy the directory
structure back to disk first.


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----

Fusheng Wang

unread,
Apr 8, 2003, 6:32:13 PM4/8/03
to
Yes, that made progress. However, a new error is generated:

db2 RESTORE DATABASE XMLDB FROM D:\DB2\backup\ TAKEN AT 20030118135359 WITH


1 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING

SQL0298N Bad container path. SQLSTATE=428B2

Will the new database use the existing tablespace or create a new one? How
to solve it? Thanks!

Fusheng

"Gert van der Kooij" <gk-ib...@xs4all.nl> wrote in message
news:MPG.18fd5707e...@news.xs4all.nl...

Erik Hendrix

unread,
Apr 8, 2003, 6:42:44 PM4/8/03
to
Fusheng,

Are the paths for your database identical to the source? If not then you
will have to do a redirect restore.


"Fusheng Wang" <wan...@cs.ucla.edu> wrote in message

news:b6vil8$m4p$1...@gladiola.noc.ucla.edu...

Dirk Lerner

unread,
Apr 9, 2003, 5:48:44 AM4/9/03
to
Hi all,

> Is D: the CD-Rom? I'm not sure, but I don't think that you can
> restore from read-only media. You'd need to copy the directory
> structure back to disk first.

Yes, I had the same pronlem too. Just copy your backup to disk and
make the file rewritable. And everything will work :-)
If it is readonly, it won't work. Don't know why, but that's the way
it works.

Dirk

0 new messages