MENU

Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Friday, December 11, 2015

OOM Issue on Statistics Server in Hana



Workaround for Out of memory on statistics server if procedure (set_retention_days) will not work:-

Steps to remove the older data from statistics server:

1) prepare all the delete statements (e.g. by checking the ini-parameters)
2) increase limit to 30%  and restart HANA
3) run the delete statements
4) verify it really deleted
5) decrease limit to whatever makes sense now (e.g. 10% or lower)
6) restart hana

Step 1:- Find the bigger tables in (_SYS_STATISTICS).

select * from m_cs_tables where schema_name = '_SYS_STATISTICS' order by estimated_max_memory_size_in_total desc;

Step 2:- Find the delete statements.

select * from m_inifile_contents where section = 'statisticsserver_sqlcommands' and value like 'delete from%'

OR

In studio->Configuration->search with (delete)-> Copy all delete statements.

Step 3:-

Increase the allocation limit 30%

Step 4:-

Restart the hana database.

Step 5:-

Run the delete statements.

Step 6:-

Verify the delete statements.

select min (snapshot_id ) from _SYS_STATISTICS.GLOBAL_DISKS

Step 7:-

Decrease limit to back 10% or 15%.

SAP NOTE:- 1929538

delete from _sys_statistics.' || cur.table_name;
   l_alter_sys := l_alter_sys ||  ' where server_timestamp < add_days(CURRENT_TIMESTAMP,-' || :l_retention_days || ')''';

No comments: