You are on page 1of 12

2017517 SingleHANADatabaseRecoveryProcess|SAPBlogs

Products
Products Industries
Industries Support
Support Training
Training Community
Community Developer
Developer Partner
Partner

About
About


Home / Community / Blogs + Actions

SingleHANADatabaseRecoveryProcess
February24,2015 | 998Views |
M.RAHAMAN
morebythisauthor

SAPHANA

InMemoryTechnology

share
1 share
0 tweet share
0

Follow

I have followed the standard HANA Admin guide and created


below instructions with screenshot which can be helpful for the

https://blogs.sap.com/2015/02/24/singlehanadatabaserecoveryprocess/ 1/12
2017517 SingleHANADatabaseRecoveryProcess|SAPBlogs

first timer.For details information you MUST go through the


StandardHANAAdminGuide.

Afteradatabasefailure,forexampleduetoahardwareerror,youcan
recoveryourdatabaseorrevertittoanearlierstatebyimportingdata
backupsorastoragesnapshotandlogbackups.

YoucanrecoveraSAPHANAsingledatabaseusingadatabackupor
storagesnapshotandlogbackups.Youcanrecoverasystemortenant
databaseinasolutionwithSAPHANAmultitenantdatabasecontainers
usingadatabackupandlogbackupsonly.Therecoveryofatenant
databaseisperformedviatherelevantsystemdatabase.Snapshotsare
notsupportedyet.

Thedocumentationpertainstothetechnicalstepsrequiredtorecovera
SAPHANADBusingHANAStudio.

1.PreTaskbeforeRecovery

1.1LogonGroupCreation

Thisisjustfortestingpurposesothatwecanvalidatetherestore.

TCode:SMLG

LogonGroup:SPACEassigned

2.LicenseKeyandRecovery

SAP HANA license key becomes invalid if the SID or landscape ID is


changed. During recovery, a temporary license key is installed
automaticallyifthebackupusedforrecoveryhadapermanentlicense.

Ifthebackupusedforrecoveryhadonlyatemporarylicense,thesystem
willbelockedimmediatelyafterrecovery.

https://blogs.sap.com/2015/02/24/singlehanadatabaserecoveryprocess/ 2/12
2017517 SingleHANADatabaseRecoveryProcess|SAPBlogs

BecausethenewrecoveredSAPHANAsystemhasanewlandscapeID,the
SAPHANAlicenseforthesourcesystemcannotimmediatelybeappliedto
thenewSAPHANAsystem.

Youcanworkwiththeautomaticallyinstalledtemporarylicenseforupto
90 days. During this time, you need to request a new license key from
SAP,andinstallitinthenewrecoveredSAPHANAsystem.

3.AvailabilityofBackups

Atthebeginningofarecovery,themasternameserverperforms
availabilitychecks.Ifyouareworkingwithfilebasedbackups,andshared
backupstorageisnotbeingused,itisnotpossibletoperformthese
availabilitychecks.Ifrecoveryrelevantdataisnotavailableatthe
beginningoftherecovery,thismightthereforenotbedetecteduntilafter
therecoveryhasstarted.Therecoverycanthenbestarted,butwillfail.To
recoverthedatabase,youneedatleastonedatabackuporatleastone
storagesnapshot.

Atthebeginningofarecovery,allthedataandlogbackupstobeused
mustbeeitheraccessibleinthefilesystemoravailablethroughthethird
partybackuptool.

Ifyouarerecoveringthedatabasefromastoragesnapshot,thestorage
snapshotmustbeavailableinthedataarea.

LogintoDBhostandchecktheavailability.

4.DeterminingandCheckingBackupsfor
Recovery(hdbbackupdiagTool)

By calling hdbbackupdiag with the check option, you can verify if the
available backups are suitable for recovering the HANA database at a
particulartime.Thebackupsusedmaybepresentinanydirectoryinthe
filesystemorinanexternalbackuptool.

https://blogs.sap.com/2015/02/24/singlehanadatabaserecoveryprocess/ 3/12
2017517 SingleHANADatabaseRecoveryProcess|SAPBlogs

Thehdbbackupdiagtooldetermineswhichbackupsarerequiredtocomply
with the required point in time and checks whether these backups are
availableandaccessible.Itthenexecutesthefollowingchecks:

