Shi, Zhong,
     UDB will create the database for you if it does not exist.  If
database doesnt exist and if you are restoring from an offline backup, you
will need to include "newlogpath" as well as "without rolling forward" on
your restore command. If the tablespace container info is different from
the source database, then within the restore script you will need to run
"set  tablespace containers".  This has to be in the same clp session as
the restore command (see Command Ref. guide under redirect).

db2 "restore database COMPDB From /db2back/inst04 into COMP newlogpath
/db2/XXXnXXXdXXXlog REPLACE
EXISTING redirect without rolling forward"

Hope this helps!

Trupti.





"Pierre Saint-Jacques" <[EMAIL PROTECTED]>@lists1.ba.best.com on
07/19/2001 03:36:06 PM

Please respond to [EMAIL PROTECTED]

Sent by:  [EMAIL PROTECTED]


To:   [EMAIL PROTECTED]
cc:
Subject:  Re: DB2EUG: How to restore a database to a different instance in
      differentma chine in AIX


I think for this one you may have to do a bit of work.
1) On the target system, create the db with minimum options.
            db2 "create db COMPDB on <path>"
2) Issue your command:
            db2 "restore database COMPDB From /db2back/inst04 into COMP
REPLACE
EXISTING redirect"

I think this should work.
You can then refefine any or all containers for any or all tablespaces,
inclyding syscatspace.
Also, if you come from a disk image, make sure you have access to the exact
<path> where the image is stored.

I presume here that </db2back/inst > is the actual path.  Remeber that the
backup command expands that path in the actual backup.

HTH,   Pierre.

"Shi, Zhong" wrote:

> Hi, List,
>
> I try to restore a database backup to a new database in a different
instance
> in different machine in AIX. Look at the command reference I know I need
3
> steps to make it happen (we can not use Control Center to do it due to
> security setup). The original database is called COMPDB and is in
instance
> inst04. the new database will be call the same name but will be in inst07
in
> other machine. I have never passed the first step of the three of
redirect
> restore. after enter
>
> > db2 "restore database COMPDB redirect"
> or
> > db2 "restore database COMPDB From /db2back/inst04 into COMP redirect"
>
> I did not get a prompt back. So I can't perform the second step.
>
> Please give me some advise and the command in each steps to accomplish
the
> task.
>
> Thank you.
>
> zhong
>
> =====
> To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
> For other info (and scripts), see
http://people.mn.mediaone.net/scottrmcleod

(See attached file: sescons.vcf)

sescons.vcf

Reply via email to