HANA Backup and Recovery SQL Queries

You can find some helpful SQL queries in this article to check your HANA database backup status to use in case of recovery situation.

Query to find BACKUP_ID of running data backup ;

select BACKUP_ID from “SYS”.”M_BACKUP_CATALOG” where entry_type_name = ‘complete data backup’ and state_name = ‘running’  order by sys_start_time desc;

HANA Backup and Recovery SQL Queries

Query to list backup catalog ;

select * from M_BACKUP_CATALOG;

HANA Backup and Recovery SQL Queries

Check to  make sure there are no running backups still ;

select * from  “SYS”.”M_BACKUP_CATALOG” where STATE_NAME = ‘running’;

HANA Backup and Recovery SQL Queries

Estimated backup size ;

SELECT SUM(allocated_page_size) FROM M_CONVERTER_STATISTICS;

HANA Backup and Recovery SQL Queries

Show latest backup file names for a recovery ;

SELECT DESTINATION_PATH 
FROM M_BACKUP_CATALOG_FILES 
WHERE BACKUP_ID >= (SELECT TOP 1 BACKUP_ID FROM M_BACKUP_CATALOG 
WHERE STATE_NAME = ‘successful’ 
AND ENTRY_TYPE_NAME = ‘complete data backup’ 
ORDER BY UTC_START_TIME desc) ;

HANA Backup and Recovery SQL Queries

 

 

Leave a Reply


5 × four =

Blogroll