You are on page 1of 49

Getting Started Newsletters Store

Products Services & Support About SCN Downloads


Industries Training & Education Partnership Developer Center
Lines of Business University Alliances Events & Webinars Innovation
Login Register Welcome, Guest
Activity Communications Actions
Browse
SAP HANA and In-Memory Business Data Management
0
Tweet Tweet 9
.
The SAP Hana Reference for NetWeaver Basis Administrators
The SAP Hana Reference for NetWeaver Basis Administrators was started because during studies for
HanaTec Certification it was noticed that anybody interested in Hana Administration was missing a one
stop shop location and reference for the Hana Commands and Command Line Tools and Administrator's
SQL queries respective to the Basis Administrator's Hana requirements.
The SAP Hana Reference for NetWeaver Basis Administrators is a live SCN Community project, this means
it is continuously updated and extended to include the latest valuable knowledge on SAP Hana from the
Basis Administrator's perspective.
Everybody who has gems of knowledge [anything from tips & tricks to howto's] on SAP Hana from the Basis
Administration perspective is positively welcomed and encouraged to join this open source sharing SCN
Community collaborative initiative to make this resource the most powerful SAP Hana Basis Administration
resource available.
Let's together exploit the power of the SCN Community and unlock the value of the knowledge and experience
in the community to the benefit of all.
To contribute either add a comment at the bottom or email or private message me.
Looking forward to more community contributions.
All the best,
Andy.
Contribution History
Date Author Subject
8th June 2013 Martin English Developer Edition Filesystem Structure
19th September 2013 Paul Aschmann Forward port 80 to XS Engine (8080)
19th September 2013 Paul Aschmann XS Engine debug mode
Contents:
1) HDB stop & StopSystem HDB
2a) HDB start & StartSystem HDB
2b) Note about SAPCONTROL location on the Hana Developer Edition
3) GetSystemInstanceList
The #SAP #Hana Reference for #NetWeaver #Basis
#Administrators
Posted by Andy Silvey in SAP HANA and In-Memory Business Data Management on May 27, 2013 11:12:33
PM
Share Share 3
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
1 of 49 Thursday 26 September 2013 05:59 PM
4) hdbnameserver
5) hdbindexserver
6) hdbuserstore
7) Install Permanent License Using SQL
8) M_VOLUME_IO_STATISTICS
Total Memory Used
Code and Stack Size
Total Memory Consumption of All Columnar Tables
Total Memory Consumption of All Row Tables
Total Memory Consumption of All Columnar Tables by Schema
List All Columnar Tables of Schema 'SYSTEM'
Available Physical Memory
Free Physical Memory
9) Activating Emergency User with hdbnameserver & hdbindexserver
10) Renaming an SAP HANA System with a GUI using hanaconfig.sh
11) Location of Configuration Files
12a) Trace Files Location
12b) How to enable serverwide HANA SQL traces?
12c) How to enable tracing on HANA with hdbodbc_cons Command
13) Testing the ODBC Installation
14a) HANA Database update with SUM or hdbupd
14b) hdbupd & hdbsetup
15) ODBO Driver
16) Collecting System Information for Support
17) HDBSQL
18) To run sql queries using hdbsql
19) Performing a Database Backup Using SQL Commands
20) Setting Up a Data Backup Using Cron
21) Canceling a Running Data Backup
22) Canceling Other Running Data Backups
23) To check the state of the data backup
24) hdblogdiag & Recovery
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
2 of 49 Thursday 26 September 2013 05:59 PM
25) Restore when log backups are missing
26) hdbbackupdiag
27) hdbcons
28) Sizing Hana Basic Calculations
28a) Sizing SAP BI/BW on Hana
28b) Sizing the SAP Business Suite on Hana
29) HANA SSO with Kerberos and Active Directory
30) Row Store Reorganisation
31) How to generate a runtime dump on SAP HANA saphostagent/sapdbctrl for Hana
32) DBSL hints for SAP HANA
33) hdbrename
34) hdbnsutil
35) hdbsrvutil - Example Usage
36) Show Hana Processes HDB proc & HDB info
37) Hana System Management SQL Administration Statements Reference
38) Hana SQL Reference Manual
39) SAP Hana SQLScript Reference
40) SAP Hana Technical Operations Manual
41) SAP Hana Administration Guide
42) SAP HANA Administration tables/views
43) The time stamps for the "Start Time" in Data Provisioning of HANA Studio are UTC
time
44) How to Check SUSE Linux Distribution Version and Patch Level
44b) How to View the SAP Hana Edition & Revision
45) Remove the SAP HANA Extended Application Service (SAP HANA scriptserver)
from the topology of your SAP HANA database
46) HANA Alerts related to File System Utilization
47) Log Volume is Full and the Database Doesn't Accept Any New Requests
48) Using the REGI Tool to Deploy Content for Delivery Units for example Translated
Texts
49) Homogeneous System Copy on SAP HANA
50) HANA License Key Request and Installation
51) HANA Architecture - Multiple HANA db's Databases on One Hana Appliance
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
3 of 49 Thursday 26 September 2013 05:59 PM
52) HANA Architecture - HANA MCOD Multiple Applications or Business Suite
Scenarios & Components Running on one SAP HANA System
53) HANA Architecture - How To Copy a Multiple-Host SAP HANA Database onto Single
Host HANA System
54) HANA Architecture - SAP Business Suite Powered by SAP HANA - Multi-Node
(Scale-Out) Support
54b) Hana Architecture - Guidance from IBM and SAP for High-end customer
landscapes based on SAP HANA
54c) Hana Architecture - SAP Hana Landscape Redistribution with SP6
55) How To Overcome the Hana Hardware Check Or Hardware Not Recognized Errors
During Installation
56) SAP Hana and the SLD System Landscape Directory
57) SLD configuration for multiple SAP HANA databases
58) How To Handle Common SAP Hana Alerts
59) Solution Manager Diagnostics Agent Installation On SAP Hana Systems
60) Optimal Settings for Suse Linux SLES 11 SP2 and SLES 11 for SAP SP2
61) Forward Port 80 to XS Engine (8080)
62) XS Engine Debug / Developer Mode
Appendix - Useful OSS Notes and Documentation
SAP Hana Commands and Command Line Tools and SQL Reference Examples for
NetWeaver Basis Administrators
1) Stop Hana
./HDB stop
/usr/sap/hostctrl/exe/sapcontrol -nr <instance-nr> -function StopSystem HDB
2a) Start Hana
./HDB start
/usr/sap/hostctrl/exe/sapcontrol -nr <instance-nr> -function StartSystem HDB
2b) Note about SAPCONTROL location on the Hana Developer Edition
[ thanks to Martin English for providing this information ]
On the Developer Editions, sapcontrol lives in the instance EXE folder; i.e.
cdexe
./sapcontrol -nr <instance-number> -function <function-name>
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
4 of 49 Thursday 26 September 2013 05:59 PM
On the current (revision 56) developer edition,
cdexe takes you to
/usr/sap/HDB/SYS/exe/hdb
which is linked to
/usr/sap/HDB/exe/linuxx86_64/hdb
imdbhdb:~ # su - hdbadm
imdbhdb:/usr/sap/HDB/HDB00> cdexe
imdbhdb:/usr/sap/HDB/SYS/exe/hdb> pwd
/usr/sap/HDB/SYS/exe/hdb
imdbhdb:/usr/sap/HDB/SYS/exe/hdb> cd ..
imdbhdb:/usr/sap/HDB/SYS/exe> ls -la
total 8 drwxr-x--- 2 hdbadm sapsys 4096 2013-01-25 14:17 .
drwxr-x--- 3 hdbadm sapsys 4096 2013-01-25 14:17 ..
lrwxrwxrwx 1 hdbadm sapsys 25 2013-01-25 14:17 hdb -> ../../exe/linuxx86_64/hdb
imdbhdb:/usr/sap/HDB/SYS/exe>
3) Query the current status of all hosts
/usr/sap/hostctrl/exe/sapcontrol -nr <instance-nr> -function GetSystemInstanceList
4) Start the name server:
/usr/sap/<SID>/HDB<instance>/hdbenv.sh
/usr/sap/<SID>/HDB<instance>/exe/hdbnameserver
5) Start an index server in a new console:
/usr/sap/<SID>/HDB<instance>/hdbenv.sh
/usr/sap/<SID>/HDB<instance>/exe/hdbindexserver -console
6) hdbuserstore
Create a user key in the user store and store the password under this user key:
hdbuserstore SET <user_key> <env> <user_name> <password>
For example:
hdbuserstore SET millerj localhost:30115 JohnMiller 2wsx$RF
List all available user keys (passwords are not displayed):
hdbuserstore LIST <user_key>
For example:
hdbuserstore LIST millerj
The following information is displayed
:KEY: millerjENV: localhost:30115USER: JohnMiller?
Call hdbsql with the user key:
hdbsql -U <user_key>
For example:
hdbsql -U millerj
hdbuserstore Example of User Creation while solving saphostagent/sapdbctrl for Hana issue
Ref: SAP Note 1625203 - saphostagent/sapdbctrl for newdb
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
5 of 49 Thursday 26 September 2013 05:59 PM
The saphostagent functions for querying the database status and for
starting and stopping the database are now also available for the Hana.
If you want to use the connect without a password, the following
prerequisites must be met:
a. To query information from the database, you require a database user with
the monitoring role.
You can create a database user with the Hana studio. Connect as the SYSTEM
user and execute the following SQL commands:
CREATE USER SAPDBCTRL PASSWORD x<password>x
GRANT MONITORING TO SAPDBCTRL
Then logon to the Hana studio under the username <username> and execute
the following command:
ALTER USER SAPDBCTRL PASSWORD <password>
b. As the OS user <sid>adm, you must provide the user key <SID>SAPDBCTRL in
hdbuserstore on the database server. You can check the existence of the
user key with the following command:
hdbuserstore LIST <SID>SAPDBCTRL
If the user key does not exist, you can create it as follows:
hdbuserstore SET <SID>SAPDBCTRL <dbhost>:<port> SAPDBCTRL <password>
The tool hdbuserstore is installed under the following paths:
/usr/sap/hdbclient
or
/usr/sap/<SID>/hdbclient
c. To check whether the sapdbctrl queries without passwords work, execute
the following command as OS user <sid>:
/usr/sap/hostctrl/exe/saphostctrl -function GetDatabaseStatus -dbname
<SID> -dbtype hdb
If sapdbctrl responds with the following error text:
ERROR: Database user authentication failed: SQLDriverConnect: Connect with
userkey failed! then you must check the connect data in hdbuserstore again.
7) Install Permanent License Using SQL
Execute the following SQL command:
SET SYSTEM LICENSE <license file content>
You can delete all installed license keys by executing the following SQL command
UNSET SYSTEM LICENSE ALL
To Install the license key
SET SYSTEM LICENSE LicenseFile
More info: the Experience Hana Cookbook
8) The monitoring view M_VOLUME_IO_STATISTICS
[ this Knowledge Base Article contains a fantastic overview including screenshots of the actions in
Hana Studio and on the command line with SQL for checking all kinds of memory consumption:
OSS 1840954 - Alerts related to HANA memory consumption ]
Show the Total Read Size and the the Total Write Size for each Volume since the Service
in question was last started.
The SQL command
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
6 of 49 Thursday 26 September 2013 05:59 PM
ALTER SYSTEM RESET MONITORING VIEW SYS.M_VOLUME_TO_STATISTICS_RESET
initialises the statistics shown by this view
The monitoring view
M_VOLUME_IO_STATISTICS_RESET
now shows the statistics since the reset time
You can use the M_SERVICE_MEMORY view to explore the amount of SAP HANA
Used Memory as follows:
Total Memory Used
SELECT
round(sum(TOTAL_MEMORY_USED_SIZE/1024/1024)) AS
"Total Used MB" FROM SYS.M_SERVICE_MEMORY;
Code and Stack Size
SELECT round(sum(CODE_SIZE+STACK_SIZE)/1024/1024)
AS "Code+stack MB" FROM SYS.M_SERVICE_MEMORY;
Total Memory Consumption of All Columnar Tables
SELECT round(sum(MEMORY_SIZE_IN_TOTAL)/1024/1024)
AS "Column Tables MB" FROM M_CS_TABLES;
Total Memory Consumption of All Row Tables
SELECT round(sum(USED_FIXED_PART_SIZE +
USED_VARIABLE_PART_SIZE)/1024/1024) AS "Row
Tables MB" FROM M_RS_TABLES;
Total Memory Consumption of All Columnar Tables by Schema
SELECT SCHEMA_NAME AS "Schema",
round(sum(MEMORY_SIZE_IN_TOTAL) /1024/1024) AS
"MB" FROM M_CS_TABLES GROUP BY SCHEMA_NAME ORDER
BY "MB" DESC;
List All Columnar Tables of Schema 'SYSTEM'
SELECT TABLE_NAME AS "Table",
round(MEMORY_SIZE_IN_TOTAL/1024/1024, 2) as "MB" FROM
M_CS_TABLES WHERE SCHEMA_NAME = 'SYSTEM' ORDER BY "MB"
DESC;
Available Physical Memory
select round((USED_PHYSICAL_MEMORY + FREE_PHYSICAL_MEMORY) /1024/1024/1024, 2)
as "Physical Memory GB" from
PUBLIC.M_HOST_RESOURCE_UTILIZATION;
Execute the Linux command cat /proc/meminfo | grep MemTotal
Free Physical Memory
Execute the SQL query:
select round(FREE_PHYSICAL_MEMORY/1024/1024/1024, 2)
as "Free Physical GB" from
PUBLIC.M_HOST_RESOURCE_UTILIZATION;
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
7 of 49 Thursday 26 September 2013 05:59 PM
Execute the Linux command:
awk 'BEGIN {sum = 0};
/^(MemFree|Buffers|Cached):/ {sum = sum + $2};
END {print sum}' /proc/meminfo
9) Activating Emergency User with hdbnameserver & hdbindexserver
If the SYSTEM users password is lost, you can use the SAP system user
to reset the password.
To recover an SAP HANA instance where the SYSTEM users password is lost,
you need to have <sid>adm access to the instance where SAP HANA's master
index server is running.
Open a command line interface, and log on to the server on which
the instance of the SAP HANA master index server is running.
Shut down the instance.
Start the name server:
/usr/sap/<SID>/HDB<instance>/hdbenv.sh
/usr/sap/<SID>/HDB<instance>/exe/hdbnameserver
Start an index server in a new console:
/usr/sap/<SID>/HDB<instance>/hdbenv.sh
/usr/sap/<SID>/HDB<instance>/exe/hdbindexserver -console
You will see the output of a starting index server.
When the service has started, you have a console to the SAP HANA
instance where you are logged on as a SYSTEM user.
Reset the SYSTEM user's password and store the new password in a
secure location with the following SQL command:
ALTER USER SYSTEM password <new password>
Note: Because you are logged on as a SYSTEM user in this console,
you do not have to change this password after the next logon, regardless \
of what your password setting policy.
10) Renaming an SAP HANA System with a GUI using hanaconfig.sh
In GUI mode, you will be prompted to enter the required parameters.
Use the following instructions to complete this task.
Note: If you specify the host name, make sure that it is fully qualified, such as
myhost.sap.com (i.e., not just myhost).
Connect to the system with an X server client to enable GUI system access.
Open a root shell and go to the directory where you mounted the SAP HANA DVD,
by entering a command such as the following:
cd /mnt/<HANA_DVD>/DATA_UNITS/HANA_IM_LINUX__X86_64
Call the script in GUI mode to perform the rename:
./hanaconfig.sh --gui
Select Rename HANA System
Select Next
Specify the required entries.
Leave the root shell after the rename is complete.
hanaconfig.sh gui can also be used for other tasks including installing and de-installing
SMD Agents
https://cookbook.experiencesaphana.com/bw/deploying-bw-on-hana/preparation/prepare-hana-hardware/
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
8 of 49 Thursday 26 September 2013 05:59 PM
11) Location of Configuration Files
The configuration files (.ini files) are located by default in the following directories
$DIR_INSTANCE/../SYS/global/hdb
custom/config global.ini
indexserver.ini
nameserver.ini
For host-specific configuration settings
$SAP_RETRIEVAL_PATH
sapprofile.ini
daemon.ini
12a) Trace Files Location
trace files can be found here:
/usr/sap/<SID>/HDB<system number>/<hostname>/trace
12b) How to enable serverwide HANA SQL traces?
Instead of Client-Side JDBC or ODBC tracing an administrator would like to enable serverwide SQL traces.
1. Open In-Memory Computing Engine (IMCE) Studio
2. Go to the Administration Console -> Diagnosis Files
3. Click the Configure Trace ... icon in the top right corner
4. Select "ALL" for SQL tracing
5. Click Apply and OK
The SQL trace file will be listed along the other trace files in the following format:
sqltrace_<hostname>_<port>_000.py
Note: Make sure you are connected to the correct HANA instance :-)
ref: 1627480 - How to enable serverwide HANA SQL traces?
12c) How to enable tracing on HANA with hdbodbc_cons Command
The steps below are for Windows. Adjust them accordingly for UNIX and Linux.
1. Open a command prompt
2. Navigate to the location of the HANA Client (e.g. C:\SAP\hdbclient)
3. Run the following commands
1. hdbodbc_cons config trace filename <Path_And_Filename> (e.g. C:\SAP\HANA_ODBC.txt)
2. hdbodbc_cons trace sql on
3. hdbodbc_cons trace api on
4. Confirm the settings took by running hdbodbc_cons show all. You should see something similar to the
following:
Configuration:
Trace file name : C:\SAP\HANA_ODBC.txt
Trace flags : A:a
ODBC trace : enabled
Short trace : disabled
Debug trace : disabled
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
9 of 49 Thursday 26 September 2013 05:59 PM
SQL trace : enabled
Time stamp prefix : disabled
Packet trace : disabled
Settings:
Update count : 0
Total size : 256
equivalent to 0 process-specific parts.
Version flag : 0
5. Disable tracing by running hdbodbc_cons trace off
6. Confirm the settings took by running hdbodbc_cons show all. You should see something similar to the
following:
Configuration:
Trace file name : C:\SAP\HANA_ODBC.txt
Trace flags : (none set)
Settings:
Update count : 1
Total size : 256
equivalent to 0 process-specific parts.
Version flag : 0
Forced re-read of global configuration with last update.
ref: 1834470 - How to enable tracing on HANA
13) Testing the ODBC Installation
You can test the installation of the ODBC driver and your ability to connect
by using the odbcreg tool, which is part of the ODBC installation.
Start the odbcreg tool by enter a command in the form:
odbcreg -t hdbcodbc (for 64-bit driver)
or
odbcreg32 -t hdbcodbc32 (for 32-bit driver).
If the driver is installed properly, you should get the ODBC login screen.
Note, you can also run the command
odbcreg -g or odbcreg32 -g to get a list of installed drivers.
The SAP HANA driver is called HDBODBC
14a) HANA Database update with SUM or hdbupd
As of HANA SPS5, the SAP HANA Automated Update Guide only mentions
SUM (SUM4HANA) for updating the SAP HANA appliance software
and related components.
You are not sure if SUM is mandatory and using hdbupd is obsolete by now.
The use of SUM is mandatory and the highly recommended way for updating
the SAP HANA appliance. SUM takes care of:
. Migrating the old SAP HANA file system structure to the new
shared layout during the selfupdate process
. Handling the lm_structure content in a consistent way
. Keeping the system consistent via update of all the components
which are installed on the HANA box
. Checking the correct component version dependencies. In case of
inconsistencies an error is generated and execution will be stopped
. Integration to Solution Manager, e.g. consuming generated stacks with HANA
content
Other tools such as the On Site configuration tool rely on this landscape
to be correct in order to work properly.
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
10 of 49 Thursday 26 September 2013 05:59 PM
It is technically possible to use hdbupd but you should consider this option
only in special/extreme situations and after consulting a SAP representative.
ref: 1864196 - HANA Database update with SUM or hdbupd
A useful tip in this blog:
http://scn.sap.com/community/distinguished-engineers/blog/2013/05/29/which-tool-to-use-for-sap-hana-update-
sum-for-hana-or-hdbupd.pdf
So how do you recognize if your SAP HANA instance was installed with hdbinst or
Unified Installer?
It is really simple, if the directories /usr/sap/<SID>/SUM and /usr/sap/<SID>/lm_structure
exist then the Unified Installer was used and you should apply Support Package Stacks
and Revisions with SUM for HANA. If you do not have these directories, the recommendation
is to bring your instance up-to-date and install SUM for HANA and lm_structure using
SAP Note 1793303. After following this note you can use SUM for HANA to apply revisions
and SP Stacks.
On the same subject another very useful blog:
Man-Ted Chan's Blog: SUM for SAP HANA setup - http://scn.sap.com/people/man-ted.chan/blog/2013/06/17
/sum-for-sap-hana-setup.pdf
14b) hdbupd & hdbsetup
Automated update of SAP HANA server components
The SAP Software Update Manager is a separate software component that must
be started on the SAP HANA server. A good practice is to install this component
as a service.
The SAP Software Update Manager does not have a user interface.
It is controlled remotely from the SAP HANA studio.
Tip: The Software Update Manager can be configured as a Linux service by
running the following commands:
export JAVA_HOME=/usr/sap/<SID>/SUM/jvm/jre
/usr/sap/<SID>/SUM/daemon.sh install
The service can be started using the following command:
/etc/init.d/sum_daemon start
After the release of an SPS of the SAP HANA Appliance Software new revisions of the SAP HANA
database are released.
To update your SAP HANA database to these new revisions, use the commands
hdbupd or hdbsetup which are provided with the SAP HANA database installation.
15) ODBO Driver
Install the SAP HANA ODBO driver on the host where MS EXCEL has been installed and is running.
For more information, see SAP HANA Client Installation and Update Guide.
a. Open a command prompt and call the SAP HANA client installation program by entering
the following command:
hdbinst -a client [<option_list>]
b. Follow the instructions displayed by the installation tool.
16) Collecting System Information for Support
There is a Python script that allows you to collect information from your systems
even when no access to the system via SQL is possible.
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
11 of 49 Thursday 26 September 2013 05:59 PM
This information can be added to the support message.
Location and Usage
The name of the Python script is
fullSystemInfoDump.py
and is part of a server installation. It runs from a command line and is located
in the directory
$DIR_INSTANCE/exe/python_support
(Linux).
To execute the script <sid>adm rights are required.
To start the script out of its location directory, enter:
python fullSystemInfoDump.py
By default the script creates a zip file with all of the collected support information
to the directory
DIR_TEMP/system_dump where DIR_TEMP
is the content of the variable with the same name in sapprofile.ini.
This output directory is shown as console output when the script is running, but it can
be looked up by entering:
hdbsrvutil -z | grep DIR_TEMP=
To change the default directory, an explicit absolute path can be given to the script,
for example:
python fullSystemInfoDump.py <output_dir>
Usage information can be displayed by entering:
python fullSystemInfoDump.py h
To collect support information you need an SQL user with rights to select the system tables and
views listed in System Tables/Views.
For security reasons the user name and password for this SQL user cannot be given as command
line parameters to the script.
Instead you are prompted for this information:
ts1adm@luvm252058a:/usr/sap/TS1/HDB01/exe/python_support> python
fullSystemInfoDump.py
User name: SYSTEM
Password:
The password is not displayed on the command line.
If the system can be reached via SQL and the user name and password information is valid, the script
starts collecting support information.
If user name and/or password are invalid, the script aborts.
17) HDBSQL
SAP HANA HDBSQL is a command line tool for entering and executing SQL statements, executing
database procedures, and querying information about SAP HANA databases.
You can use HDBSQL interactively or import commands from a file and execute them in the
background. You can access databases on your local computer and on remote computers.
To get a list of all available hdbsql commands, you should use:
hdbsql -h
Examples:
One step logon to the database on the PARMA computer with instance ID 01 as database
user MONA with the password RED.
hdbsql -n PARMA -i 1 -u MONA p RED
To log on using a <user_key>, enter the following command:
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
12 of 49 Thursday 26 September 2013 05:59 PM
hdbsql [<options>] -U <user_key>
Two-Step Logon, Procedure
Start HDBSQL:
hdbsql [<options>]
Log on to the database:
\c [<options>] -n <database_host> -i <instance_id> -u
<database_user>,<database_user_password>
You display general information about the database:
\s
host : wdfd00245293a:30015
database : ORG
user : SYSTEM
kernel version: 1.50.00.000000
SQLDBC version: libSQLDBCHDB 1.50.00 Build 0000000-0120
autocommit : ON
18) To run sql queries using hdbsql:
# Hdbsql n <hostname>:<port> -u <database user> p <password>
Port= 3<##>15 (## is the instance number)
For example for system number 01:
# Hdbsql n coe-he-40:30115 u system p SAPTeched1
Welcome to the SAP In-Memory Computing interactive terminal.
Type: \h for help with commands
\q to quit
hdbsql=> select count (*) from EIM360.mara
COUNT(*)
14927
19) Performing a Database Backup Using SQL Commands
https://cookbook.experiencesaphana.com/bw/operating-bw-on-hana/data-safety/backup/performing-database-backup/
You can enter SQL commands either by using the SQL editor in SAP HANA studio,
or by using the hdbsql program on the command line.
The hdbsql program is located in
/usr/sap/<SID>/HDB<instance number>/exe/
Note Backups using SQL commands are only recommended for batch mode
(see section Using Batch Mode below).
The backup can be started with the following SQL command:
BACKUP DATA USING FILE (<backup_file_prefix>)
The backup creates the backup files in the default directory.
The name of each backup file starts with <backup_file_prefix>.
If you want to change the default a location, specify the full
path, for example:
BACKUP DATA USING FILE (/backupDir/data/monday/COMPLETE_DATA_BACKUP)
Performing a Database Backup Using Batch Mode
Currently, the main tool for batch mode backup is the command
line interface hdbsql.
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
13 of 49 Thursday 26 September 2013 05:59 PM
This is the current recommended mode for executing backups from
operating system level.
hdbsql enables you to trigger backups via crontab.
20) Setting Up a Data Backup Using Cron
a. Install the client software.
The client software enables access to the hdbuserstore.
Use the following command:
hdbinst a client (default location: /usr/sap/hdbclient)
b. Create a user key.
Use the following command:
/usr/sap/hdbclient/hdbuserstore set <KEY> <host>:3<instance id>15
<user> <password> Example: /usr/sap/hdbclient/hdbuserstore set
BACKUP vebwtests1:30015 user password
c. In crontab, call the following at the desired time:
/usr/sap/hdbclient/hdbsql U<KEY> "BACKUP DATA USING FILE ('<target>')"
Example: /usr/sap/hdbclient/hdbsql -U BACKUP "BACKUP DATA USING FILE ('MONDAY')"
A data backup is then created in the default location. In the above example,
the prefix of all service-related backup files is MONDAY.
21) Canceling a Running Data Backup
You can cancel a data backup that is still running.
To cancel a running data backup, you can use either SAP HANA studio or an SQL command.
Prerequisites
A user needs the system privileges CATALOG READ and BACKUP ADMIN.
Canceling a Running Data Backup Using SAP HANA Studio
You can use SAP HANA studio to cancel running data backups that you
started using the backup wizard. To cancel a running data backup, choose Cancel.
The backup is then canceled and you are notified of this.
22) Canceling Other Running Data Backups
To cancel any data backup:
a. Find the Backup ID.
When a data backup is started, the system assigns a unique ID to the data backup.
To find the backup ID of the running data backup, use the monitoring view
M_BACKUP_CATALOG,
which provides an overview of information about backup and recovery activities.
To find the backup ID of the running data backup, use the following SQL command:
select BACKUP_ID from "SYS"."M_BACKUP_CATALOG" where entry_type_name =
'complete data backup' and state_name = 'running' order by sys_start_time desc;
You can now use the backup ID to cancel the running data backup.
Cancel the data backup.
To cancel the running data backup use the following SQL command:
backup cancel <backup_id>
Check that the data backup was canceled.
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
14 of 49 Thursday 26 September 2013 05:59 PM
23) To check the state of the data backup, use the following command:
select state_name from "SYS"."M_BACKUP_CATALOG" where backup_id = <backup_id>
24) hdblogdiag & Recovery
Recover the database until a point in time with a timestamp using a dedicated directory for
data backups and further directories containing automatically written log backups.
Use the following command:
RECOVER DATABASE UNTIL TIMESTAMP '2011-08-22 15:00:00' CHANGE ALL DATA USING PATH
('/backup/MONDAY/') CHANGE ALL LOG USING PATH ('/backup/logs1/','/backup/logs2/')
25) Restore when log backups are missing
ref: SAP Note 1816483 - Restore when log backups are missing
A restore fails with the error "Recovery could not be completed Cannot
open file ...".
One or more log backups of the SAP HANA database are missing or damaged.
All the available log backups exist in the file system of the database server.
If not all the required log backups are available, an SAP HANA database
restore is subject to restrictions.
In most cases, you will only be able to restore the SAP HANA database to a
in time that lies before the time when the oldest missing log backup was written.
A restore to any point in time (including redo of the log area) is possible
only if the content of the missing log backup still exists in the log area.
To determine if this is the case, proceed as follows:
Determine the volume IDs and the lowest log item of the missing log backup
from the name of the backup. If a previous restore has failed with the
error message specified above, you can determine the name of the missing
log backup from the error message.
The log backups are named after the schema log_backup_<volume ID>_0_<lowest
log item>_<highest log item>, for example,
log_backup_2_0_12345_67890.
In this example, the volume ID would be 2 and the lowest log item 12345.
Use hdblogdiag to determine the lowest log item that still exists in the
log segments of the log area as follows:
Call
hdblogdiag seglist <directory of the log segments for volume ID>
This call issues a list of log segments that looks as follows:
LogSegment[0/0:<lowest log item>-<highest log item>(...
LogSegment[0/1:<lowest log item>-<highest log item>(......
Take into account that the system outputs the log items in hexadecimal
format and that you have to convert them into decimal numbers.
Example:
Assuming the parameter basepath_logvolumes has the value /hana/log/HAN and
the parameter use_mountpoints has the value yes, so that the log segments
lie in the subdirectory mnt0001.
The log segments for the volume with the volume ID 2 then lie there in the
subdirectory
hdb00002: > hdblogdiag seglist /hana/log/HAN/mnt0001/hdb0002
LogSegment[0/0:0x129540-0x131c00(...
LogSegment[0/1:0x131c00-0x139540(...
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
15 of 49 Thursday 26 September 2013 05:59 PM
Log segment 0 has the lowest log item 1217856 (hexadecimal 0x129540), log
segment 1 has the lowest log item 1252352 (hexadecimal 0x131c00). This
means that the lowest log item that exists in the log segments is 1217856.
If the lowest log item of the missing log backup is bigger than the lowest
log item that still exists in a log segment of the log area, a restore to
the latest available point in time is possible.
In such a case, proceed as follows:
Generate a new backup catalog with
hdbbbackupdiag -generate (SAP Note1812057)
Start the restore for the point in time that you selected.
If a restore to the latest available point in time is not possible, you can
restore the SAP HANA database to an earlier point in time.
You can restore the SAP HANA database only with the log backups that were
written before the missing log backup.
You cannot use the log backups that were written after the missing log
backup.
In this situation, proceed as follows:
Generate a new backup catalog with
hdbbbackupdiag -generate (SAP Note 1812057).
Start the restore for the point in time that you selected. For this, you
must select "Initialize Log Area".
26) hdbbackupdiag
The program hdbbackupdiag provides support for determining the data backup
files and log backup files that are required to restore an SAP HANA
database, with "Recover the database to its most recent state" as the aim.
Depending on the availability of the file BackupCatalog.xml that is saved
under the path $DIR_INSTANCE/../SYS/global/hdb/metadata and that is used to
determine the restoration strategy, two application scenarios arise; they
are both described in the following section.
Scenario a: BackupCatalog.xml is available
If the current version of the file BackupCatalog.xml exists, the program
hdbbackupdiag
determines the most suitable data backup and creates a list
of the required log backup files.
To do this, you must call the program with the option -c <BackupCatalog>.
Use the option -c <BackupCatalog> to specify the name of the BackupCatalog
file.
In normal cases, this is BackupCatalog.xml.
If the program is not started from the directory in which the file
BackupCatalog.xml
is located, you can use the option -d <Path> to adjust the access path.
The following example illustrates the function:
hdbbackupdiag -d $DIR_INSTANCE/../SYS/global/hdb/metadata -c
BackupCatalog.xml
Output:
Data backup file: thursday_databackup_0_1
RedoLogPosition: 0
Backup time: 2012-04-12T17:30:03+02:00
Using hdbbackupdiag to Reconstruct the Backup Catalog
A recovery of SAP HANA database fails. The file "backup.log" contains the
error messages:
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
16 of 49 Thursday 26 September 2013 05:59 PM
"recovery strategy could not be determined" and
"Catalog backup not found".
The backup catalog that the database created is not available or defective.
All data backups and log backups that are required for the recovery are
available in the file system of the database server.
You can use the program "hdbbackupdiag" to create a new backup catalog.
For this, you provide all the data backups and log backups in the file
system of the database server. If you cannot use the standard paths for
data backups and log backups due to space restrictions, you can also save
the files in different directories. Note that all files of the data backup
must be saved to one directory. However, log backups can be distributed
across multiple directories.
To do this, start the program hdbbackupdiag with the following options:
--generate
--dataDir <directory of the data backups>
--logDirs <directories of the log backups>
-d <target directory of the backup catalog>
All directories must be specified as absolute paths.
For a standard installation, the call is as follows, for example:
hdbbackupdiag --generate --dataDir $DIR_INSTANCE/backup/data
--logDirs $DIR_INSTANCE/backup/log -d $DIR_INSTANCE/backup/log
If you have distributed the log backup across multiple directories, you can
specify them behind the option --logDirs separated by commas. For example:
hdbbackupdiag --generate --dataDir $DIR_INSTANCE/backup/data
--logDirs $DIR_INSTANCE/backup/log,/mnt/disc2/log -d
$DIR_INSTANCE/backup/log
When you call "hdbbackupdiag", the content of the specified directories is
analyzed and a new backup catalog is generated. This backup catalog is
created with a directory for the log back up that is specified with -d.
Then new backup catalog has the file name "log_backup_0_0_0_0.n" whereby n is
the newly generated backup ID of the database.
To be able to verify the content of the backup catalog, you can output the
recovery strategy that is based on the latest data backup in the generated
backup catalog. For this, use the command
"hdbbackupdiag -d <target directory of the backup catalog>"
After you generate the backup catalog, a recovery of the database may
carried out.
In case the backup catalog is not created in the standard directory
$DIR_INSTANCE/backup/log, you must specify the directory in which the
backup catalog is located in the Recovery Wizard in the step "Locate Log
Backups".
For more information check OSS Note:
SAP Note 1812057 - Reconstruction of the backup catalog with hdbbackupdiag
27) hdbcons
http://scn.sap.com/community/hana-in-memory/blog/2012/12/28/how-to-use-sap-hana-hdbcons-utility
hdbcons is a tool to provide information about the actual used memory, the peak memory,
the throughput of the different allocators, etc.
SAP Note 1786918 - Required information to investigate high memory consumption
You are running SAP HANA and you experience high memory consumption / out
of memory situations.
You are asked to provide information using hdbcons.
SAP HANA Development Support requires information about a suspected memory
issue.
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
17 of 49 Thursday 26 September 2013 05:59 PM
Connect to your HANA database server as user sidadm.
a. You suspect that a query requires too much memory:
Before running the query start the tracing:
hdbcons 'mm flag / -rs as'
Run the query.
Stop the tracing:
hdbcons 'mm flag / -rd as'
Write output:
hdbcons 'mm callgraph -r -o <filename> /'
Please be aware that this trace will slow down the system!
You suspect a memory leak:
Please provide the output files of the following commands:
a. hdbcons 'mm bl -rt Pool' > /<path>/<file_name.txt>
This will show us how much memory is located by which code line.
b. hdbcons 'mm l -s -S -p' > /<path>/<file_name.txt>
This will show which allocator allocates how much memory at the
moment and its peak memory allocation.
The memory consumption stays at a high level / the database seems to
hang because of high memory consumption
Please provide a runtime dump as described in SAP Note 1813020 and
the content of the monitoring view M_HEAP_MEMORY.
hdbcons To get threads list
hdbcons "context list -s" > thread_callstack_test.txt
To generate runtime dump (see the Note 1813020 - How to generate a runtime dump on SAP HANA)
hdbcons "runtimedump dump -f /test/rte_dump.txt"
28) Sizing Hana Basic Calculations
SAP BW Sizing On Hana Summary
RAM = (Source data footprint - 60gb) * 2 / 4 * c1 + 90gb
or
RAM = ( colstore tables footprint * 2 / 4 + rowstore tables footprint /1.5) * c1 + 50gb
Disk persistence = 4 * RAM
Disk Log = 1 * RAM
c = source database specific compression factor (where applicable)
Memory Sizing: Runtime Objects
RAM dynamic + RAM static
Total RAM is
RAM = (Source data footprint - 60gb) * 2 / 4 * c1 + 90gb
or
RAM = ( colstore tables footprint * 2 / 4 + rowstore tables footprint /1.5) * c1 + 50gb
c = source database specific compression factor (where applicable)
Disk Sizing
Disk persistence = 4 * RAM
Disk Log = 1 * RAM
Useful OSS Notes:
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
18 of 49 Thursday 26 September 2013 05:59 PM
OSS 1736976 - Sizing Report for BW on HANA
OSS 1514966 - SAP HANA 1.0: Sizing SAP In-Memory Database
SAP BW on HANA Sizing Report - https://websmp209.sap-ag.de/~sapidb/012006153200000051552013E
/SAP_BW_on_HANA_Sizing_Report_V1_4.pdf
OSS 1799449 - Sizing report ERP on SAP HANA database
OSS 1855041 - Sizing Recommendation for Master Node in BW-on-HANA
28a) Sizing SAP BI/BW on Hana
You intend to migrate an SAP NetWeaver BW system from any database platform
to the SAP HANA In-Memory Database and need information on hardware sizing
of the HANA platform.
Starting with version 7.30 SP5 you can run SAP Business Information
Warehouse (SAP BW) on SAP HANA as database platform. This enables you to
leverage the In-Memory capabilities of HANA and the SAP-HANA-optimized BW
objects.
To simplify sizing of an SAP BW system that is supposed to be migrated, SAP now provide
the database independent ABAP report
/SDF/HANA_BW_SIZING
which computes all information relevant to sizing a HANA database server. A first version of
the report is available with ST-PI 2008_1_7xx SP06.
Important: If you plan to migrate a BW system with significant size (e.g.
20+TB source system database size), please read SAP note 1855041.
For a detailed description of the report, its input parameters, and how to
interpret its output, please refer to the document:
"SAP_BW_on_HANA_Sizing_Report.pdf" attached to OSS Note 1736976 - Sizing Report for BW on HANA.
The ABAP report now includes the following features:
- enhanced sizing precision by table type specific compression
factors
- "non-active data" concept: optimized memory consumption by
taking into account that specific tables are preferred for
memory displacement (e.g. tables belonging to objects in
Corporate Memory).
- Sizing of a Part of the scenarios can be done specificating a
subset of BW Objects which have to be considered for sizing.
Dependent BW Objects will be automatically taken into account.
ref: SAP Note 1736976 - Sizing Report for BW on HANA and the pdf attached to the Note
28b) Sizing the SAP Business Suite on Hana
Initial Sizing observations for Suite on HANA (SAP enhancement package 6 for SAP ERP 6.0,
version for SAP HANA, SAP enhancement package 2 for SAP CRM 7.0, version for SAP HANA,
SAP enhancement package 2 for SAP SCM 7.0, version for SAP HANA, SAP enhancement
package 3 for SAP Supplier Relationship Management 7.0, version for SAP HANA)
Initial sizing observations are based on lab measurements, load tests and measurements performed
in customer test systems. This information may change, if additional measurement results are
available. This information is only valid, if the system usage is not changed after the move; intense
additional reporting and OLAP processing is not taken into account.
Application Server
Based on the measurements SAP doesn't expect any changes concerning CPU, memory and network
requirements for the ABAP application server. This means that the existing hardware and network
infrastructure can still be used. Please check the PAM (www.service.sap.com/pam) for further details.
HANA Main Memory
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
19 of 49 Thursday 26 September 2013 05:59 PM
As far as sizing of the HANA appliance is concerned, main memory is the most important resource.
The current recommendation from SAP is that you should take half of the size of an uncompressed
but "well-maintained" disk-based database and include a safety buffer of 20%. This means, if the database
is currently approximately 1,8 TB in size (tables plus indexes), SAP recommends a HANA appliance of 1 TB.
You should not forget to consider your future data growth into your planning. SAP doesn't expect changes in
memory requirements for applications using liveCache.
HANA CPU and Disk Space
The appliance is configured in such a way that the CPU power and the I/O capacity is sufficient. To fully
support the parallel processing capabilities of HANA for optimal response times for analytical applications
SAP prefers a factor of 3 to 4 more CPU power for HANA than for disk based databases without parallelization
of single statements. This also provides a buffer for running OLTP and OLAP load simultaneously.
If other software is running on the database server, please be careful to identify the CPU consumption of
the database. You can for example look at the CPU consumption of the database process(es) using SAP's
monitoring tools. Regarding the disk space of Suite on HANA, SAP recommends to use half of the required
disk space that is needed for the Business Suite for disk-based databases. Please note that this does not
mean that each table just needs half of the disk space as compared to a disk based database.
For initial sizings you should use the Quick Sizer (www.service.sap.com/quicksizer) results for database size
(DB Disk) and CPU requirements (DB SAPS) as input for HANA main memory, disk space and CPU sizing.
ref: Note 1793345 - Sizing for Suite on HANA
29) HANA SSO with Kerberos and Active Directory
The configuration is a complex task with various sources of error.
Main reasons are the cross OS nature of the setup (Linux/ Windows), often resulting
in problems with case (Windows: case insensitive, Linux: case sensitive) and the tight
integration into the network configuration (/etc/hosts, DNS).
In particular, there are various sources of error when creating the keytab and exporting it
from Active Directory.
The process is highly manual and consists of several steps across different operating
systems and hosts.
A python script is provided in SAP Note 1813724 which automates the creation of the
keytab.
In addition, the IP configuration at the HANA appliance is validated (hostname resolution
/ reverse lookup) and the Kerberos configuration is checked for consistency with the remote
Active Directory.
Unzip the attached hdbkrbconf.zip and run as <sid>adm
$ python hdbkrbconf.py -h
for help.
There are two main options, "-k" for creating the keytab and "-v" for validating the
configuration including the keytab.
Option "-V" will provide verbose output, together with an analysis file for SAP support.
This file will also be written in the event of an error.
More info, check: SAP Note 1813724 - HANA SSO/Kerberos: create keytab and validate conf
30) Row Store Reorganisation
Row store memory size is a lot bigger than the actual data size in row store and shows
high fragmentation ratio.
Row store grows by allocating a 64MB memory segment and shrinks by freeing empty
segments.
A segment is internally divided into fixed-size pages. When a row store table requires more
memory to store records, the table takes a free page from existing segments. If no segment
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
20 of 49 Thursday 26 September 2013 05:59 PM
has a free page, a new segment is allocated.
Deleting a large number of records may result in a number of sparse segments. In such a case,
row store reorganization can be performed for memory compaction. The pages in sparse
segments are moved to other segments and the resultant empty segments are freed.
If the prerequisites are not satisfied, row store reorganization should not be executed.
The prerequisites, queries, and monitoring views used for the queries are applicable to Rev 50 and
to change in future releases.
o HANA Database Rev 50 or later
- HANA Database has to be upgraded prior to run row store
reorganization
o Catalog integrity check
- The following procedure call should run successfully and
returns empty result set.
CALL CHECK_CATALOG
('CHECK_OBJECT_REFERENTIAL_INTEGRITY','','','');
o Row store reorganization is recommended, when allocated row store
size is over 10GB and free page ratio is over 30%.
SELECT HOST, PORT, CASE WHEN (((SUM(FREE_SIZE) /
SUM(ALLOCATED_SIZE)) > 0.30) AND SUM(ALLOCATED_SIZE) >
TO_DECIMAL(10)*1024*1024*1024) THEN 'TRUE' ELSE 'FALSE' END
"Row store Reorganization Recommended", TO_DECIMAL(
SUM(FREE_SIZE)*100 / SUM(ALLOCATED_SIZE), 10,2) "Free Space
Ratio in %",TO_DECIMAL( SUM(ALLOCATED_SIZE)/1048576, 10, 2)
"Allocated Size in MB",TO_DECIMAL( SUM(FREE_SIZE)/1048576, 10,
2) "Free Size in MB" FROM M_SHARED_MEMORY WHERE ( CATEGORY =
'TABLE' OR CATEGORY = 'CATALOG' ) AND PORT LIKE '%03' GROUP BY
HOST, PORT;
If the result of "Reorganization Recommended" is "TRUE", then row
store memory can be reclaimed after row store reorganization.
o Estimation on maximum possible memory space that can be reclaimed:
SELECT SUM(NUM_FREE_DATA_PAGES)*16/1024 "Estimated Maximum
Memory Saving in MB" FROM SYS.M_DEV_MEMORY_SEGMENT WHERE
SEGMENT_TYPE = 0;
o Check disk space where log files are located.
SELECT (SUM(NUM_FREE_DATA_PAGES)*16/1024)*1.5 "Estimated Log
Volume Size in MB" FROM SYS.M_DEV_MEMORY_SEGMENT WHERE
SEGMENT_TYPE = 0;
Row store reorganization procedure
1. Make a complete database backup
2. Upgrade database to Rev50 or later
3. Make sure to start up database at least once during upgrade.
4. Shutdown HANA database.
5. Set up configuration parameter in indexserver.ini via HANA Studio.
[row_engine] page_compaction_enable = true
6. Restart the database. Startup will take longer than normal startup
when row store reorganization runs.
7. Check the memory fragmentation status after reorganization:
SELECT HOST, PORT, CASE WHEN (((SUM(FREE_SIZE) /
SUM(ALLOCATED_SIZE)) > 0.30) AND SUM(ALLOCATED_SIZE) >
TO_DECIMAL(10)*1024*1024*1024) THEN 'TRUE' ELSE 'FALSE' END
"Row store Reorganization Recommended", TO_DECIMAL(
SUM(FREE_SIZE)*100 / SUM(ALLOCATED_SIZE), 10,2) "Free Space
Ratio",TO_DECIMAL( SUM(ALLOCATED_SIZE)/1048576, 10, 2)
"Allocated Size in MB",TO_DECIMAL( SUM(FREE_SIZE)/1048576, 10,
2) "Free Size in MB" FROM M_SHARED_MEMORY WHERE ( CATEGORY =
'TABLE' OR CATEGORY = 'CATALOG' ) AND PORT LIKE '%03' GROUP BY
HOST, PORT;
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
21 of 49 Thursday 26 September 2013 05:59 PM
8. Check Indexserver trace
Please check the indexserver trace files after row store
reorganization is done.
Row store reorganization is performed in 11 phases when successful.
It prints out "[RSReorg] start" message at the beginning,
"[RSReorg] success" message followed by "Reorganization statistics"
at the end. When there are errors during reorganization, row store
reorganization is stopped in that phase and all the changes are
rolled back and database starts up to return to its original state
Ref: SAP Note 1813245 - SAP HANA DB: Row store reorganization before reorganization is run.
31) How to generate a runtime dump on SAP HANA saphostagent/sapdbctrl for Hana
SAP Support asks you to generate a runtime dump during a high CPU/Memory consumption
a) Log into the linux HANA host as sidadm user;
b) Run command 'hdbcons';
c) On the hdbcons console run command below:
> runtimedump dump
This will create a file under traces directory called 'indexserver....rtedump.trc'.
d) Attach generated trace file to the OSS Message
Or alternatively
hdbcons "runtimedump dump -f /test/rte_dump.txt"
More info check SAP OSS Note: 1813020
32) DBSL hints for SAP HANA
The following DBSL hints are available for SAP HANA.
o dbsl_equi_join
You can use this hint for a FOR_ALL_ENTRIES in order to inform the
DBSL that an EQUI join can be created from this FAE statement; this
EQUI join can then be resolved for an IN data set.
You must then specify this hint together with the hint of the DBI interface
(&prefer_join 1&) in the statement (see Note 48230).
ABAP
SELECT * INTO <rtab> FROM <table> FOR ALL ENTRIES IN itab
WHERE a = itab-a AND b = itab-b AND c = itab-c AND d = itab-d
%_HINTS HDB '&prefer_join 1&' hdb 'dbsl_equi_join'
From this, the system generates the following statement for the
database.
SQL for the database
select * from <table> where (a, b, c, d) IN
( (?, ?, ?, ?), ... (?, ?, ?, ?) )
o dbsl_add_stmt
Use: dbsl_add_stmt <SQL enhancement>
This hint provides you with the option of adding an additional SQL
enhancement to the SQL statement in the DBSL. This hint is resolved
in the DBSL and the system appends the following text to the end of
the statement that was generated (after the keyword
dbsl_add_stmt).
ABAP
SELECT node FROM <table> CONNECTION ('HANA') INTO TABLE T_NODE
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
22 of 49 Thursday 26 September 2013 05:59 PM
%_HINTS HDB 'dbsl_add_stmt WITH PARAMETERS (''expression'' =
''LEAVES("Node1")'' )'
SQL for the database
select node from table
with parameters ( 'expression' = 'leaves("Node1")' )
This hint is available in the following releases:
720 DBSL as of patch level 103
720-EXT DBSL as of patch level 103
803 DBSL
Note
In Release 7.20, you cannot use the keyword %_HINTS HDB to define the
hints for SAP HANA; instead, you must use the keyword %_HINTS ADABAS.
The database interfinterface ensures that this hint is also generated for an SAP
HANA Connection.
Ref: Useful OSS SAP Note 1622681 - DBSL Hints for Hana
33) hdbrename
http://help.sap.com/businessobject/product_guides/HAN01SP4/en/hana_sps4_HDB_server_inst_en.pdf
You can rename an SAP HANA database system as described in this section.
Caution:
Renaming a SAP HANA database system that is running with a permanent SAP license invalidates the
license so that the instance is locked down.
You need to request a new license key with the new system
ID and the new hardware key
(generated by renaming) in order to unlock the renamed system.
This especially impacts renaming in batch mode: since the renamed instance is locked down,
no other activities except license installation are then possible.
For more information, see SAP License Key.
Before performing the rename, you need to meet these prerequisites:
You identify an existing SAP HANA database system, created by an installation or a file system
copy, that is to be renamed.
The target system ID (SID) must not exist.
The target instance number must not exist.
You are logged in as the root user.
If a mountpoint contains the system ID, you must first rename it manually before performing the
rename of the SAP HANA database.
To rename the instances of a distributed system, you perform the rename for all hosts with a single call of hdbrename.
Renaming a System in Interactive Mode
Make sure that you meet the prerequisites in Renaming a SAP HANA Database System .
In interactive mode, the program queries all essential parameters that are not defined using
command line options as well as parameters that have invalid values.
a. Open a root shell.
b
. Via the local mount point, change to the following directory on the shared file system:
/<sapmnt>/<SID>/global/hdb/install/bin
c. Call the hdbrename program by entering this command:
./hdbrename
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
23 of 49 Thursday 26 September 2013 05:59 PM
d
. Specify the required data.
The system is now renamed.
34) hdbnsutil
Example Usage:
OSS Note 1738390 - How to update SAP HANA Linux server hardware key
When you have installed SAP HANA, you want to update the Linux server hardware key.
Prerequisite: You have logged on to Linux as SAP HANA instance administrator.
To update the hardware key, follow the procedure below:
Stop the SAP HANA DB instance
Remove line 'id=<a number>'
in /usr/sap/<SID>/SYS/global/hdb/custom/config/nameserver.ini
Execute 'hdbnsutil -convertTopology'
Start the SAP HANA DB instance
NOTE: Reinstallation of SAP HANA will generate a different hardware key,
but upgrade of SAP HANA will not change the hardware key.
35) hdbsrvutil - Example Usage
https://cookbook.experiencesaphana.com/bw/operating-bw-on-hana/hana-database-administration/troubleshooting
/sap-support/location-and-usage/
Collecting Location and Usage Information
There is a Python script which allows you to collect support information for customer systems
even when no access to the system via SQL is possible.
This information can be added to the support message.
The name of the Python script is fullSystemInfoDump.py and is part of a server installation.
It runs from a command line and is located in the directory $DIR_INSTANCE/exe/python_support (Linux).
To execute the script <sid>adm rights of the customer system are required.
To start the script out of its location directory, enter: python fullSystemInfoDump.py
By default the script creates a zip file with all of the collected support information to the directory
DIR_TEMP/system_dump where DIR_TEMP is the content of the variable with the same name in sapprofile.ini.
This output directory is shown as console output when the script is running, but it can be looked up by entering:
hdbsrvutil -z | grep DIR_TEMP=
To change the default directory, an explicit absolute path can be given to the script, for example:
python fullSystemInfoDump.py <output_dir>
Usage information can be displayed by entering:
python fullSystemInfoDump.py h
To collect support information you need an SQL user with rights to select the system tables and
views listed in System Tables/Views.
For security reasons the user name and password for this SQL user cannot be given as command
line parameters to the script.
If the customer system can be reached via SQL and the user name and password information is valid,
the script starts collecting support information. If user name and/or password are invalid, the script aborts.
If the customer system cannot be reached via SQL the script only collects information which can be
read without SQL access. The resulting zip file name has the following structure:
fullsysteminfodump_<SAPLOCALHOSTFULL>_<SAPSYSTEMNAME>_<YYYY>_<MM>_<DD>_<HH>_<MM>_<SS>
SAPLOCALHOSTFULL and SAPSYSTEMNAME are again taken from sapprofile.ini.
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
24 of 49 Thursday 26 September 2013 05:59 PM
36) Show Hana Processes HDB proc & HDB info
HDB proc
HDB info
eg /usr/sap/HDB/HDB00/HDB info
37) Hana System Management SQL Administration Statements Reference
http://help.sap-ag.de/hana/html/_csystem_management_statements.html
38) Hana SQL Reference Manual
http://help.sap-ag.de/hana/html/sqlmain.html
39) SAP Hana SQLScript Reference
http://help.sap.com/hana/hana_dev_sqlscript_en.pdf
40) SAP Hana Technical Operations Manual
http://help.sap.com/hana/hana_tom_en.pdf
41) SAP Hana Administration Guide
http://help.sap.com/hana/hana_admin_en.pdf
.
42) SAP HANA Administration tables/views
A great blog by Balaji Rajendran explaining some of the most important HANA tables/views required for
administration
http://scn.sap.com/community/hana-in-memory/blog/2013/05/29/sap-hana-administration-tablesviews
43) The time stamps for the "Start Time" in Data Provisioning of HANA Studio are UTC
time
The time stamps are supposed to be displayed as UTC time in Data Provisioning of HANA Studio.
It was a design decision to use UTC time to allow the replication schema to accommodate systems
from differing time zones. Using UTC time simplifies this task as then it is not necessary to
consider the time zone for each of the connected SLT and their respective source systems. The
time stamps you see in Data Provisioning match the internal time stamps which are used in the
replication process on each connected SLT system.
The system works as designed.
1861325 - HANA: "Start Time" of replication on all tables are UTC time in Data Provisioning of HANA Studio
44) How to Check SUSE Linux Distribution Version and Patch Level
If you are not sure which SUSE distribution you are using, execute the following
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
25 of 49 Thursday 26 September 2013 05:59 PM
command to identify the release version and patchlevel.
cat /etc/SuSE-release
If you are running on SLES 11 SP2 the following values should be shown:
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 2
44b) How to View the SAP Hana Edition & Revision
To view which revision of SAP Hana you are using go to /usr/sap/<SID>/lm_structure and view the
landscapeDescription.xml file
45) Remove the SAP HANA Extended Application Service (SAP HANA scriptserver)
from the topology of your SAP HANA database
You want to remove the SAP HANA Extended Application Service (SAP HANA
scriptserver) from the topology of your SAP HANA database (DB) because you do not
use any applications that require SAP HANA scriptserver.
Or you would like to restore the backup created when the SAP HANA script server was not activated.
You must not simply stop the SAP HANA script server service. Since it has its own persistency,
it is relevant for backups. A data backup fails if the SAP HANA scriptserver volumes are still
entered in the topology but the service is not running.
Carry out the following steps to stop SAP HANA script server and remove SAP HANA scriptserver from the topology:
o Stop all the applications that use the database. This is required
because a new data backup has to be created after you remove SAP
HANA scriptserver. A log replay over the time of the service
removal is not supported.
o Determine all the hosts on which SAP HANA scriptserver services
are active:
select host from m_services where service_name ='scriptserver'
o Determine the volume ID of the SAP HANA scriptserver services:
select VOLUME_ID from m_volumes where service_name =
'scriptserver'
o Stop the SAP HANA scriptserver services. To do this, carry out
the following command for every <host name> with an SAP HANA
scriptserver service:
ALTER SYSTEM ALTER CONFIGURATION ('daemon.ini', 'host', '<host
name>') UNSET ('scriptserver','instances') WITH RECONFIGURE
o Remove the SAP HANA scriptserver service entry from the topology.
To do this, carry out the following command for every <host name>
with an SAP HANA scriptserver service:
ALTER SYSTEM ALTER CONFIGURATION ('topology.ini', 'system')
UNSET ('/host/<host name>', 'scriptserver') WITH RECONFIGURE
o Remove the volumes from the topology. To do this, carry out
the following command for every <volume_id> of an SAP HANA
scriptserver service:
ALTER SYSTEM ALTER CONFIGURATION ('topology.ini', 'system')
UNSET ('/volumes', '<volume_id>') WITH RECONFIGURE
Caution: It can be a risk to make changes to the topology.
Therefore, carefully check the host and the volume ID.
o Create a new data backup.
o Start the applications that use the database.
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
26 of 49 Thursday 26 September 2013 05:59 PM
Ref: 1867783 - XFS Data Inconsistency Bug with SLES 11 SP2
46) HANA Alerts related to File System Utilization
Statisticserver alerts are triggered on HANA side:
Hana Alert 2 - Disk usage
Hana Alert 30 - Internal disk-full event
Hana Alert 50 - Number of diagnosis files
Hana Alert 51 - Size of diagnosis files
Volume Size vs. Disk Usage
In general, two types of storage space utilization have to be distinguished: Disk (file system)
usage and space consumed (internally) in the volumes attached to the HANA database.
Both aspects are summarized in the overview tab in HANA studio
Total Disk Usage represents the file system point of view and is identical to what
OS commands like 'df' are displaying:
df -h
/dev/sdd1 99G 32G 63G 34% /hanamnt/data/HDB
/dev/sde1 50G 3.7G 44G 8% /hanamnt/log/HDB
/dev/sdf1 30G 19G 9.3G 67% /hanamnt/HDB
Volume size refers to the size of the HANA volumes on file system level
This is effectively the output of the following SQL statement:
select v1.host, v1.port, v1.service_name, v1.volume_id,
v1.subpath, v2.data_size, v2.log_size, d.disk_id,
d.device_id, d.path, d.usage_type, d.total_size,
d.used_size
from (
( m_volumes as v1 join M_VOLUME_SIZES as v2 on v1.volume_id = v2.volume_id )
right outer join
m_disks as d on d.disk_id = v2.disk_id
)
If there is a huge difference between Volume Size and Disk Usage, this would
indicate that a lot of space on files system level is consumed by files not related
to data volumes, log volumes or trace files. In this example, this is true for the
trace volume. All trace files together just consume around 100 MB, but consumed
disk space is actually close to 19 GB:
select sum(file_size) / 1024 / 1024 as size_mb from m_tracefiles
SIZE_MB
117,222
In cases like this, the 'du' command, executed against the file system in question,
can reveal the root cause:
du -hS /hanamnt/HDB | awk '{print $1 $2}' | sort -h +0 -1
259M/hanamnt/HDB/hdbstudio_update/repository/plugins
620M/hanamnt/HDB/hdbclient
797M/hanamnt/HDB/global/hdb/custom/config/lexicon/lang
7.4G/hanamnt/HDB/exe/linuxx86_64/HDB_1.00.51.374135_1005022
7.9G/hanamnt/HDB/exe/linuxx86_64/HDB_1.00.55.376513_1078043
The file system containing the trace files also contains the executables of HANA software
(present and previous version), hence the difference in volume and disk usage.
Volume Size and Volume Utilization
Data Volumes
If the percentage of unused space is high, shrinking the volume can be considered.
The relevant system management command is outlined in SAP HANA Reference:
ALTER SYSTEM RECLAIM DATAVOLUME.
In order to find out which column store tables are occupying most of the space inside the volumes
you can use the following SQL statement:
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
27 of 49 Thursday 26 September 2013 05:59 PM
select top 30 table_name, sum(physical_size) from M_TABLE_VIRTUAL_FILES
group by table_name
order by 2 desc
Log Volumes
The number of log segments that consume space can either be determined using HANA Studio
or using SQL statements against view M_LOG_SEGMENTS
SAP note 1679938 explains how to free space in case that the log volume is full.
Trace Files
If the trace files are contributing to the disk usage of the file system where they are located
(see section Volume Size vs. Disk usage), then 2 cases have to be distinguished:
Space consumed by a large number of files that are not exceptionally large or
Individual files that are significantly larger than expected.
The number and size of existing trace files is influenced by the following factors:
(1) Activated trace components. This can be verified by using the following SQL statement:
select distinct("SECTION") as "TRACE"
from SYS.M_INIFILE_CONTENTS where (("SECTION"='trace')
or ("SECTION"='sqltrace' and "KEY"='trace' and "VALUE" = 'on')
or ("SECTION" like 'traceprofile_%')
or ("SECTION" = 'expensive_statement' and "KEY"='enable' and "VALUE" = 'true'))
and "LAYER_NAME" = 'SYSTEM'
(2) Incorrect configuration of trace file rotation:
The relevant parameters are maxfiles and maxfilesize
(see HANA administration guide chapter 'Configuring Trace File Rotation')
ref: 1870858 - HANA Alerts related to files system utilization
47) Log Volume is Full and the Database Doesn't Accept Any New Requests
If the log_mode is set to legacy the logvolume keeps all log segments since the last full backup in the logvolume.
If no backups are performed the logvolume can run out of space.
Solution
1. Stop the database:
HDB stop
2. Change into the folder mnt00001 of the logvolume (Default: /usr/sap/<SID>/global/hdb/log):
cd /usr/sap/<SID>/global/hdb/log/mnt00001
3. You have to move one of the logvolumes temporarily to another volume where enough space is available.
You should free at least 2 GB of space to ensure that the database has enough space to start.
To find out the space consumption of each volume execute:
du -sh *
4. Move a volume which consumes at least 2 GB of space (e.g. hdb00003)
to a volume with enough free space,
e.g. to the data volume (Default: /usr/sap/<SID>/global/hdb/data):
mv hdb00003 /usr/sap/<SID>/global/hdb/data
5. Create a symbolic link to the new folder in the old location:
ln -s /usr/sap/<SID>/global/hdb/data/hdb00003 /usr/sap/<SID>/global/hdb/log/mnt00001/hdb00003
6. Start the database (HDB start) and perform a backup
7. Use the following SQL-Statement to clean up the logvolume:
ALTER SYSTEM RECLAIM LOG;
8. Stop the database again and remove the symbolic link:
rm -f /usr/sap/<SID>/global/hdb/log/mnt00001/hdb00003
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
28 of 49 Thursday 26 September 2013 05:59 PM
9. Move the log volume back to its original location:
mv /usr/sap/<SID>/global/hdb/data/hdb00003 /usr/sap/<SID>/global/hdb/log/mnt00001
10. Start the database (HDB start)
ref: 1679938 - Log Volume is full (log mode = legacy)
48) Using the REGI Tool to Deploy Content for Delivery Units for example Translated
Texts
HANA content is organized in software components called "delivery units" ("DUs").
DUs are distributed in the physical form of DU-TAR-GZ-files.
As for texts (e.g. view column descriptions), the DU TAR-GZ-files contain only the
texts in the original language (typically, English), but no translated texts (e.g. for German, Chinese etc.).
Translated texts for DUs are distributed in the form of Languages-DU-TAR-GZ-files.
At the moment (HANA SP5/revision 45), those cannot be imported using the SAP HANA Studio.
To deploy translated texts, the command line tool "Regi" can be used.
"Regi" is bundled with the HANA client installation (it is also bundled with the HANA server installation).
Note that Regi is only included in the 64bit Windows and Linux versions of the HANA client.
Here is a step-by-step guide to deploy translated texts using Regi:
1) Start a command line window and navigate to the folder of your HANA client installation.
On Windows, the default location is:
C:\Program Files\sap\hdbclient
On Linux, the default location is:
/usr/sap/hdbclient
2) Set the user, password, host and port of the connection to the HANA system using environment variables.
On Windows, the commands are:
set REGI_HOST=<host>:3<instance>15
set REGI_USER=<user>
set REGI_PASSWD=<password>
where "<instance>" is a two-digit number identifying the instance number of the HANA system.
On Linux (bash), replace the command "set" with "export":
export REGI_HOST=<host>:3<instance>15
export REGI_USER=<user>
export REGI_PASSWD=<password>
3) Import the Languages-DU-TAR-GZ-file with the following command:
regi import languages <Languages-DU-TAR-GZ-file>
Note that further help for the REGI command can be accessed as follows:
regi help import languages
ref: 1805967 - Deployment of Translated Texts for Delivery Units
49) Homogeneous System Copy on SAP HANA
This is the procedure of the homogeneous system copy of SAP HANA using backup and recovery.
The prerequisites are that you have installed an SAP system with SAP HANA as the primary database
and you have installed SAP HANA Studio in which the database that is to be copied is set up as a system.
The version of the SAP HANA database server must be at least Version 1.00 Revision 28.
For carrying out the system copy, you must use SWPM 1.0 Support Package 1 or higher.
The scenario for this reference example is: You want to copy the BW system PRD connected to the database
PR1 to the BW system DEV connected to the database DV1. The name of the ABAP schema in PR1 is SAPPRD.
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
29 of 49 Thursday 26 September 2013 05:59 PM
Therefore, PRD is the source system (the system that is to be copied), PR1 is the source database (the database
system that is to be copied), DEV is the target system (the copied system), and DV1 is the target database
(the target database system). SAPPRD is the (database) schema (the schema name) or the database user of the
system.
Procedure
1. Use SAP HANA Studio to create a database backup.
For a full description of the procedure and the SAP HANA backup options, refer to
SAP HANA Database - Backup and Recovery Guide on SAP Help Portal.
a) In SAP HANA Studio, right-click the database system that is to be copied and choose "Backup...".
b) If possible, select "Complete Data Backup" as the Backup Type and "FILE" as the Device Type.
Under Location, enter a directory in which the backup files are to be stored and enter a prefix for the
backup files under Backup File Prefix.
Ensure that the backup directory contains sufficient free space for the backup and that no backup that
has the same prefix already exists there. Then choose "Next".
c) Check your entries and choose "Finish" to start the backup or choose "Back" to correct your entries.
d) Wait until the backup has been created and then close the dialog box.
2. Transfer the backup to the target system.
a) Copy all backup files to the standard backup directory of the target database system. The backup files
are saved in the standard backup directory of the source database system and begin with the prefix
entered in step 1. The standard backup directory is defined in the database parameter
global.ini -> persistence -> basepath_databackup.
3. Use SWPM to import the backup.
a) Start SWPM.
b) Choose <Your Product> -> <Your Database> -> System Copy -> Target System -> <System Variant> ->
Based on <Technical Stack> -> Standard System.
c) Follow the dialogs.
d) In the dialog SAP System Database,
choose Homogeneous System Copy (SAP HANA-specific Backup/Recovery).
e) In the Database Schema dialogs, enter the schema names and the passwords that match the data
in the backup. For example, if you install a system DEV and use a backup of the system PRD for the
installation, you must specify SAPPRD as the schema in the dialogs but not SAPDEV.
The same applies to the DBA Cockpit schema.
f) In the dialog Database Recovery, enter the name (prefix) of the backup. In addition, you can specify
whether you want the system to check whether the backup exists. If this check is deactivated and the
backup does not exist, the installation will terminate with an error at a later time. You also have to specify
the password of the <SID>adm user of the database and the SAPControl URL. The system prefills the
SAPControl URL; it usually does not have to be changed.
4. Installation
a) After you complete the following dialogs, you can start the installation.
b) During the installation, the system may issue an error message such as:
Error during execution of HdbCmdClazz 'ABAP_PRE_LOAD_EXECUTION'
com.sap.hdb.core.main.cmd.HdbCmdMain
Error during execution of SQL command:
ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini', 'SYSTEM' ) SET
('distribution', 'client_distribution_mode') = 'statement' WITH RECONFIGURE SAP
DBTech JDBC: [437]: only commands for license handling are allowed in current state:)<(><<)>(><<(>
<<)>)>/
In this case, a new license is required for the target database.
This license must be implemented manually using the SAP HANA Studio.
To do this, right-click the target database system in the SAP HANA Studio and choose "Properties".
In the subsequent dialog, choose "License" and then choose "Install License Key".
Select a valid license for the target database and confirm your selection with "OK".
As soon as the license has been installed successfully, you can proceed with the installation in
the SWPM by choosing "Retry".
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
30 of 49 Thursday 26 September 2013 05:59 PM
5. Additional adjustments after the installation
a) Check the secondary database connections.
After you copy the database, the target system has the same database connections (for example, for the DBA
Cockpit)
as the source system; this may cause problems.
Therefore, you must check the database connections in transaction DBCO and adjust them if required.
b) Check the RFC connections.
After you copy the database, the target system has the same RFC connections as the source system;
this may cause problems.
Therefore, you must check the RFC connections in transaction SM59 and adjust them if required.
c) Check the spool configuration.
After you copy the database, the target system has the same spool configuration as the source system.
Therefore, you must check the spool configuration in transaction SPAD and adjust it if required.
6. The system copy is now complete.
ref: OSS Note 1763333 - Homogeneous system copy on SAP HANA
50) HANA License Key Request and Installation
To request your license key, always access SAP Service Marketplace at http://service.sap.com/licensekey
(this is a simple and safe way to request your license key).
Data required for the license key request:
Installation number, system ID, system type, SAP product, product version, hardware key,
operating system, and main memory amount
The incoming requests are processed automatically within a few hours
(maximum processing time: three working days).
Determining the hardware key and the SID
This information is displayed in the SAP HANA Studio on the attributes page of the system.
Perform the following steps to read this:
In the SAP HANA Studio, select your system in the Navigator and choose the option to display
the attributes in the context menu of the system.
In the navigation area, choose the option to display the license.
Note that you require the system authorization LICENSE ADMIN to access this page.
License key request
Proceed as described below to create a license key request on
SAP Service Marketplace at service.sap.com/licensekey.
On the "Request license keys" tab page, choose either "Search an installation" or
"select it from a list" and search for an ERP or an SAP NetWeaver installation.
In the installation list, you can enter the installation number directly in the blank field in the
column for the installation.
Alternatively, you can also use the installation search. Here, the system displays all of the
installation numbers for which you have to request the license key authorization.
License key request for a new SAP HANA database
Choose "New system" and enter all required data.
To proceed to the hardware data, choose "Continue".
Enter your hardware key, the amount of main memory (in GB), and the validity date.
You can also split your acquired SAP HANA license (total amount) over several instances
(also over several installation numbers).
Choose "Save" to save your entries.
Choose "Continue" to display all the system data again.
Enter your e-mail address and choose "Send".
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
31 of 49 Thursday 26 September 2013 05:59 PM
If the required amount of main memory exceeds the licensed amount, the license key is reduced
by the difference accordingly so that, at the most, the licensed amount can be called. If the entire
amount has already been called, only temporary keys are issued.

