cancel
Showing results for 
Search instead for 
Did you mean: 

HANA Recovery Error

Former Member
0 Kudos

We are trying to perform time in recovery and have copied data/log files from the source system. However , the script hdbbackupdiag produced error for DATA files i.e file not found reason being  as a part of our backup strategy we are renaming the prefix of  DATA files ( using script) .

hdbbackupdiag --check --logDirs <path to log directory> --dataDir < path to data directory> -f -u "year:month:date time"

found backup catalog xxxxxxxxxxxxxxxxx from file /hana/xxxxx/xxx/log_backup_0_0_0_0.xxxxxxxxxxxxxxxx

using backup catalog xxxxxxxxxxxxxxxx from file /hana/xxx/xxx/log_backup_0_0_0_0.xxxxxxxxxxxxx

ERROR: [111119] file '/xxx/xxx/SID_Backup_XXXX/COMPLETE_DATA_BACKUP_databackup_0_1' not found

ERROR: Backup '/xxx/xxx/SID_Backup_XXXX/COMPLETE_DATA_BACKUP_databackup_0_1' check failed.

ERROR: [111119] file '/xxx/xxx/SID_Backup_XXXX//COMPLETE_DATA_BACKUP_databackup_1_1' not found

Therefore, we restored the DATA file with option " Specify backup without catalog" however , when I am trying to perform point in time recovery the above script is giving me below error for CLEAR LOG.

Any idea Why ?

found backup catalog xxxxxxxxxxxxxxxxx from file /hana/xxxxx/xxx/log_backup_0_0_0_0.xxxxxxxxxxxxxxxx

using backup catalog xxxxxxxxxxxxxxxx from file /hana/xxx/xxx/log_backup_0_0_0_0.xxxxxxxxxxxxx

ERROR: [111024] CLEAR LOG is required for this operation.

Thanks,

Accepted Solutions (0)

Answers (2)

Answers (2)

jgleichmann
Active Contributor
0 Kudos

Hi,

the answer is simple: because it has to be done.

refer to help.sap.com or the hana manuals

"The CLEAR LOG command prevents the recovery of entries from the log area. No log entries from the log area are replayed, and the log area is initialized. As a consequence, the content of the log area is lost.

If they are needed, the log entries from the log backups are replayed.

CLEAR LOG must be used in the following situations:

  • The log area is unusable.
  • You are recovering the database to a different system. "


It just initializes your log area to clean up the not needed log segments of the source db.

Regards,

Jens

Former Member
0 Kudos

Hi Jens,

It is still not clear to me as I am trying to perform point I time recovery and have successfully restored data backup from target system . The logs are same which the hdbbackupdiag script showed as required ..

Thanks

jgleichmann
Active Contributor
0 Kudos

Hi,

please post the full recover command. There you have to add the clear log option to avoid the error message.

Cheers,

Jens

Former Member
0 Kudos

Hi Amurya ,

You might be using the command  RECOVER DATA instead of RECOVER DATABASE .

use RECOVER DATABASE for PIT with Clear log ( If required ) as suggested by Jens .

Regards,

Raaghu

.

Former Member
0 Kudos

Hi Raghu,

I am using below command and also tried from Studio.

HDBSettings.sh recoverSys.py --command="RECOVER DATABASE UNTIL TIMESTAMP '2016-02-27 17:00:00 CLEAR LOG'"

and getting below error

hostname:/hana/media> HDBSettings.sh recoverSys.py --command="RECOVER DATABASE UNTIL TIMESTAMP '2016-02-27 17:00:00 CLEAR LOG'"
[140247416043264, 0.001] >> starting recoverSys (at Sun Feb 28 14:02:40 2016)
[140247416043264, 0.001] args: ()
[140247416043264, 0.001] keys: {'command': "RECOVER DATABASE UNTIL TIMESTAMP '2016-02-09 17:00:00 CLEAR LOG'"}
own pid: 2306
recoverSys started: 2016-02-28 14:02:40
testing master: hostname
hostname is master
shutdown database, timeout is 120
stop system
stop system: hostname
stopping system: 2016-02-28 14:02:40
stopped system: 2016-02-28 14:02:40
creating file recoverInstance.sql
restart database
restart master nameserver: 2016-02-28 14:02:55
start system: hostname
2016-02-28T14:02:58+00:00  P002441      153283077bb ERROR   RECOVERY RECOVER DATA finished with error: [449] recovery strategy could not be determined, [111024] CLEAR LOG is required for this operation.

2016-02-28T14:02:58+00:00  P002441      153283077bb ERROR   RECOVERY RECOVER DATA finished with error: [449] recovery strategy could not be determined, [111024] CLEAR LOG is required for this operation.
start system: hostname failed: start of nameserver failed

recoverSys failed: 2016-02-28 14:02:59
[140247416043264, 19.166] 1
[140247416043264, 19.167] << ending recoverSys, rc = 1 (RC_GENERAL_EXCEPTION), after 19.165 secs

Former Member
0 Kudos

Hi Amurya,

I could see syntax error in your command

Try this.

HDBSettings.sh recoverSys.py --command="RECOVER DATABASE UNTIL TIMESTAMP '2016-02-27 17:00:00' CLEAR LOG"

you can also try the below one and please let me the result.

HDBSettings.sh recoverSys.py --command "RECOVER DATABASE UNTIL TIMESTAMP 'YYYY-MM-DD HH:MM:SS' CLEAR LOG USING DATA PATH ('<path/file>') USING LOG PATH ('path/logs')"

