Data Backup and Recovery

Snap Creator and DB2 Luw

ajankowiak
5,355 Views

Hi,

I've a question regarding Snap Creator (3.5) and DB2 Luw.

We have implemented a DB2 database containing SAP system data.

We have three volumes data (data files) / log (online logs)  / software (db2 instance/software/archive logs, sap binaries).

We snapshot these volumes via Snap Creator DB2 plugin. That works without any problems.

But I have questions regarding the db2 restore case:

If there are problems with the data volume or if I have to restore the database because of logical errors, I do a vol restore for the data volume.

Because the data in the snapshot is consistent (db2 plugin) I could start the database after the date volume restore, but of course I'd like to recover the database

to the latest available log information or point in time.

When I try to rollforward the database is checking the latest log entry in the file  SQLOGCTL.LFH.  But of course this file contains log entries which are too new.

So the rollforward process starts with the wrong archive log file.

I could solve this issue via  single file restore of that file manually from the Soft volume snapshot which has the same timestamp like the data Volume snapshot.

After that I put the database in rollfoward pending mode via db2rfpen on <SID> .  Then I can rollforward the database to the latest log or point in time.

Is this really the correct way?  Are there other recommendations regarding the rollfoward process?


Thanks a lot for your responses.

Best Regards,

Andreas

7 REPLIES 7

oommen
5,355 Views

Andreas,

Please refer TR-3114. Basically once the snap restore is done on the DB2 data volume you would need to run the command below which will put the database into a RF pending state.

db2inidb SID as mirror

Once the above command is done RF the database to a desired PIT

Also make sure your default Database path is under the Data volume, that /db2/SID/db2<SID>

Regards,

Bobby

ajankowiak
5,355 Views

Hi Bobby,

thank you very much for your quick response, I will check  your recommendation.

Maybe a stupid question but how do you achieve to have the default db path /db2/SID/db2<SID> under the data volume?

The data volume is normally mounted to /db2/SID>/sapdata1  right?

Best Regards,

Andreas

oommen
5,355 Views

The data path will be always /db2/SID/db2data1.....but there is a default database path. You can list that by doing this command - db2 list db directory

ajankowiak
5,355 Views

Hi,

thanks for your response.

The database path is /db2/<SID>  for me... this is SAP standard, so not in the data volume.

Do I really need to change this? If yes, why?

Thanks a lot.

Best Regards,

Andreas

oommen
5,355 Views

It doesn't matter that the /db2/<SID> has to be in the data volume. it should be either on its own volume other than db2 binary (instance home, software) and SAP binary. The make the volume as part of the Snap Creator process. I have seen customers having /db2/SID on rootvg, and if that is the case the snap restore wont work. Please make sure you move that to a NetApp volume.

ajankowiak
5,355 Views

Hi,

mhmm not sure if I get you right... so when you restore the database you normally restore the data volume and the volume containing the db directory? Why? because you restore the SQLOGCTL.LFH in the SQL00001 folder?

The db directory is contained in the soft volume which also contains the db2 software... so this is wrong?

BR,

Andreas

oommen
5,355 Views

Andreas,

That is correct.The DB directory has information which gets updated as part of the Snapshot process. You will need to make the /db2/SID/db2<sid> as a filesystem which is part of NetApp volume. You will need to bring the database down for this operation. If you need to talk please do let me know. You can reach me at oommen@netapp.com.

Regards,

Bobby

Public