cancel
Showing results for 
Search instead for 
Did you mean: 

Perform Redirect Restore

01-18-2013 10:46 AM
krishan_yadav2 Participant
5457 views 23 comments
0 Likes
SAP Managed Tags
Subscribe

Hi,

I want to restore my production backup(DB-name:ECP  &  Instance:30)  on a test machine on which an SAP server already running (DB-name: ECQ  & Instance: 20)

Both the system are running ECC 6 EHP5 on AIX6.1 and DB2 9.7

I tried to perform redirect restore with following steps:

1) Take offline backup of ECP

2) Generated restore redirect script on source (ECP)

db2 RESTORE db ECP from /db2/backup taken at 20130113150420 REDIRECT GENERATE SCRIPT /db2/backup/ECPrestore.clp

PFA the script.

3) Copied offline backup of ECP and the generated script file on test server.

4) Edited the script file by replacing ECP(source db) with ECQ(target db) and run the script:

db2 -tvf /db2/backup/ECPrestore.clp

Please note that I was unable to start with original script file(even after changing DB names). Therefore made changes and finally executed folllowing script(ECPrestore2.clp):

RESTORE DATABASE ECP

FROM '/db2/backup'

TAKEN AT 20130113150420

ON '/db2/ECQ/sapdata1'

,  '/db2/ECQ/sapdata2'

,  '/db2/ECQ/sapdata3'

,  '/db2/ECQ/sapdata4'

-- DBPATH ON '/db2/ECQ'

INTO ECQ

--NEWLOGPATH '/db2/ECP/log_dir/NODE0000'

WITH 1 BUFFERS

BUFFER 1024

REPLACE HISTORY FILE

REPLACE EXISTING

REDIRECT

PARALLELISM 1

WITHOUT ROLLING FORWARD

WITHOUT PROMPTING

;

Hereafter I got following message:

Now I am unable to proceed further. I tried to run:

db2 restore db ECP continue

But it gave me following error.

While surfing I came to know that we tablespace containers has to be set. But as depicted in my original script file all my tablespace (in source DB) are configured with automatic storage, so not required to set them again.

But still I tried testing to set one of the tablespace, which is giving me following error:

Also my cfg parameter show Restore in pending state:

Please suggest me how to complete my restore activity.

Regards,

Krishan

0 Likes
View Entire Topic
krishan_yadav2
Participant
0 Likes

Hi,

Above message missed the error screens.

Hereafter I got following message:

Now I am unable to proceed further. I tried to run:

db2 restore db ECP continue

But it gave me following error.

Then I tried to run set tablespace.

Former Member
0 Likes

Hi,

1. you have to submit the "db2 restore db ECP continue" command in the same session where you have started the redirected restore (where you have submitted db2 -tvf /db2/backup/ECPrestore2.clp)

2. maybe it is just a typo, but in the script of your first posting you have

--NEWLOGPATH '/db2/ECP/log_dir/NODE0000'

this should be the path to the log files of ECQ. ==> --NEWLOGPATH '/db2/ECQ/log_dir/NODE0000'

Regards,

Roland

krishan_yadav2
Participant
0 Likes

Hi Roland,

Thanx for instant reply.

1. M using putty and unfortunately lost connection in which I executed the script.

Now I have started new putty session and tried running this command but its gives following message:

3CECQAS:db2ecq 13> db2 restore db ECP continue

DB21080E  No previous RESTORE DATABASE command with REDIRECT option was issued

for this database alias, or the information about that command is lost.

2.  Sorry for the typo, agreed that it should be:

--NEWLOGPATH '/db2/ECQ/log_dir/NODE000

But I think this command is commented and its not executed when I run the script.

(I deliberately commented this because I was getting an error for this command, so i commented it. And the script successfully executed with following message.

)

Please suggest.

Regards,

Krishan

Former Member
0 Likes

from ibm db2 documentation:

Restart the whole redirected restore process by issuing the RESTORE DATABASE ... REDIRECT command and SET TABLESPACE CONTAINERS commands again. Then issue the RESTORE DATABASE ... CONTINUE command.

regards,

Roland