Therefore, always check how much main memory you have currently licensed by contract.
For test and development systems, you can request license keys as required.
These license keys are permanent and contain the licensed memory amount number for each request at the most.
Downloading the license key
In this system overview, click the required system ID under an installation number.
Choose "Continue" and select the relevant entry.
Choose "Display license script" and "Download to PC".
You can then choose "Open - File - Save as" to save the license key file directly to your host.
Installing the license key
You can install a permanent license key, which you received by e-mail or download, in your
SAP HANA database only by using SAP HANA Studio.
The prerequisite for this is a database user with the system authorization LICENSE ADMIN.
Carry out the following steps to do this:
In SAP HANA Studio, navigate to the properties page of the database for which you have
requested the license key.
On the properties page, choose the button for installing the license key.
Navigate to your license file and select it.
After a successful confirmation, the properties page of the system is updated with the new license
information if this is valid for the database.
Another option of installing a license key is to use the SQL command line of SAP HANA Studio.
In this case, you also require a database user with the system authorization LICENSE ADMIN,
who can install a license key with the following SQL command:
SET SYSTEM LICENSE '<Content of license file>'
Note that you must use the complete content of the license file, including the line breaks, for this command.
If the specified license data is correct and corresponds to the database (hardware key, system ID),
the license is updated in the database, and you can verify it in the system view M_LICENSE.
Emergencies
If a production standstill occurs, you can create a message with priority 1 under component XX-SER-LIKEY to
request a temporary license key that is valid for one week.
The following data is required for the license key to be issued:
System ID, hardware key, and installation number.
The key is issued immediately. Request a permanent license key within this week.
ref: Note 1644792 - License key req./installation SAP HANA databases (HANA SPS3)
51) HANA Architecture - Multiple HANA db's Databases on One Hana Appliance
Latest Update: 14th June 2013 - this can be subject to change
Definition: "SAP HANA appliance": "SAP HANA appliance" means a
single SAP HANA node server or a scale-out cluster of multiple server nodes
within one logical SAP HANA system.
This described scenario has also been called Multiple Components One System
(MCOS) in regards to other SAP applications. The term "SAP HANA system" is
used interchangeably with the term "SAP HANA appliance".
In this context, some new terms are introduced: "Multiple DBs One HANA"
(MDOH), and "Multi-SID".
SAP's Support Status:
Important: When considering the support status, bear in mind that the
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
32 of 49 Thursday 26 September 2013 05:59 PM
items in the "special considerations" section which follows must be taken
into account.
SAP does not support running multiple SAP HANA databases on a single
production SAP HANA appliance.
SAP does support running multiple SAP HANA databases on a single
non-production (DEV, QA, test, etc) single-node SAP HANA appliance.
While SAP HANA is delivered by the hardware partners with one DB installed,
additional DBs can be installed by an SAP consultant who has access to SAP
internal documentation for this purpose.
SAP does support multiple DBs on a distributed (multi-node)
non-production SAP HANA system as an SAP-managed project solution.
Additionally., SAP plans to offer generally available support for this in the
near future; this note will be updated when this status changes.
Special Considerations:
Please ensure that your system is sized appropriately for any additional
DBs that you wish to deploy. SAP recommends working closely with your
hardware partner to ensure adequate capacity planning.
Please be aware that running multiple DBs on one SAP HANA system may impact
performance of various types of operations, as contention for memory
resources may occur.
This performance impact may appear despite adequate sizing.
Note this multiple DB one SAP HANA configuration is only available
for non-production SAP HANA systems, where consistently fast performance is
generally not as critically important as with production systems.
If performance issues arise when running multiple DBs on one SAP HANA
system, stop all but one of the DBs and see if the performance issue
persists.
SAP support have stated they will only address the performance issue only if it exists
when only one DB is running on the SAP HANA system.
ref: SAP Note 1681092 - Support for multiple SAP HANA databases one HANA
52) HANA Architecture - HANA MCOD Multiple Applications or Business Suite
Scenarios & Components Running on one SAP HANA System
Latest Update: 14th June 2014
While there are some important exceptions, in general, SAP generally does
not currently support the deployment of multiple applications (or scenarios)
within a single SAP HANA system in a Production environment.
Also note this means that SAP generally does not support a packaged application
from SAP residing together in the same SAP HANA system as the scenario "Custom Data Marts".
The following applications can run together with other applications on one Production SAP HANA system
"Custom Data Marts"
SAP CO-PA Accelerator
ERP Operational Reporting with SAP HANA
SAP Finance and Controlling Accelerator: Material Ledger
SAP Finance and Controlling Accelerator: Production Cost Planning (aka"CO-PC Accelerator")
"SAP NetWeaver BW powered by SAP HANA (BW on HANA). For more information,refer to SAP note
1666670.
SAP Suite Accelerator (aka "Application Acelerator")
Things to take into consideration when running multiple components on one Hana system
Upgrades and patches:
- Applying SAP HANA support packages and revisions will affect all
applications residing within the SAP HANA database or utilizing other SAP
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
33 of 49 Thursday 26 September 2013 05:59 PM
HANA components.
- Applications deployed on a single SAP HANA may have to be patched and/or
upgraded at the same time due to direct dependencies on SAP HANA patch
levels.
- Packaged Applications releases, support packages or patches may have
direct dependencies on SAP HANA revisions, patches and support packages.
- Packaged applications may have independent release cycles to SAP HANA and
may have independent timeline for support of SAP HANA release levels and
support packages.
Resource allocation and capacity planning:
If you are running multiple applications on one SAP HANA system, there is a
risk that one application's processing operations could consume a
significant amount of available CPU and memory resources, thereby reducing
the amount of such resources available for the processing operations of the
other applications at a given point in time. Such contention for system
resources may negatively impact performance of any one application's
processing operations. Therefore, you must consider one application's
impact on another.
An additive sizing approach is required for all applications running on a
single SAP HANA system. This means that when performing capacity planning,
you must determine the resource allocation needs for each application, then
add them together to estimate the required sizing for your SAP HANA system.
It is important to avoid underestimating sizing, as this will help mitigate
the risk of performance issues due to contention for system resources.
System Management, Workload Management and Monitoring:
SAP HANA monitoring, debugging and support tools are not individual
application or schema-specific, they are supported at the SAP HANA database
level.
SAP HANA scale out distribution options (including node fail over) is
offered at the database level, not at an individual application or
component level.
Stopping and starting the database is a database wide operation.
Backup & Recovery:
- Backup and Recovery is currently supported only at the SAP HANA database
and component level (e.g. SLT, Data Services) and not at a specific
application level in an MCOD scenario. This means that a point-in-time
recovery for the SAP HANA system will impact all applications residing on
that SAP HANA system.
Please note that various point-in-time recovery scenarios (recovering SAP
HANA or recovering a connected SAP Business Suite system) will likely
entail re-initializing and re-loading replicated data into SAP HANA.
Depending on data volume, this could be a time-consuming process.
Lifecycle management:
- All applications should be isolated from each other in separate database
schemas.
- System copies of applications are not available at an individual
applications level.
High Availability & Disaster Recovery:
- HA and Disaster Recovery is currently supported only at the SAP HANA
database and component level (e.g. SLT, Data Services) and not at a
specific application level.
Security:
- Customers are responsible for implementing security models to protect
and/or isolate application artifacts (e.g. users, data, metadata, database
objects)
Production support systems ("Break fix systems") and Quality assurance system:
- It is recommended that "break fix" and QA systems have the same
configuration as the production system so that customers can replicate
issues and test corrections in systems that are representative of the
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
34 of 49 Thursday 26 September 2013 05:59 PM
production environment.
ref: SAP Note 1661202 - Support for multiple applications on SAP HANA
53) HANA Architecture: How To Copy a Multiple-Host SAP HANA Database onto Single
Host HANA System
1. Create a data backup of the source database.
More information: SAP HANA Backup and Recovery Guide, available on SAP Help Portal
2. Check that there is sufficient disk and main memory capacity on the
target database host.
The available main memory should be able to hold at least twice the
size of your row store data.
To find out how much this is, execute the following SQL statement:
select sum(allocated_page_size) from M_CONVERTER_STATISTICS where type
= 'RowStoreConverter';
The result is the total size in bytes. Multiply this value by 2 to
obtain the absolute minimum size of main memory required.
More information: SAP Note 1514966
3. Configure additional indexservers on the target database.
The total number of index servers on the target database must be the
same as on the source database. (The number of index servers is
normally the same as the number of hosts.) Thus additional index
servers must be configured in your target database.
To configure additional index servers, you need to change the
daemon.ini file.
To change the daemon.ini file, execute the following statement (for
example, with instanceids 40 and 42):
alter system alter configuration('daemon.ini','system')
set('indexserver.c','instanceids')='40,42' with reconfigure;
This statement adds entries such the following to the daemon.ini file:
[indexserver.c]
instanceids = <ID1>,<ID2>,...
<ID1> and <ID2> must be even numbered ports starting at 40 with an
interval of 2. For example, for a triple host source system, you would
need two additional instanceids and you can use 40, 42, ...
4. Check that the additional index servers are configured in your target
instance.
In SAP HANA studio, go to the Landscape tab.
The additional index server processes should be dislayed.
The description indicates which are the added index servers ("HDB Tenant
Index Server on Port 300<ID>", where <ID> corresponds to the
instanceids you selected earlier).
5. Shut down the target database.
6. Move or delete available data and log backup files from the target database.
7. Move or delete the backup catalog files, if they exist:
$(DIR_INSTANCE)/../SYS/global/hdb/metadata/
BackupCatalog.xml
$(DIR_INSTANCE)/../SYS/global/hdb/metadata/
BackupCatalog_Recover.xml
8. Copy the data backup files and, optionally, the log backup files from
the source database to the corresponding directories in the target database.
Note:
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
35 of 49 Thursday 26 September 2013 05:59 PM
The directories for data and log backup are defined by the parameters
basepath_databackup and basepath_logbackup in the global.ini file.
9. Start the recovery of the target database system.
In SAP HANA studio, select the target database system and choose
Recovery... from the context menu.
10. Select a recovery type.
For example, Recover the database to its most recent state.
11. Choose Next.
12. Check that the specified default locations of the data and log backup
files for the target database matche the backup files that you have
copied.
13. Select the option Initialize log area and confirm the warning.
14. Select the option Install new license and specify the license file.
15. Choose Next.
16. Choose Finish to start the recovery.
ref: SAP Note 1749467 - Copying SAP HANA From a Multiple- to a Single-Host System
54) HANA Architecture - SAP Business Suite Powered by SAP HANA - Multi-Node
(Scale-Out) Support
[Latest update: 17/06/2013]
HANA multi-node configurations are used for different purposes:
a) High-availability with standby nodes
b) Scaling memory (scale-out)
See also chapters 10 and 14.3 of the HANA Administration Guide (http://help.sap.com
/hana/hana_admin_en.pdf).
The following restrictions for usage of
SAP EHP 6 for SAP ERP 6.0, version for SAP HANA
SAP EHP 2 for SAP CRM 7.0, version for SAP HANA
SAP EHP 2 for SAP SCM 7.0, version for SAP HANA
apply:
a) High availability scenarios in a multi-node cluster with a standby-node are
released for the Suite on HANA, but are restricted to the simplest case of two
servers (one worker, one standby) only, since scale-out in general is not yet
supported for Suite on HANA.
b) Scale-out scenarios with multiple worker nodes to scale memory are not
yet released for Suite on HANA.
It is recommended to scale-up memory by using a hardware configuration that
maximizes the available database memory.
ref: OSS Note 1825774 - SAP Business Suite Powered by SAP HANA - Multi-Node Support
54b) Hana Architecture - Guidance from IBM and SAP for High-end customer
landscapes based on SAP HANA
Attention has been drawn to this document by Hana Distinguished Engineer and SAP Mentor Tomas Krojzl .
This document is guidance for large Customers implementing Hana.
The document is a must read for all Hana Basis Architects involved in Hana implementations.
High-end customer landscapes based on SAP HANA - http://public.dhe.ibm.com/common/ssi/ecm
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
36 of 49 Thursday 26 September 2013 05:59 PM
/en/xsw03129usen/XSW03129USEN.PDF
54c) Hana Architecture - SAP Hana Landscape Redistribution with SP6
this section is under construction and and will be based upon Jochen Becker 's excellent blog
SAP HANA Landscape Redistribution with SP6
55) How To Overcome the Hana Hardware Check Or Hardware Not Recognized Errors
During Installation
You have received new hardware from your Hardware-Partner for your SAP HANA
appliance or recently bought a new SAP HANA on top of new hardware.
When installing the newest SAP HANA Revision the hardware check fails for your
hardware configuration.
Beginning with SAP HANA Revision 18 a new Hardware check is mandatory when
executing the SAP HANA Installer.
The reason for this check is the elimination of problems due to wrong or unsupported
Hardware configurations in combination with the SAP HANA appliance.
Since hardware validation is a continuing process as new hardware becomes available
on the market, the check for allowed configurations will change over time to include
newly certified hardware.
When installing any SAP HANA Revision your new hardware may not be recognized
by the check, because it was not yet included at the corresponding release date.
The solution to this problem is, to go to OSS Note
'1658845 - Recently certified SAP HANA hardware not recognized'.
Attached to that note you will find the most recent version of the Hardware Check
including all validated hardware.
Before triggering the installation again please replace the file
'HanaHwCheck.py'
in the
'server\linuxx86_64\SAP_HANA_DATABASE\server'
subdirectory of your SAP SMP download with the version attached to this note.
ref: OSS 1658845 - Recently certified SAP HANA hardware not recognized
56) SAP Hana and the SLD System Landscape Directory
For the receiving SLD to display the HANA database as the CIM instance
"HANA Database System" (SAP_HDBSystem), the SLD must meet the prerequisites
specified in Note 1649323.
If the SLD does not meet the pre-requisites then it is necessary to apply the
Java patches to the SLD according to OSS Note 1649323.
To successfully register the SAP HANA Database in the SLD use either:
- sldreg, following the HANA Installation Guide with SAP HANA unified installer,
page 46, chapter 2.3.7.5 Configuring a SAP HANA System to Connect to
System Landscape Directory (SLD)
You can use the hanaconfig program to configure a SLD connection.
For more related information, see SAP notes 1673424 and also 1649323.
Make sure you meet these prerequisites:
You identify the existing system, created by an installation or a file system copy, that is to be
configured with SLD.
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
37 of 49 Thursday 26 September 2013 05:59 PM
You mount the DVD with the HANA configuration tool, which you can find at the following location
on the SAP HANA DVD:
<HANA_DVD>\DATA_UNITS\HANA_IM_LINUX__X86_64
You are logged in as the root user
Configuring Connection to SLD in GUI
In GUI mode, you are prompted to enter the required parameters.
If you specify the host name, make sure that it is fully qualified, such as:
myhost.sap.com (not just myhost).
1. Connect to the system with an X server client to enable GUI system access.
2. Open a root shell and go to the directory where you mounted the SAP HANA DVD, by entering a
command like the following:
cd /mnt/ <HANA_DVD>/DATA_UNITS/HANA_IM_LINUX__X86_64
3. Call the script in GUI mode:
./hanaconfig.sh gui
The wizard starts.
4. Choose Configure SLD Connection, then Next . Follow the instructions of the wizard.
Configuring Connection to SLD in Interactive Mode
Before you continue, make sure that you meet these prerequisites:
You are logged on to the host where the server software is installed.
You are logged on as the root user.
In interactive mode, the program queries all essential parameters that are not defined using command
line options and if invalid parameters are entered the program interrupts the process.
1. Open a root shell.
Running SAP HANA Unified Installer
2. Go to the following directory:
cd /mnt/<HANA_DVD>/DATA_UNITS/HANA_IM_LINUX__X86_64
3. Enter the following command:
./hanconfig.sh sldconfig
4. Specify the data requested by the program.
Configuring Connection to SLD in Batch Mode
Before you continue, make sure that you meet these prerequisites:
You are logged on to the host where the server software is installed.
You are logged on as the root user.
In batch mode, you specify all required values using command line options. If you omit required values
or specify invalid values the program interrupts the process.
1. Open a root shell.
2. Go to the following directory:
cd /mnt/<HANA_DVD>/DATA_UNITS/HANA_IM_LINUX__X86_64
3. Run the hanaconfig program in batch mode using the sldconfig task:
./hanconfig.sh --batch sldconfig <sldconfig options>
For the list of all available options, you can call the tool help, by entering ./hanaconfig --help
4. Specify the data requested by the program.
- RZ70
ref: 1871902 - Cannot find registered HANA DB system in the Technical Systems view of the SLD
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
38 of 49 Thursday 26 September 2013 05:59 PM
57) SLD configuration for multiple SAP HANA databases
SAP HANA On-site Configuration does not support multiple systems installed
on appliance. This limitation is related only to the SPS04 release. In
SPS05 the On-site Configuratio supports multiple systems on single SAP HANA
appliance.
If you need to configure SLD connectivity for multiple systems in SPS04 the
best approach is to update the systems and the On-site Configuration tool
to SPS05. In this way you will have system and tools with the correct and
integrated behaviour.
If this is not possible you can configure the SLD connection manually by
using the sldreg tool.
Example:
su <sid>adm -l -c '"/usr/sap/<SID>/SYS/exe/hdb/sldreg" -configure
"/usr/sap/<SID>/SYS/global/slddest.cfg"'
Replace <SID> with the SID of your system.
For addtional SLD configurations you can take a look in the SAP HANA
Database # Administration Guide on http://help.sap.com/hana_appliance.
ref: OSS Note 1787755 - SLD configuration for multiple SAP HANA databases in SPS04
58) How To Handle Common SAP Hana Alerts
this section is in progress
59) Solution Manager Diagnostics Agent Installation On SAP Hana Systems
this section is in progress
60) Optimal Settings for Suse Linux SLES 11 SP2 and SLES 11 for SAP SP2
this section is in progress
61) Forward Port 80 to XS Engine (8080)
Thanks to Paul Aschmann Paul Aschmann Paul Aschmann for this contribution
This is helpful if you would like your web app to be available on the default/standard HTTP port
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8000

