© 2013 SAP AG or an SAP affiliate company. All rights reserved. 7
Lifetime of a SAP HANA session
Application
HANA client software HANA client software
Network communication
Prepare query
Parse query or fetch
plan from cache
Shared SQL plan
cache
Handle on prepared query
Execute plan and
return result set(s)
result cache
Call query/open cursor
Providing parameter values
Fetch results
Close result set/close cursor
Close prep. statement handle
Close connection
Execution engines
OLAP
engine
Join
engine
Calc..
engine
SQL engine
Column store
Row store
Session context
SAP HANA DB Server DB Client
• Applications create sessions in the SAP HANA server
• Sessions could be seen as a conversation between client and
server
• They provide context to the execution of SQL commands
• Sessions are facilitated over one or more physical connections
(network connections)
• SYSTEM variables are set at logon/automatically and cannot be
changed during the session e.g. session language is set via
LOCALE (ISO lang code)/LOCALE_SAP (SAP internal
language encoding)
• USER variables can be freely defined (up to 50 per session) and
accessed from outside the session (m_session_context view,
SAP HANA studio)
• APPLICATION* variables used by convention to allow easier
system monitoring
• APPLICATIONUSER should show the „real“ user (SAP
NetWeaver puts in ABAP user)
• APPLICATIONSOURCE shows source location of database call
(automatically in SAP NetWeaver)
• APPLICATIONVERSION should provide versioning information
of the DB client