Forbackupsthatwerewrittentothefilesystem:

thefileiscontainedinthefilesystemeitheratthelocationtowhichit
waswrittenoratalocationspecifiedbyasearchpath

thecurrentoperatingsystemuserhasreadauthorizationforthefile

thefileislargeenoughtoaccommodatetheusableloadstoredatthe
startofthefile

thefilesbackupIDcorrespondstothebackupIDspecifiedinthebackup
catalog

hdbbackupdiagcheckfd/mnt/resource/logbackup/
d<directory>:Specifythedirectoryinwhichyouaresearchingforthe
backupcatalog.Ifthisoptionisnotavailable,asearchiscarriedoutforthe
latestversionofthebackupcataloginthecurrentdirectoryand,if
necessary,inthedirectoriesspecifiedwithlogDirsandintheexternal

Thehdbbackupdiagtooldoesnotcheckthecontentofthebackupsfor
consistency.Tocheckindividualbackupsforconsistency,youcanusethe
programhdbbackupcheck(seeSAPNote1869119).

hdbbackupcheckv
/mnt/resource/backup/<SID>_bkp_XXXXX/COMPLETE_DATA_BACKUP_da
tabackup_0_1

hdbbackupcheckv
/mnt/resource/backup/<SID>_bkp_XXXXX/COMPLETE_DATA_BACKUP_da
tabackup_1_1

hdbbackupcheckv
/mnt/resource/backup/<SID>_bkp_XXXXX/COMPLETE_DATA_BACKUP_da

https://blogs.sap.com/2015/02/24/singlehanadatabaserecoveryprocess/ 4/12
2017517 SingleHANADatabaseRecoveryProcess|SAPBlogs

tabackup_2_1

hdbbackupcheckv
/mnt/resource/backup/<SID>_bkp_XXXXX/COMPLETE_DATA_BACKUP_da
tabackup_3_1

hdbbackupcheckv
/mnt/resource/backup/<SID>_bkp_XXXXX/COMPLETE_DATA_BACKUP_da
tabackup_4_1

4.1BackUpCatalog

ThebackupcatalogisstoredintheSAPHANAdatabaseandispartofthe
log backups. This allows access to the backup catalog during recovery.
Even in situations such as when log mode overwrite is set, where logs
backupsarenotwritten,thebackupcatalogisstillbackedup.Thebackup
catalog is backed up and versioned after every completed backup
operation.Ifthebackupcatalogissavedusingathirdpartybackuptool,
theversioningofthebackupcatalogishandledbythebackuptool.

SAPNote1812980providesmoreinformationaboutthebackupcatalog.

5.RecovertheDatabase(SAPHANA
Studio)

To recover an SAP HANA single database or SAP HANA multitenant


database containers, you are strongly advised to use SAP HANA studio.
YoucanalsorecoverthemusingSQLstatements,however.

A.SAP HANA single databases:You can recover SAP HANA single


databases, and the system database or a tenant database of SAP
HANAmultitenantdatabasecontainers.SAPHANAsingledatabases
canberestoredusingcompletedatabackupsorsnapshots,andlog
backups,withseveralrecoveryoptions.

https://blogs.sap.com/2015/02/24/singlehanadatabaserecoveryprocess/ 5/12
2017517 SingleHANADatabaseRecoveryProcess|SAPBlogs

WithSAPHANAsingledatabases,SQLstatementsforrecoverycannotbe
executed using the normal SQL clients such as HDBSQL, and cannot be
executedwhenthedatabaseisonline.TherecoverSys.pyscriptistherefore
used to pass SQL statements to SAP HANA single databases. The SAP
HANAsingledatabasemustbeofflineforrecoveryusingSQLstatements.

Before starting a recovery or system copy, bear the following in


mind:

Youcannotpauseandresumeadatabaserecoveryorsystemcopy.

Youcancanceltheprocesswhileitisrunning.However,cancelinga
recoveryorsystemcopymakesthedatabasestateinconsistent.SAP
HANApreventsaninconsistentdatabasefrombeingstarted.Tobe
abletoworkwiththedatabaseagain,youwouldneedtoperform
therecoveryorsystemcopyagain.

