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

Moving a database containing different schemas

67 views
Skip to first unread message

Moira Camilleri

unread,
Apr 25, 2002, 6:08:43 AM4/25/02
to
Hi there

I'm trying to move a DB2 UDB EE 7.2 database from one NT server to
another. The database has tables created under different schemas. I
tried two options : 1. backing up and restoring and 2. using db2move.

1. Backing up created a whole lot of folders and one file, but upon
restoring it, it's telling me that there's a mismatch and that there
isn't a file for the timestamp I specified. I'm sure I specified the
right timestamp and everything, but I think I'm missing something. Is
this backup and restore facility limited to backing up and restoring
the same database in the same server? I have different aliases for the
source and target database, and I have a funny feeling that it is
affecting the restore. Can anyone give me more information on this?

2. db2move exported my data successfully in a number of ixf files, but
when I'm trying to load in the target, it's telling me that the tables
do not exist. First of all, can I load into an empty database?
Secondly, I have my tables created already but since they're in
different schemas, I think that my db2move command might not be
considering that.

Can anyone give me any advise on what I'm missing or what I should do?

Cheers
Moira Camilleri

Anton Versteeg

unread,
Apr 25, 2002, 7:53:07 AM4/25/02
to
Yes, you can tell db2move to do an import with replace-create.
It will then create the tables.

Moira Camilleri wrote:

--
Anton Versteeg
DB2 Specialist
IBM Netherlands


Dimitry Ioffe

unread,
Apr 25, 2002, 9:48:45 AM4/25/02
to
db2move yourDbName export

db2move yourDbName import - create tab & import


"Moira Camilleri" <mcami...@crimsonwing.com> wrote in message
news:9720292.02042...@posting.google.com...

Gert van der Kooij

unread,
Apr 25, 2002, 1:03:51 PM4/25/02
to
In article <9720292.02042...@posting.google.com>,
mcami...@crimsonwing.com says...

> Hi there
>
> I'm trying to move a DB2 UDB EE 7.2 database from one NT server to
> another. The database has tables created under different schemas. I
> tried two options : 1. backing up and restoring and 2. using db2move.
>
> 1. Backing up created a whole lot of folders and one file, but upon
> restoring it, it's telling me that there's a mismatch and that there
> isn't a file for the timestamp I specified. I'm sure I specified the
> right timestamp and everything, but I think I'm missing something. Is
> this backup and restore facility limited to backing up and restoring
> the same database in the same server? I have different aliases for the
> source and target database, and I have a funny feeling that it is
> affecting the restore. Can anyone give me more information on this?
>

This should work without a problem. A short example:

dbname = ORGDB
New dbname: NEWDB
Create folder on 'old' server: d:\dbbackup

backup command:
db2 backup db orgdb to d:\dbbackup

copy the d:\dbbackup folder to the new server, just
use d:\dbbackup for ease of use

restore command:
db2 restore db ORGDB from d:\dbbackup into NEWDB

Hope this helps

Tony Do

unread,
Apr 25, 2002, 7:19:19 PM4/25/02
to
Is there a way to backup a db2 database from Linux then restore it to NT?


"Gert van der Kooij" <gkooij_no@spam_xs4all.nl> wrote in message
news:MPG.173255678...@news.xs4all.nl...

Gert van der Kooij

unread,
Apr 25, 2002, 8:31:29 PM4/25/02
to
In article <aaa2i1$bjm$1...@spacebar.ucc.usyd.edu.au>, to...@somewhere.com
says...

No, you can't do that, you need to export/import them.

Bob Harbus

unread,
Apr 25, 2002, 8:46:34 PM4/25/02
to
This combination is not supported at this time... sorry.

Bob Harbus

Harald Wilhelm

unread,
Apr 26, 2002, 5:57:01 AM4/26/02
to
Tony,

it's not possible with BACKUP/RESTORE. If your Linux database is still
up and running you can use a combination of DB2LOOK/DB2MOVE to move
this database to NT.


"Tony Do" wrote on 2002-04-26 09:19:19:

TD> Is there a way to backup a db2 database from Linux then restore it to NT?
TD>
TD>
TD>
TD>
TD> "Gert van der Kooij" wrote in message
TD> news:MPG.173255678...@news.xs4all.nl...
TD> > In article ,
TD> > mcami...@crimsonwing.com says...
TD> > > Hi there
TD> > >
TD> > > I'm trying to move a DB2 UDB EE 7.2 database from one NT server to
TD> > > another. The database has tables created under different schemas. I
TD> > > tried two options : 1. backing up and restoring and 2. using db2move.
TD> > >
TD> > > 1. Backing up created a whole lot of folders and one file, but upon
TD> > > restoring it, it's telling me that there's a mismatch and that there
TD> > > isn't a file for the timestamp I specified. I'm sure I specified the
TD> > > right timestamp and everything, but I think I'm missing something. Is
TD> > > this backup and restore facility limited to backing up and restoring
TD> > > the same database in the same server? I have different aliases for the
TD> > > source and target database, and I have a funny feeling that it is
TD> > > affecting the restore. Can anyone give me more information on this?
TD> > >
TD> >
TD> > This should work without a problem. A short example:
TD> >
TD> > dbname = ORGDB
TD> > New dbname: NEWDB
TD> > Create folder on 'old' server: d:\dbbackup
TD> >
TD> > backup command:
TD> > db2 backup db orgdb to d:\dbbackup
TD> >
TD> > copy the d:\dbbackup folder to the new server, just
TD> > use d:\dbbackup for ease of use
TD> >
TD> > restore command:
TD> > db2 restore db ORGDB from d:\dbbackup into NEWDB
TD> >
TD> > Hope this helps

Alexander Kuznetsov

unread,
Apr 26, 2002, 10:19:53 AM4/26/02
to
Moira,
I frequently restore backups with real data on another machine
(LINUX).
Have you tried RESTORE with REDIRECT, redefine tablespace containers,
then RESTORE CONTINUE?
Cheers,
AK
mcami...@crimsonwing.com (Moira Camilleri) wrote in message news:<9720292.02042...@posting.google.com>...
0 new messages