cancel
Showing results for 
Search instead for 
Did you mean: 

Offline or Online Backup after switching off and on the archving mode

Nik3
Explorer
0 Kudos

Hello guys,

I am doing an SAP (on Oracle) upgrade. In the upgrade guide there are two completely different statements about making a backup of the Oracle database during upgrade.

1st statement:

"If you deactivate archiving, you have to make a full backup of the database after the downtime before you switch archiving back on. This must be executed as an offline backup."

2nd statement:

"Backup: Database Was Operated in NOARCHIVELOG Mode

Activate ARCHIVELOG mode again and create a full backup of the database. This must be executed as an offline backup."

Quotes from: "Upgrade GuideSAP ERP 6.0 Including Enhancement Package 4 Support Release 1 ABAPBased on SAP NetWeaver 7.0 Including Enhancement Package"

I understand the fact that the backup has to be offline if you do it before you activate archiving. This is logical.

1) Why does SAP do these two proposals before and after switching on archiving which are completely contrary?

2) Why does the backup has to be offline if you do it after switching on archiving?

May be somebody knows the background for this.

Thanks

Nik

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member524429
Active Contributor
0 Kudos

Continue ....

2nd statement:
"Backup: Database Was Operated in NOARCHIVELOG Mode
Activate ARCHIVELOG mode again and create a full backup of the database. 
This must be executed as an offline backup."
2) Why does the backup has to be offline if you do it after switching on archiving?

Think in reverse, suppose you have enabled Archive log mode today, and the last successful Offline backup is 2 days old before enabling archive log mode. Once you enable archive Log mode the archive log files will be generated at archive log destination which will only record the committed/non-committed transaction logs which are performed after the activation of Arch. log mode.

Suppose sudden media recovery is demanded due to some media failure ,etc..and you have not performed any immediate offline/online backup after enabling Archive log mode. Suppose The media recovery is demanding the part of recovery which was logged in the Online redo log files and was overwritten in NOARCHIVELOG mode. In this case one can not achieve complete or point-in-time DB recovery upto Today?

That's why, after Enabling the Archive log mode, the immediate offline backup is recommended to guarantee the Complete/Point-in-Time recovery by applying generated offline redo log files in future.

Regards,

Bhavik G. Shroff

Nik3
Explorer
0 Kudos

Hi,

thanks a lot for your reply.

Just to get this straight. Directly after enabling archive mode, it would be sufficient to backup up the database online full including all offline redo logs (mode AllOnl+Log) which were generated during online backup, wouldn't it??

Best wishes

Niklas

former_member524429
Active Contributor
0 Kudos

Hi,

Directly after enabling archive mode, it would be sufficient to backup up the database 
online full including all offline redo logs (mode AllOnl+Log) 
which were generated during online backup, wouldn't it??

Yes. It will be sufficient.

AllOnl+Log is known as Consistent Online Backup, which is equivalent to one Offline Backup. Based on this Consistent Online Backup, you can achieve complete & point-in-tme DB recovery upon demand in future.

Regards,

Bhavik G. Shroff

Nik3
Explorer
0 Kudos

Hi,

thanks.

One last question which I have always asked myself. Imagine the following scenario:

1) You do an online backup (AllOnl+Log)

2) You disable archive log mode because you want to start e.g. SGEN or a client copy

3) Error in the database so that you have to recover

Can you recover the database after disabling archive mode with the online backup (point-in-time) you did in 1) before you deactivated archive mode to the state it had under 1)??

Do you understand what I mean?

Best regards

Niklas

former_member524429
Active Contributor
0 Kudos

Hi,

With NOARCHIVELOG mode you can back up the database while it is completely closed after a clean shutdown. So not option of Hot consistent backup with this mode.

With NOARCHIVELOG mode , only Instance recovery is possible. Media Recovery is not possible with NOARCHIVELOG mode. The only media recovery option is to restore the whole database, which causes the loss of all transactions issued since the last backup.

You can re-read the whole things again to get all your answers in my last posts as above.

1) You do an online backup (AllOnl+Log)
2) You disable archive log mode because you want to start e.g. SGEN or a client copy
3) Error in the database so that you have to recover

Before SGEN or Client Copy activity the Backup of affected Database is recommended. Also, I hope you will perform SGEN or Client copy activities in low activity load time. So if any error occurred during this run and the DB is in NOARCHIVELOG mode, then the database can ONLY be completely recovered from instance failure but not from media failure.The only media recovery option will be a restore of last successful backup to get your DB back to the consistent state.

It will be a point in time recovery, because you will loss all transactions between the last successful backup time and the DB crash time.

Please refer SAP Note 863417 - FAQ: Database Archive modes and redo logs and SAP Note 8438 - Activating/deactivating ARCHIVELOG mode to get more info.

Regards,

Bhavik G. Shroff

Nik3
Explorer
0 Kudos

Hi

thanks.

I know these notes. I was only curious if it would work to do a point-in-time recovery if database is in noarchivemode for a short time.

Thanks for your help.

Regards

Niklas

former_member524429
Active Contributor
0 Kudos

Hi,

Two kind of Recovery play an important role in Database Recovery after DB Restore. The Database recovery can be Compete recovery, point-in-time recovery or partial recovery.

Media Recovery (due to media failure/corruption or loss of Data files) can be performed by applying all Offline Redo Log files which are generated from Online Redo-log file in Archive Mode.

Instance Recovery can be done with the help of Online Redo log file and undo table-space to achieve consistent status of Database. In this recovery the committed transactions (which are logged in Online Redo Log files) are roll forward and the uncomplete transactions (which are also logged in Online Redo Log Files) are rolled back into DB using Undo space info.

If you deactivate archiving, you have to make a full backup of the database after
 the downtime before you switch archiving back on. This must be executed as an offline backup.

With Archive log Mode , one can deal with Media Recovery and Instance Recovery. Upon deactivating Archive log mode, the Archive log files will not be generated and the circular logging will take place within the group of online redo log files.

So, after deactivating Archive Log mode, Its recommended to take immediate offline backup to have consistent Backup copy of Database which may be required to deal with demanded media recovery by restoring that immediate latest offline Backup. If the database operates in NOARCHIVELOG mode, the database can ONLY be completely recovered from instance failure but not from media failure. This means that, in case of media failure you will lose all work done after the last valid offline backup. The database can be backed up only while it is completely closed.

Upon media failure after deactivating the Archive log mode (..rare chance, but we can not ignore it...),the complete recovery can not be achieved if the large time gape is there between the last successful offline backup and DB crash because between this time it may be the chance that the Online Redo log files are overwritten so many times in circular manner.

..

..

volker_borowski2
Active Contributor
0 Kudos

Hi,

may be it depends on what postactivities you have AFTER the upgrade.

If i.e.

- you upgrade from a Startrelease that does not allow you to include all types of Support packages, and you like to apply these afterwards.

- you have some big jobs afterwards to do (clientcopies, ADD-On-Installations, ADD-Inn Installations)

- a really big SGEN

which would make perfect sense to be done with archiving beeing kept DEACTIVATED,

then, (in this rare case), it makes sense to do a backup after the upgrade and before these tasks,

and due to archiving being kept disabled, the backup has to be offline.

But in general, I think it would be better to activate archiving first and do a backup (online or offline) after that,

so that there is no gap of archives in between.

Hope this helps

Volker