Ifanerroroccursduringtherecoveryorsystemcopyprocess,youhaveto
repeattheentireprocess.

I.InSAPHANAstudio,opentheSystemsview.ForaSAPHANAsingle
database, rightclick over the system to be recovered, and choose
BackupandRecovery>RecoverSystem.

ProvidePassword:#######

https://blogs.sap.com/2015/02/24/singlehanadatabaserecoveryprocess/ 6/12
2017517 SingleHANADatabaseRecoveryProcess|SAPBlogs

ClickOK.

RuninBackground.

Dependingontherecoverytypespecified,providetherequired
information:

ChoosetheappropriateRadioButton.

Option Description

Recoverthedatabasetoitsmost Thesystemlistsalltherelevantdata

https://blogs.sap.com/2015/02/24/singlehanadatabaserecoveryprocess/ 7/12
2017517 SingleHANADatabaseRecoveryProcess|SAPBlogs

recentstate/Recoverthedatabaseto backupsandstoragesnapshots.
thefollowingpointintime Specifythelocationofthelog
backupsiftheyarenotinthedefault
location.

Recoverthedatabasetoaspecific Selectthedestinationtype(File,
databackuporstoragesnapshot Backint,orstoragesnapshot)

Youcanselectabackuporstoragesnapshotfromthebackupcatalogor
specify the location of a backup or storage snapshot without using the
backupcatalog.

To make sure that the selected item is at the specified location, choose
Check Availability. If the system indicates that the data backup is not
availableattheselectedlocation,andyouknowthatithasbeenmoved,
youcanspecifyanalternativelocationtobechecked.

https://blogs.sap.com/2015/02/24/singlehanadatabaserecoveryprocess/ 8/12
2017517 SingleHANADatabaseRecoveryProcess|SAPBlogs

https://blogs.sap.com/2015/02/24/singlehanadatabaserecoveryprocess/ 9/12
2017517 SingleHANADatabaseRecoveryProcess|SAPBlogs

TheprogressoftherecoveryforeachSAPHANAserviceisdisplayedinthe
dialogbox.Whentherecoveryiscomplete,amessageconfirmsthisand
showsthetimestampwhentherecoverywascompleted.

TheSAPHANAdatabaseisonline.

6.CustomerSpecificConfigurationFiles

TheSAPHANAdefaultdatabaseconfigurationfilesareinstalledduring
databaseinstallation.Posteriorchangestodatabaseparametersarestored
incustomerspecificconfigurationfiles.Theirvaluesoverrulethevaluesin
thedefaultdatabaseconfigurationfiles.
https://blogs.sap.com/2015/02/24/singlehanadatabaserecoveryprocess/ 10/12
2017517 SingleHANADatabaseRecoveryProcess|SAPBlogs

Hostspecificsettingsoverridedatabasespecificsettings,whichoverride
system/globalsettings,whichoverridethedefaultsettings.

Rangeof Path
Validity

Global $DIR_INSTANCE/../SYS/global/hdb/custom/config
configuration
settings

Database $DIR_INSTANCE/../SYS/global/hdb/custom/config/<database_name>
specific
configuration
settings

(validfor
SAPHANA
multitenant
database
containers
only)

Hostspecific $SAP_RETRIEVAL_PATH
configuration
settings

Copyallofthemtothecorrectlocationfromthebackup.

7.VerificationofsuccessfulRestore

LogintoSAP

7.1VerifyLogonGroup

TCode:SMLG

A.SPACEhasgonewhichwecreatedbeforerestore.

https://blogs.sap.com/2015/02/24/singlehanadatabaserecoveryprocess/ 11/12
2017517 SingleHANADatabaseRecoveryProcess|SAPBlogs

AlertModerator

1Comment
YoumustbeLoggedontocommentorreplytoapost.

DenysvanKempen

June15,2015at12:04pm

Hi,
Forthoseinterestedinthetopic,thereisafullplaylistonBackupandRecovery
ontheSAPHANAAcademy
BackupandRecoveryYouTube
Regards,
Denys

Share&Follow
Privacy TermsofUse LegalDisclosure Copyright Trademark Sitemap Newsletter

https://blogs.sap.com/2015/02/24/singlehanadatabaserecoveryprocess/ 12/12

You might also like