cancel
Showing results for 
Search instead for 
Did you mean: 

Issue after DB2 RESTORE

Former Member
0 Kudos

Hi,

We have successfully restored production database to Sandbox ECC system.

I have executed the following command like that :-

db2 -tvf prodtest.clp
UPDATE COMMAND OPTIONS USING S ON Z ON PR1_NODE0000.out V ON
DB20000I  The UPDATE COMMAND OPTIONS command completed successfully.

SET CLIENT ATTACH_DBPARTITIONNUM  0
DB20000I  The SET CLIENT command completed successfully.

SET CLIENT CONNECT_DBPARTITIONNUM 0
DB20000I  The SET CLIENT command completed successfully.

RESTORE DATABASE PE1 FROM '/sapbackup/sapbackup/PE1' TAKEN AT 20130610221844 ON
'/db2/SN1/sapdata1' ,  '/db2/SN1/sapdata2' ,  '/db2/SN1/sapdata3' ,  '/db2/SN1/s
apdata4' DBPATH ON '/db2/SN1' INTO SN1 NEWLOGPATH '/db2/SN1/log_dir/NODE0000/' R
EPLACE HISTORY FILE REPLACE EXISTING REDIRECT WITHOUT ROLLING FORWARD
SQL2528W  Warning!  Restoring to an existing database that is the same as the
backup image database, but the alias name "SN1" of the existing database does
not match the alias "PR1" of backup image, and the database name "SN1" of the
existing database does not match the database name "PR1" of the backup image.
The target database will be overwritten by the backup version.
SQL1277W  A redirected restore operation is being performed.  Table space
configuration can now be viewed and table spaces that do not use automatic
storage can have their containers reconfigured.
DB20000I  The RESTORE DATABASE command completed successfully.

But in last line we got an error message like

The restore process has completed successfully, but one or more table spaces from the backup were not restored.

Kindly Help.

Regards,

Soumya Biswas

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member188883
Active Contributor
0 Kudos

Hi Soumya,

Execute the below commands on source as well as target system to compare the list of tablespaces

db2=> connect to <MYDB>

db2=> list tablespaces show detail

From this comparison you will know which tablespaces are missing in target.

Reasons for missing tablespace could be from the link below

http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.db2.luw.messages.sql.doc%2F...

Hope this helps.

Regards,

Deepak Kori

Former Member
0 Kudos

Hi Deepak,

If i would ignore the message and continue accordingly; at the final stage when R3trans option would come i do not get response like 0000.

R3trans -d  gives output like R3trans finished <0012>.

Regards,

Soumya

Manas_Vincit
Active Participant
0 Kudos

Hi Soumya,

Please check what are state of Tablespace state ? Is it Normal or some Pending Status .

If all the tablespaces are in Normal state , You can proceed forward , otherwise according to status you have to take action .

As your restore command is showing 'without rollforward ' , that may be reason for this error . But again you need to check all tablespace state in Database .

Thanks

Manas

Former Member
0 Kudos

Hi manas,

Whene I am going through db2 => connect to sn1 ... I got the following error.

SQL1116N  A connection to or activation of database "SN1" cannot be made

because of BACKUP PENDING.  SQLSTATE=57019

Regards,

Soumya

Manas_Vincit
Active Participant
0 Kudos

Hi Soumya,

After restore , you need to rollforward Database . You can check status of Database by below command

db2 rollforward database $DB2DBDFT query status

If database is already restored , your DB is saying backup pending . You need to take backup of database to bring out backup pending status .

You can use below command to bring database out of backup pending status .

db2dart <SID> /chst /what dbbp off

where <SID> will be database name 

once done try to activate database

Please let me know if this helps or you get another issue ?

Thanks

Manas

Former Member
0 Kudos

Hi Manas,

Thanks for giving the command, database has started. But the moment when i tried to start sap, DB failed to start.

sn1tipl:sn1adm 21> startsap
Checking db6 Database
Database is not available via R3trans
-------------------------------------------
07/04/2013 21:00:12     0   0   SQL1026N  The database manager is already active.
SQL1026N  The database manager is already active.
Activate database failed
R3trans connect failed
DB startup failed

please send the tracefile /home/sn1adm/startsap.trc to support

Regards,

Soumya Biswas

former_member188883
Active Contributor
0 Kudos

Hi Soumya,

Please stop sap as as well as database

Ensure that you select db2 stop applications all command to stop database.

Start the database once again.

Check db2 connect to <dbsid>

If it works . Then share the configuration details from

db2 get db cfg from <dbsid>

Hope this helps.

Regards,

Deepak Kori

Former Member
0 Kudos


sn1tipl:db2sn1 25> db2 rollforward database $DB2DBDFT

                                 Rollforward Status

Input database alias                   = SN1
Number of nodes have returned status   = 1

Node number                            = 0
Rollforward status                     = DB  pending
Next log file to be read               = S0002757.LOG
Log files processed                    =  -
Last committed transaction             = 2013-06-29-19.21.12.000000 UTC

se1tipl:db2sn1 26> DB2
DB2: Command not found.
se1tipl:db2sn1 27> db2
(c) Copyright IBM Corporation 1993,2007
Command Line Processor for DB2 Client 9.7.4

Regards,

Soumya Biswas

Manas_Vincit
Active Participant
0 Kudos

Hi Soumya,

You need to rollforward database for bring it in activate status .
You can do it by following  command , hope backup timing is 2013-06-29-19.21.12.000000 UTC

i) db2 rollforward db SN1 to 2013-06-29-19.21.13.000000

you can check rollforward status by command

db2 list utilities show detail

once this command will finish , it will bring DB in DB working status , you can check this by command

db2 rollforward database SN1 query status

and final command which will bring database in not pending status ( Hope no logs to apply )

ii) db2 rollforward db SN1 complete

then again check datbaase status by

db2 rollforward database SN1 query status

you can check rollforward status by command

db2 list utilities show detail

and finally activate database and start SAP.

Thanks

MAnas Behra

Former Member
0 Kudos

Dear Mr. Soumya Biswas,

I had received same kind of error in my past restoration. After findings & having discussion to our senior DBA, we had neglected the warning. Till date we didn't face any specific issue.

May be with sandbox system, you can go ahead & start further testing.

Kind rgds,

Ashwiin Mane