Sap Support

- Sap Support - Dump files for support

Log & Trace file

- Log and trace directories - Investigate backup log content

Tools : Hana Studio

- Installation - Using hana studio - Using Studio SQL Console

Tools : hdbrsutil

- hdbrsutil tips & tricks

Tools : Hana Cockpit

- Install hana cockpit 2 complete example - Un-Install hana cockpit 2


- Disk space used by log segments - Reclaim space from log segments - Retrieve table index space used on disk

Specific Operations

- Adding physical memory

Sap Hana User Privileges

- Role and privileges - Grant read access to a schema

Stored procedures

- Creating a procedure - Dropping a procedure - Compiling a procedure - Executing a procedure - Working with procedures - Using anonymous block

Sap Hana functions

- DateTime : ADD_YEARS - DateTime : EXTRACT


- Configuring sap hana - Kill long queries automatically


- Sql guide line - How to use SQL -Sql references - Sql tips & tricks for tables

SQL Query

- SQL & Tables - SQL & syntaxes - How to practice SQL

Sap Hana Tables

- Managing tables - Various ways to create Tables - Sap Hana Tables - Sap Hana Temporary Tables

Table description & DDL

- Retrieve table description - Table description using table-columns-view - Table ddl with hana studio - Table ddl using 'get_object_definition' procedure - Table ddl using hdbsql


- Various ways to select data


- Various ways to insert data

Sap Hana Users

- Managing Users - Create user with hana studio - Create user with sql Script - Create multiple users in one go - Copy a user - Create User with SQL script - Create User via Hana Studio - Update User - Drop User

Create Standard User

- Create standard & personal User

Create Technical User

- Create a technical User - Create backup users - Create administrator users - Create Modeler User - Create Data provisioning User - Create Cockpit User - Create a user to unlock any users

How to troubleshoot sap hana disk volume and FS full in sap hana?

"Alert Disk usage" for "storage type: LOG" might appear in your hana studio. Those events are very important as there could lead to freeze and stop your sap hana tenant database. Check your hana tenant database ( indexserver ) trace file for "rc=24 no space left on device errors"

Important note : Do not remove either data files or log backup files from FS manually. This method will break sap hana database completely.

Which database service is affected from lack of space in the sap hana log backup area?

Disk space shortage can have an important impact on the sap hana environment. No space on Log Volume will cause sap hana database to freeze. Application reports will be waiting for space in order to finish. If log volume is shared between tenant databases, all databases services will be impacted in the case of log volume full. In other words, the entire sap hana system will have to be shutdown to be able to resolve the issue.

How to troubleshoot sap hana log volume full?

Log volume full is a serious issue. In normal circonstances disk space shortage would be detected before hand and the sap hana administrator would have had time to do the necessary actions to avoid a complete space shortage. When no space in log volume is reached, it is too late. Application services are frozen. Any application transaction could be lost because the instance will have to be manually stopped. This situation will take longer to resolve that a standard clearing disk space procedure and unfortunately applications will be down during the operation.
See: Standard procedure to reclain log volume disk space.

Step by step solution for log volume full.

