cancel
Showing results for 
Search instead for 
Did you mean: 

How to check HDB Shutdown and Startup History in SAP HANA

0 Kudos

I want to know which system table stores the history records about the HDB Shutdown and Startup in HANA SQL.

Or is there any other convenient way to find these history records without browsing lots of trace logfiles?

Accepted Solutions (1)

Accepted Solutions (1)

Cocquerel
Active Contributor

you can get the information with the following SQL:

SELECT * FROM "SYS"."M_SYSTEM_AVAILABILITY"

0 Kudos

OK! But it seems that the M_SYSTEM_AVAILABILITY can only store the older history records for 4 months ?

> > select count(*) from SYS.M_SYSTEM_AVAILABILITY where EVENT_TIME > '2021-02-01 00:00:00';

| COUNT(*) |

| -------------------- |

| 12075 |

1 row selected (overall time 4551.425 msec; server time 556.992 msec)

hdbsql SYSTEMDB=>

>

>

> select count(*) from SYS.M_SYSTEM_AVAILABILITY where EVENT_TIME < '2021-02-01 00:00:00';

| COUNT(*) |

| -------------------- |

| 0 |

1 row selected (overall time 2210.432 msec; server time 552.665 msec)

hdbsql SYSTEMDB=>

Cocquerel
Active Contributor
0 Kudos

the view SYS.M_SYSTEM_AVAILABILITY is reading data from 2 files: system_availability_<host>.trc and system_availability_<host>_old.trc that maximum size is 1MB

From note 2119087, "file size and number of files are hardcoded and can't be influenced."

But, what you could do is to persist from time to time, the data of SYS.M_SYSTEM_AVAILABILITY in a custom table.

Answers (1)

Answers (1)

sapfun08
Advisor
Advisor
0 Kudos

Hello,

You can get useful information about the startup timestamps of the different hosts with the help of statement "HANA_Startup_StartupTimes". The statement can be found in the attachments of SAP Note 1969700 - SQL Statement Collection for SAP HANA (SQLStatements.zip)

Best Regards,
Anna