Regards,

Raaghu

Former Member
0 Kudos

Hi Raghu,

I am getting below error now.

start system: hostname

2016-02-28T15:57:18+00:00  P006619      153289924e2 ERROR   RECOVERY RECOVER DATA finished with error: [449] recovery strategy could not be determined, [111013] No valid data backup has been found

2016-02-28T15:57:18+00:00  P006619      153289924e2 ERROR   RECOVERY RECOVER DATA finished with error: [449] recovery strategy could not be determined, [111013] No valid data backup has been found
start system: hoastname failed: start of nameserver failed

Former Member
0 Kudos

Hi Amurya,

Did you try the below command with data backup and log file path ?

HDBSettings.sh recoverSys.py --command "RECOVER DATABASE UNTIL TIMESTAMP 'YYYY-MM-DD HH:MM:SS' CLEAR LOG USING DATA PATH ('<path/file>') USING LOG PATH ('path/logs')"

Former Member
0 Kudos

Hi raghu, \

Yes I tried that as well.

hostname:/hana/dump/sid_logs.old> python /usr/sap/SID/SYS/exe/hdb/python_support/recoverSys.py --password=xxxxxx --wait --command="RECOVER DATABASE UNTIL TIMESTAMP '2016-02-27 18:00:00'
>
> USING DATA PATH ('/hana/dump/sid_data1') USING LOG PATH ('/hana/dump/sid_logs') CLEAR LOG"
[139890596378368, 0.001] >> starting recoverSys (at Sun Feb 28 16:22:14 2016)
[139890596378368, 0.001] args: ()
[139890596378368, 0.001] keys: {'command': "RECOVER DATABASE UNTIL TIMESTAMP '2016-02-09 18:00:00' \n\nUSING DATA PATH ('/hana/dump/sid_data1') USING LOG PATH ('/hana/dump/sid_logs') CLEAR LOG", 'password': 'xxxxxx', 'wait': True}
own pid: 10819
recoverSys started: 2016-02-28 16:22:14
testing master: hostname
hostname is master
shutdown database, timeout is 120
stop system
stop system: hostname
stopping system: 2016-02-28 16:22:14
stopped system: 2016-02-28 16:22:14
creating file recoverInstance.sql
restart database
restart master nameserver: 2016-02-28 16:22:29
start system: hostname
2016-02-28T16:22:32+00:00  P010952      15328b03ee2 ERROR   RECOVERY RECOVER DATA finished with error: [448] recovery could not be completed, [71000257] incorrect syntax near "CLEAR"

2016-02-28T16:22:32+00:00  P010952      15328b03ee2 ERROR   RECOVERY RECOVER DATA finished with error: [448] recovery could not be completed, [71000257] incorrect syntax near "CLEAR"
start system: hostname failed: start of nameserver failed

recoverSys failed: 2016-02-28 16:22:33
[139890596378368, 19.169] 1
[139890596378368, 19.169] << ending recoverSys, rc = 1 (RC_GENERAL_EXCEPTION), after 19.168 secs
hostname:/hana/dump/sid_logs.old>

Moreover , the hdbbackupdiag is also giving error.

hostname:/hana/dump/sid_logs.old> hdbbackupdiag --check --logDirs /hana/dump/sid_logs --dataDir /hana/dump/sid -f -u "2016-02-09 18:00:00"       found backup catalog 1456520866656 from file /hana/dump/sid_logs/log_backup_0_0_0_0.1456520866656
using backup catalog 1456520866656 from file /hana/dump/sid_logs/log_backup_0_0_0_0.1456520866656

ERROR: [111024] CLEAR LOG is required for this operation.

Former Member
0 Kudos

Hi Amurya,

Can you Try this

"RECOVER DATABASE UNTIL TIMESTAMP '2016-02-27 18:00:00' CLEAR LOG USING DATA PATH ('/hana/dump/sid_data1') USING LOG PATH ('/hana/dump/sid_logs')"

Also you can check the below link.

SAP HANA Backup and Recovery - Technology Troubleshooting Guide - SCN Wiki

Former Member
0 Kudos

Hi Rahgu,

It also gave the same error . I assume until hdbbackupdiag does not give proper output the recovery for logs will not work as somehow the above commands and HANA DB stuido keep on searching for DATA backup for which I am getting error with hdbbackupdiag command as mentioned in my post at this thread,

Regards,

jgleichmann
Active Contributor
0 Kudos

Hi,

seems to be a syntax error :

HDBSettings.sh recoverSys.py --command="RECOVER DATABASE UNTIL TIMESTAMP '2016-02-27 17:00:00 CLEAR LOG'"

The tick is at the wrong postion, this is correct:

HDBSettings.sh recoverSys.py --command="RECOVER DATABASE UNTIL TIMESTAMP '2016-02-27 17:00:00' CLEAR LOG"

Note: The time is interpreted as UTC time, take care if you do this from commandline.

check also (may be also in combination with clear log in your case):

HDBSettings.sh recoverSys.py --command="RECOVER DATABASE UNTIL TIMESTAMP ''2016-02-27 17:00:00' CHECK ACCESS" –wait --timeout=600

I'm wondering why your recovery from hana studio didn't work. Which version you are using? Can you post excplicit the log of the hana studio try?

Regards,

Jens

Former Member
0 Kudos

Hi Amurya,

I can try to help you .Is source and target hosts are different ?

and also Could you please paste your the restore command that you are using.