# The target is to free disk space in the log volume. # It is a 7 step procedure # 1 - Stop instance, # 2 - Move volume a temporary disk location # 3 - Start instance # 4- Reclaim free space # 5 - Stop instance # 6 - Move volume back to initial location # 7 - Start instance # ------------------------------------------------------------ Example based on log volume: /hana/log/< SID >/mnt00001/hdb00003 Instance number : 07 Instance name or SID : BOB 1/ Shutdown the sap hana instance at the os level ================================= /usr/sap/hostctrl/exe/sapcontrol -nr < instance_number > -function StopSystem HDB bobadm@linux07 $> HDB stop or bobadm@linux07 $> sapcontrol -nr 07 -function StopSystem HDB 2/ Make sure all database services have stopped. ================================= [ Show database services with sapcontrol ] 3/ Move the log volume temporarily to another volume with disk space. ================================= A/ Create a temporary directory mounted to another Volume with disk space .................................. $> mkdir /hana/data/< SID >/logs_temporary B/ Go to the /hana/log/< SID >/mnt00001 level .................................. $> cd /hana/log/< SID >/mnt00001 C/ Move the log volume "ex: hdb00003" to the temporary directory .............................. /hana/log/< SID >/mnt00001 $> $> mv hdb00003 /hana/data/< SID >/logs_temporary 4/ Create a symbolic link to the new folder using the old location directory: ================================= $> ln -s /hana/data/< SID >/logs_temporary/hdb00003 /hana/log/< SID >/mnt00001/hdb00003 5/ Start the instance ================================= /usr/sap/hostctrl/exe/sapcontrol -nr < instance_number > -function StartSystem HDB bobadm@linux07 $> HDB start or bobadm@linux07 $> sapcontrol -nr 07 -function StartSystem HDB 6/ Wait until log backups are performed. ======================================== [ Show log segments ] 7/ Clear disk space ======================================== [ Using hdbsql ] $> hdbsql . . . hdbsql > \c -i < instance no > -d < The database concerned > -u system -p ToTellEvery01 . . . hdbsql > ALTER SYSTEM RECLAIM LOG; 8/ Check how much space has been release ======================================== [ Check available free space on volume ] 9/ Stop the instance ======================================== /usr/sap/hostctrl/exe/sapcontrol -nr < instance_number > -function StopSystem HDB bobadm@linux07 $> HDB stop or bobadm@linux07 $> sapcontrol -nr 07 -function StopSystem HDB 8/ Check all services have stopped. ======================================== 10/ Remove synbolic link ======================================== bobadm@linux07 $> rm -f /hana/log/< SID >/mnt00001/hdb00003 11/ Move the log volume back to its original location: ======================================== bobadm@linux07 $> mv /hana/data/< SID >/logs_temporary/hdb00003 /hana/log/< SID >/mnt00001 12/ Do not forget : Remove the temporary log directory. ======================================================= bobadm@linux07 $> rmdir /hana/data/< SID >/logs_temporary 13/ Start the instance ================================= /usr/sap/hostctrl/exe/sapcontrol -nr < instance_number > -function StartSystem HDB bobadm@linux07 $> HDB start or bobadm@linux07 $> sapcontrol -nr 07 -function StartSystem HDB

[ id required : sap note 1679938 ]

What is the log segment state for each sap hana database?

The quickest way to check all databases, is to use hana studio sql console. If a database is not frozen, you will be able to connect to it rapidly and run the following query for each tenant database.

Run the following SQL query for each database and find out the state of the log backup :

-- Log segment status -- ------------------- select b.host, b.service_name, a.state, count(*) from "PUBLIC"."M_LOG_SEGMENTS" a join "PUBLIC"."M_SERVICES" b on (a.host = b.host AND a.port = b.port) group by b.host, b.service_name, a.state;

If some log segments are in state FREE, you can release the space running the following SQL :


If most log segments are in state TRUNCATED, there is a problem. The above SQL sysntax will resolve the space issue by removing unused and truncated files.
If there are lots of log segments in state BACKEDUP you might have a problem with hanging savepoint.

Different sap hana log backup status explanations:

Log Backup State Description


Currently writing to the current log segment


The Segment is closed by the writer.


but not yet backed up. Backup will remove it.


Segment is already backed up, but a safepoint has not yet been written. Therefore it needs to be kept for instance recovery.


Segment is free and can be reused.

How to Investigate log backup when sap hana system is down?

When the sap hana system is down, Sap Hana studio sql console or any other sql tool such as hdbsql are of no use for database queries. In that case you have to work at the operating system level and find out which volume is full. To resove the problem follow the same procedure described at How to troubleshoot sap hana log volume full? but you ignore the first step "stop instance".

# Count the number of files in each directory : #----------------------- cd /hana/log/< SID >/mnt00001 for i in $(find . -type d ) ; do echo $i ; ( find $i -type f | wc -l ) ; done with a result example : ./hdb00001 10 ./hdb00002 6 ./hdb00003 102 # Space investigation #----------------------- $> du -h with a result example : 150M ./hdb00001 50M ./hdb00002 100G ./hdb00003

Sap hana SQL

Sap hana tools

- - -