62) XS Engine Debug / Developer Mode

Thanks to Paul Aschmann Paul Aschmann Paul Aschmann for this contribution
Enable the developer mode which provides details on execution/runtime errors when helps during
development (rather than getting generic 500 errors).
From HANA Studio, open Administration
-> Configuration

-> xsengine.ini
-> httpserver
-> developer_mode = true
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
39 of 49 Thursday 26 September 2013 05:59 PM
Average User Rating
(18 ratings)
0
Tweet Tweet 9
Appendix - Useful Documentation
The SAP NetWeaver Basis Administrator's Toolbox contains the longest list of SAP Hana Basis
related OSS Notes available in one place on the Internet
SAP's Experience Hana Website
SAP's Hana Academy
Lars Breddemann's excellent SAP Hana Blogs
Vivek Singh Bhoj's SAP Hana Reference for Developers Part I and Part II
Bill Ramos's Ultimate Set of Hana related links from SAP.
Tom Cenen's How to Achieve SAP Hana Certified Technology Associate Certification
.
.
12046 Views
Tags: sap, netweaver, hana, administrator, erp, sap_developer_network, emerging_technologies,
in-memory_business_data_management, in-memory, basis, in_memory_business_data_management, sap_hana, admin,
hana_developer_center, hde
Share Share 3 Like 4
55 Comments
Like (1)
Nicholas Chang May 28, 2013 5:51 AM
Thanks Andy for the effort of compiling all these helpful resource!
Thanks!
Like (0)
Andy Silvey May 28, 2013 10:37 AM (in response to Nicholas Chang)
thanks Nicholas.
Raj Kumar Salla May 28, 2013 7:11 AM
Thanks Andy for sharing with community.
Selfishly, I've wanted to create that list for my own benefit.
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
40 of 49 Thursday 26 September 2013 05:59 PM
Like (1)
Whatever the knowledge we possess becomes of double value, only when we share it with others and
never decreases by being shared.
Like to see much more similar blogs from you in near future
Regards
Raj
Like (0)
Andy Silvey May 28, 2013 10:38 AM (in response to Raj Kumar Salla)
thanks Raj.
Like (1)
Henrique Pinto May 28, 2013 7:25 AM
Hi Andy,
This is definitely a great content. But from a format perspective, maybe creating a document instead of
a blog would be a better option to share such kind of details.
Cheers,
Henrique.
Like (0)
Andy Silvey May 28, 2013 10:38 AM (in response to Henrique Pinto)
thanks Henrique.
Like (1)
Akshay Gupta May 28, 2013 8:11 AM
Hi Andy,
This is an excellent piece of Information.
I have always been intrigued by HANA since it's inception, and working on SAP Admin, it has always
been a curiosity about the administration of HANA system and how "administration nuts and bolts work
in HANA" as compared to SAP ERP systems.
Sincere thanks, for taking the pain and efforts to compile it all together and sharing with the community.
Looking forward to more such articles from you.
Regards,
Akshay
Like (1)
Andy Silvey May 28, 2013 10:39 AM (in response to Akshay Gupta)
Hi Akshay,
me too and that is precisely why I have compiled this and why I will maintain it.
All the best,
Andy.
Like (1)
Aby Jacob May 29, 2013 7:21 AM
Hi Andy,
Excellent Job
Appreciate that you shared with SCN members
Like (1)
Andy Silvey May 29, 2013 8:21 AM (in response to Aby Jacob)
thanks Aby.
Bowya S S May 29, 2013 7:33 AM
Hi Andy,
This is very useful information for us. We need similar related documents will be posted in future.Also
please share all SDK links (More complicated scenario like object Ids,Banking, Financials part of
customization any other documents knowing , post it to all).
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
41 of 49 Thursday 26 September 2013 05:59 PM
Like (1)
Thanks & Regards,
Bowya S S
Like (1)
Andy Silvey May 29, 2013 9:37 AM (in response to Bowya S S)
Hi Bowya,
thanks.
You know, it is said,
'give a man a fish, you feed him for a day
teach a man to fish, you feed him for the rest of his life'
There's no magic or secret to getting good documentation.
All you need to do, is what I have done since I started working as a Basis Admin,
once a week, or once a fortnight,
search SAP Market Place service.sap.com/instguidesNW for documentation pdf's
search help.sap.com for documentation and pdf's
since IviewStudio and SDN and SCN came along, search the SCN library,
the SCN library is HUGE and contains mountains of documentation
since Experience Hana came along, go on the Experience Hana website
and search on there
search google for pdf's and ppt's on the subjects you are interested in
There is mountains of documentation out there, you just need to go and harvest
it, and harvesting it is easy and should be a part of your routine once a week
or once every two weeks.
And then, start blogging what you have learn't :-) and share it with others
All the best,
Andy.
Like (0)
Bill Ramos May 31, 2013 3:31 AM
Hi Andy,
I finally had the time to look this over. We should "sit down" some time an think about how we can
make some money off our two lists with an Amazon ebook. Great job.
Regards,
Bill
Like (2)
Andy Silvey May 31, 2013 10:01 AM (in response to Bill Ramos)
Hi Bill,
thanks.
Regarding making money $$$, I am in the zen stage of my life, (turned forty two months ago)
and in this stage of my life I am so grateful for everything SAP has done for me, that I try to
give back to the SAP universe whatever I can, for free.
If you do a book, you are welcome to use any material I produce without reservation and
when you make your fortune and are sitting on that beach listening to the waves and sipping
from a cool drink with an umbrella in it, have one for me :-)
All the best,
Andy.
Like (1)
Tom Cenens May 31, 2013 9:53 AM
Hi Andy
Thx for this great overview.
Best regards
Tom
Andy Silvey May 31, 2013 9:57 AM (in response to Tom Cenens)
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
42 of 49 Thursday 26 September 2013 05:59 PM
Like (0)
Hi Tom,
thank you.
And thanks for your blog on Hana Certification, this is the must read for anybody aspiring to
take Hana Certifications, here it is:
Preparing for Hana how to achieve SAP Certified Technology Associate Certification
All the best,
Andy.
Like (0)
Martin English Jun 7, 2013 8:15 AM
Andy,
The Developer Edition appears to have a slightly different directory layout. in several cases, you refer
to running
/usr/sap/hostctrl/exe/sapcontrol -nr <instance-number> -function
<function-name>
On the Developer Editions, sapcontrol lives in the instance EXE folder; i.e.
cdexe
./sapcontrol -nr <instance-number> -function <function-name>
hth
Like (0)
Andy Silvey Jun 8, 2013 7:07 PM (in response to Martin English)
Hi Martin,
or should I better say, g'day :-)
I am not so familiar with the Developer Edition, but I know you'll
know that cdexe is a short cut to take you to the exe catalogue.
Out of curiosity can you have a look on the Developer Edition,
do the cdexe and then do pwd and see where you are.
For the Platform Edition and higher these are the commands:
SAP HANA Appliance Software SPS 05
Document Version: 1.0 - 2013-04-04
SAP HANA Administration Guide
http://help.sap.com/saphelp_hana/hana_admin_en.pdf
Starting the SAP System:
You can start the SAP system by executing the following commands
from the command line:
/usr/sap/hostctrl/exe/sapcontrol -nr <instance-nr> -function StartSystem HDB
Stopping the SAP System:
You can stop the SAP system by executing the following commands
from the command line:
/usr/sap/hostctrl/exe/sapcontrol -nr <instance-nr> -function StopSystem HDB
Current Host Status
You can also query the current status of all hosts using the following commands
from the command line:
/usr/sap/hostctrl/exe/sapcontrol -nr <instance-nr> -function GetSystemInstanceList
Thank you for pointing out the difference with the Hana Developer Edition and I curious to
see what pwd brings back from the cdexe command.
Kind regards,
Andy.
Martin English Jun 12, 2013 2:07 PM (in response to Andy Silvey)
Hi Andy Silvey
Apologies for the delay in replying :-
On my current (revision 48, upgraded to rev56) Developer edition, cdexe takes me
to /usr/sap/HDB/SYS/exe/hdb which is linked to /usr/sap/HDB/exe
/linuxx86_64/hdb - Based on what I've read, a lot of the Platform Edition python
scripts are missing as well. I can't really do a proper comparison till I get a job
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
43 of 49 Thursday 26 September 2013 05:59 PM
Like (1)
looking after a HANA box
imdbhdb:~ # su - hdbadm
imdbhdb:/usr/sap/HDB/HDB00> cdexe
imdbhdb:/usr/sap/HDB/SYS/exe/hdb> pwd
/usr/sap/HDB/SYS/exe/hdb
imdbhdb:/usr/sap/HDB/SYS/exe/hdb> cd ..
imdbhdb:/usr/sap/HDB/SYS/exe> ls -la
total 8
drwxr-x--- 2 hdbadm sapsys 4096 2013-01-25 14:17 .
drwxr-x--- 3 hdbadm sapsys 4096 2013-01-25 14:17 ..
lrwxrwxrwx 1 hdbadm sapsys 25 2013-01-25 14:17 hdb ->
../../exe/linuxx86_64/hdb
imdbhdb:/usr/sap/HDB/SYS/exe> cd
../../exe/linuxx86_64/hdb
imdbhdb:/usr/sap/HDB/exe/linuxx86_64/hdb> pwd
/usr/sap/HDB/exe/linuxx86_64/hdb
imdbhdb:/usr/sap/HDB/exe/linuxx86_64/hdb>
hth
Like (1)
Andy Silvey Jun 12, 2013 2:15 PM (in response to Martin English)
Hi Martin,
that sure does help, thank you for confirming the locations.
I've added a section 2b) using the information you have provided.
Thank you,
Andy.
Like (2)
Tom Cenens Jun 14, 2013 11:44 AM (in response to Martin English)
Hi Martin
A lot of scripts and tools are indeed not in the Developer Edition so for an
Administrator it's not the ideal environment to practice on.
You could insert them if you have access to the SAP HANA DVD's but I'm
not so sure that is allowed from a legal point of view. I wish SAP would add
more capabilities so administrators also can practice on the tooling /
scripting etc.
Best regards
Tom
Like (0)
Andy Silvey Jun 14, 2013 1:11 PM (in response to Tom Cenens)
Hi Tom,
I wish SAP would add more capabilities so
administrators also can practice on the tooling /
scripting etc.
I couldn't agree more.
Best regards,
Andy.
Like (1)
Koteswararao Sakuru Jun 7, 2013 9:43 PM
Hi Silvey,
Useful information for the SCN Users.
Im expecting more posts which is useful for the community members.
Regards,
Sakuru.koteswararao.
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
44 of 49 Thursday 26 September 2013 05:59 PM
Like (0)
Andy Silvey Jun 14, 2013 9:22 AM (in response to Koteswararao Sakuru)
Hi Sakuru,
thanks, I will be doing so, next week should be an interesting new blog.
You know, you are also welcome to blog something, everybody has something they can
contribute to the community.
All the best,
Andy.
Like (1)
Donald Voorhees Jun 10, 2013 10:48 PM
Hello -
I just stumbled on this and found it helpful. Wanted to say thanks for taking the time to put this
together!!
Like (0)
Andy Silvey Jun 14, 2013 9:25 AM (in response to Donald Voorhees)
Hi Donald,
thanks, the hardest is doing the first execution, once the main body is there it's just a case of
keeping adding to it as things come to mind which can be added.
All the best,
Andy.
Like (1)
Rama Shankar Jun 12, 2013 3:05 PM
Andy,
Very informative!
Thanks,
Rama
Like (0)
Andy Silvey Jun 14, 2013 9:24 AM (in response to Rama Shankar)
thanks Rama,
Andy.
Like (1)
M. Abdul Jamil Jun 13, 2013 1:25 PM
Dear,
ufffffff
thanks for Comprehensive blog.
Regards,
Like (0)
Andy Silvey Jun 14, 2013 9:24 AM (in response to M. Abdul Jamil)
Hi Jamil,
uffff, thanks :-)
Andy.
M. Abdul Jamil Jun 14, 2013 9:39 AM (in response to Andy Silvey)
Respected Andy,
no doubt you have done a great job and all SCN users who have checked/will
check this blog, they will definitely appreciate to yours efforts and time which you
have spent on this blog.
please keep it up
Regards,
MAJAMIL
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
45 of 49 Thursday 26 September 2013 05:59 PM
Like (1)
Like (3)
Andy Silvey Jun 14, 2013 11:10 AM (in response to M. Abdul Jamil)
Hi MAJAMIL,
thanks.
As I said in the intro, I really missed such a resource, a one stop location
Hana Reference for Basis Administrators and that is my goal with this
work.
The hard part is done, now I just need to fill in the gaps :-)
Andy.
Like (1)
basha sk Jun 18, 2013 9:31 AM (in response to Andy Silvey)
HI Andy,
This is very useful information for us. We need similar related
documents will be posted in future.
Thanks
Basha
Like (0)
Andy Silvey Jun 19, 2013 10:07 AM (in response to basha sk)
Hi Basha,
there is still a lot of work to do here, many more
sections to add, formatting to tidy up etc.
All the best,
Andy.
Like (1)
Rafikul Hussain Jun 19, 2013 1:27 PM
Hi Andy,
Really very happy to read this blog, all admin tasks for HANA (till now ) is in one place & with detail.
Thank You.
Regards,
Rafikul
Like (1)
Andy Silvey Jun 19, 2013 3:32 PM (in response to Rafikul Hussain)
Hi Rafikul,
thanks - a lot more work to do yet but this is going in the right direction.
Many more sections to cover, so keep watching for updates.
All the best,
Andy.
Like (1)
Kumar Mayuresh Jun 22, 2013 12:22 PM
Hi Andy,
Thanks for putting it all together at one place. Your blog has some of the answers which I was looking
for.
Thanks again
Regards
Kumar.
Andy Silvey Jun 24, 2013 4:52 PM (in response to Kumar Mayuresh)
Hi Kumar,
thanks for the feedback.
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
46 of 49 Thursday 26 September 2013 05:59 PM
Like (0)
Best regards,
Andy.
Like (1)
kamal mehta Jun 25, 2013 12:09 PM
Hi Andy ,
Thanks .
Valuable Information .
Regards
Kamal
Like (0)
Andy Silvey Jun 27, 2013 10:36 AM (in response to kamal mehta)
Hi Kamal,
thanks,
Andy.
Like (1)
MA Yan Jun 27, 2013 6:58 PM
Hi Andy,
thanks.
Like (1)
Jerry Wang Jun 28, 2013 10:44 AM
Hi Andy,
thanks a lot, it is good for like command operation.
Regards,
Jerry
Like (3)
SrinivasuluReddy Tanguturi Jul 3, 2013 5:49 PM
Hi Andy
Excellent ,Thanks for giving Helpul information
Regards
Srinivas
Like (1)
Ravi Subramanian Jul 7, 2013 8:01 AM
Hi Andy,
Thanks a lot for putting a comprehensive guide together. Excellent cheat sheet for NW/Basis folks.
Regards,
Ravi
Like (1)
raj k Jul 16, 2013 4:29 PM (in response to Ravi Subramanian)
This is very nice.. Appreciate your time and saving lot of others time... Great work !
Like (1)
Durairaj premsundar Jul 19, 2013 10:02 PM
This goes right in to my one note :-).... Thanks a lot Andy...
Jacques Thijs Aug 2, 2013 10:52 AM
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
47 of 49 Thursday 26 September 2013 05:59 PM
Like (1)
Hi Andy
Great document and I am hoping that SAP take note of this as there are now so many websites and
document resources that it has now become a complete mess when attempting to find the correct
document and I am very happy to say that your doc clears the wood from the tree's.
Perhaps if there were more like this and the one found in this link it would make life a lot easier and
save time when searching for the correct information
https://cookbook.experiencesaphana.com/
Like (1)
Zhu YuJie Aug 8, 2013 10:55 AM
Thanks Andy , this is really a great document.
Like (0)
Raj Kumar Salla Aug 14, 2013 12:57 PM
Hi Andy,
I have a question on finding root cause for index server crash.
From the Diagnosis Files tab, I downloaded the index server crash dump trace but the file is too big
and don't know what to look for. How to find for which problem the index server is crashed?
Regards
Raj
Like (0)
Andy Silvey Aug 15, 2013 11:02 AM (in response to Raj Kumar Salla)
Hi Raj I am on holiday at the moment building sand castles with my children The best advice
i can give is for you to put this question in the Hana discussion forums where it will be visible
for all to answer and for all to gain from All the best Andy
Like (1)
SUJIT SHARMA Sep 12, 2013 12:21 PM
Dear Andy,
Thank you so much for your time for such a wonderful compilation. This definitely would have provided
great help to many of us.
Best regards,
Sujit
Like (0)
Andy Silvey Sep 12, 2013 12:27 PM (in response to SUJIT SHARMA)
Hi Sujit,
thank you, we're all learning through sharing.
All the best,
Andy.
Like (1)
Paul Aschmann Sep 18, 2013 9:53 PM
Hi Andy,
Thanks for a helpful list. Here are 2 which you may want to add which I did not see currently:
Forward port 80 to XS Engine (8080)
This is helpful if you would like your web app to be available on the default/standard HTTP port.
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8000
XS Engine debug mode
Enable the developer mode which provides details on execution/runtime errors when helps during
development (rather than getting generic 500 errors).
From HANA Studio, open Administration -> Configuration -> xsengine.ini -> httpserver ->
developer_mode = true
Cheers, Paul
Andy Silvey Sep 19, 2013 9:48 AM (in response to Paul Aschmann)
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
48 of 49 Thursday 26 September 2013 05:59 PM
Follow SCN
Site Index Contact Us SAP Help Portal
Privacy Terms of Use Legal Disclosure Copyright
Like (2)
Hi Paul,
thank you very much for this contribution, what you have done, contributing more valuable
information to the SAP Hana Basis Administrator's Reference is precisely what the spirit of
this blog is about.
I will add sections to the blog for your items and credit them to you.
Thank you again and all the best
Andy,
Like (3)
Paul Aschmann Sep 19, 2013 2:58 PM (in response to Andy Silvey)
Thanks for the comment Andy and no need for credits
Cheers, Paul
SAP HANA and In-Memory Business Data Mana... http://scn.sap.com/community/hana-in-memory/bl...
49 of 49 Thursday 26 September 2013 05:59 PM

You might also like