cancel
Showing results for 
Search instead for 
Did you mean: 

How to check HANA database size? SAP Business One

nikunjmehta2290
Participant
0 Kudos

Dear all,

How to check particular HANA database size? SAP Business One. I have 3 different database and I need to check database size of each database. SAP Business One HANA

Regards,

Nikunj

Accepted Solutions (1)

Accepted Solutions (1)

simon25
Advisor
Advisor
0 Kudos

Hi Nikunj,

Please take a look at point '50. How can the historic growth of the SAP HANA database be determined?' from SAP KBA 2000003 - FAQ: SAP HANA

Other KBAs on this topic :

2680392 - How to monitor HANA Database growth history for more than 42 days.

3006773 - How to check DB SIZE HISTORY

You can also use these custom scripts to get an historic overview of recent DB sizes also :

HANA_Backups_CatalogSize.txt

HANA_Backups_BackupRuns.txt

(To access these scripts, please navigate to the SQLstatements.zip folder at the bottom of Note 1969700)

Kind Regards

Simon

Answers (5)

Answers (5)

nidhisingh14
Advisor
Advisor

Hi nik2290

Below query shows schema size in GB:

SELECT SCHEMA_NAME, ROUND(SUM (TABLE_SIZE)/1024/1024/1024,2) "Size in GB" FROM M_TABLES WHERE (IS_COLUMN_TABLE = 'FALSE') OR (IS_COLUMN_TABLE = 'TRUE' AND (SCHEMA_NAME,TABLE_NAME) IN (SELECT DISTINCT SCHEMA_NAME,TABLE_NAME FROM SYS.M_CS_TABLES WHERE LOADED <> 'NO' )) GROUP BY SCHEMA_NAME ORDER BY SCHEMA_NAME

what error do you get in this? you could provide screenshot of same.

Kind Regards
Nidhi Singh
SAP Business One Support

nikunjmehta2290
Participant
0 Kudos

Hi Nidhi,

Thanks for the quick response but this query is also not full fill the requirements. There is no error in query but output is not perfect.

Actually, database size is 45 GB around but this query showing only 17 GB in output.

Regards,

Nikunj

nidhisingh14
Advisor
Advisor

Hi nik2290

Please use below query (without changing anything in query )

SELECT SCHEMA_NAME, ROUND(SUM (TABLE_SIZE)/1024/1024,2) "Size in MB" FROM M_TABLES WHERE (IS_COLUMN_TABLE = 'FALSE') OR (IS_COLUMN_TABLE = 'TRUE' AND (SCHEMA_NAME,TABLE_NAME) IN (SELECT DISTINCT SCHEMA_NAME,TABLE_NAME FROM SYS.M_CS_TABLES WHERE LOADED <> 'NO' )) GROUP BY SCHEMA_NAME ORDER BY SCHEMA_NAME

Kind Regards
Nidhi Singh
SAP Business One Support

nikunjmehta2290
Participant
0 Kudos

Hi Nidhi,

Thanks for your support but this query is not fullfill the requiremtns.

Regards,

Nikunj

nidhisingh14
Advisor
Advisor

Hi nik2290

You can also find the table size from HANA studio -> administration editor -> System Information -> Size of Tables on Disk.

Kind Regards
Nidhi Singh
SAP Business One Support

nikunjmehta2290
Participant
0 Kudos

Hi Nidhi,

Thanks for your support but I need to show the each database size in GB. Is there any other way to lookout this one?

Regards,

Nikunj

nidhisingh14
Advisor
Advisor

Hi nik2290

You may use following SQL to check size of schema for loaded tables in memory:


SELECT SCHEMA_NAME, ROUND(SUM(TABLE_SIZE)/1024/1024,2) "Size in MB" FROM M_TABLES WHERE (IS_COLUMN_TABLE = 'FALSE') OR (IS_COLUMN_TABLE = 'TRUE' AND(SCHEMA_NAME,TABLE_NAME) IN (SELECT DISTINCT SCHEMA_NAME,TABLE_NAME FROM SYS.M_CS_TABLES WHERE LOADED <> 'NO' )) GROUP BYSCHEMA_NAME ORDER BY SCHEMA_NAME

Following SQL to check size of schema on disk:


SELECT SCHEMA_NAME,ROUND((SUM(DISK_SIZE))/1024/1024,2) AS "SIZE IN MB" FROM PUBLIC.M_TABLE_PERSISTENCE_STATISTICS WHERE SCHEMA_NAME ='SBODEMOUS' GROUP BY SCHEMA_NAME;

Kind Regards
Nidhi Singh
SAP Business One Support

nikunjmehta2290
Participant
0 Kudos

It's not worked. I have HANA version and also make the necessary changes into query as per HANA format but not getting output.

DavidAndrusko
Advisor
Advisor
0 Kudos

Hi Nikunj,

Could it be the case that actually it is the size of SBO-COMMON that has increased due to electronics/B1iF use and logging? If so, I suggest that you check this post: sap b1 sbo-common growth quickly . Maybe if you provided a screenshot without customer data what exactly you are comparing in terms of size, it would help. Note that SAP HANA size on disk vs. size in RAM are two different concepts.

Regards,
David Andrusko
SAP Business One Support