Andy Silvey Sap Hana Command Line Tools and SQL Reference Examples for Netweaver Basis...

download Andy Silvey Sap Hana Command Line Tools and SQL Reference Examples for Netweaver Basis Administrators

If you can't read please download the document

description

hana commands

Transcript of Andy Silvey Sap Hana Command Line Tools and SQL Reference Examples for Netweaver Basis...

  • Generated by Jive on 2013-12-24+01:001

    SAP HANA and In-Memory Business DataManagement: The SAP Hana Reference forNetWeaver Basis Administrators

    Posted by Andy Silvey May 27, 2013.

    The SAP Hana Reference for NetWeaver Basis Administrators

    The SAP Hana Reference for NetWeaver Basis Administrators was started because during studies forHanaTec Certification it was noticed that anybody interested in Hana Administration was missing a onestop shop location and reference for the Hana Commands and Command Line Tools and Administrator'sSQL queries respective to the Basis Administrator's Hana requirements.

    The SAP Hana Reference for NetWeaver Basis Administrators is a live SCN Community project, this meansit is continuously updated and extended to include the latest valuable knowledge on SAP Hana from theBasis Administrator's perspective.

    Everybody who has gems of knowledge [anything from tips & tricks to howto's] on SAP Hana from the BasisAdministration perspective is positively welcomed and encouraged to join this open source sharing SCNCommunity collaborative initiative to make this resource the most powerful SAP Hana Basis Administrationresource available.

    Let's together exploit the power of the SCN Community and unlock the value of the knowledge and experiencein 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.

    p.s. if you click the View as PDF button on the right, then you can save this as a pdf onto your phone or pc foroffline access and reading - of course this work is live so come back from time to time and get the latestversion.

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:002

    Contribution History

    Date Author Subject

    8th June 2013 Martin English Developer Edition Filesystem Structure19th September 2013 Paul Aschmann Forward port 80 to XS Engine (8080)19th September 2013 Paul Aschmann XS Engine debug mode17th December 2013 Jake Echanove Steps To Reset Hana System User Password

    Contents:

    1) HDB stop & StopSystem HDB

    2a) HDB start & StartSystem HDB

    2b) Note about SAPCONTROL location on the Hana Developer Edition

    3) GetSystemInstanceList

    4) hdbnameserver

    5) hdbindexserver

    6) hdbuserstore

    7) Install Permanent License Using SQL

    8) M_VOLUME_IO_STATISTICS

    Total Memory Used

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:003

    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

    9b) Steps To Reset Hana System User Password

    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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:004

    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

    25) Restore when log backups are missing

    26) hdbbackupdiag

    27) hdbcons

    28) Sizing Hana Basic Calculations

    28a) Sizing SAP BI/BW on Hana

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:005

    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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:006

    44b) How to View the SAP Hana Edition & Revision

    45) Remove the SAP HANA Extended Application Service (SAP HANA scriptserver) from thetopology 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

    50&1/2) Hana Architecture - Instances Based On Application Server Java Released For UseWith Hana Database 1.00

    51) HANA Architecture - Multiple HANA db's Databases on One Hana Appliance

    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 HostHANA 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 landscapesbased on SAP HANA

    54c) Hana Architecture - SAP Hana Landscape Redistribution with SP6

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:007

    55) How To Overcome the Hana Hardware Check Or Hardware Not Recognized Errors DuringInstallation

    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 BasisAdministrators

    1) Stop Hana

    ./HDB stop

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:008

    /usr/sap/hostctrl/exe/sapcontrol -nr -function StopSystem HDB

    2a) Start Hana

    ./HDB start

    /usr/sap/hostctrl/exe/sapcontrol -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 -function

    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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:009

    /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 -function GetSystemInstanceList

    4) Start the name server:

    /usr/sap//HDB/hdbenv.sh

    /usr/sap//HDB/exe/hdbnameserver

    5) Start an index server in a new console:

    /usr/sap//HDB/hdbenv.sh

    /usr/sap//HDB/exe/hdbindexserver -console

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0010

    6) hdbuserstore

    Create a user key in the user store and store the password under this user key:

    hdbuserstore SET

    For example:

    hdbuserstore SET millerj localhost:30115 JohnMiller 2wsx$RF

    List all available user keys (passwords are not displayed):

    hdbuserstore LIST

    For example:

    hdbuserstore LIST millerj

    The following information is displayed

    :KEY: millerjENV: localhost:30115USER: JohnMiller?

    Call hdbsql with the user key:

    hdbsql -U

    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

    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:

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0011

    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 xx

    GRANT MONITORING TO SAPDBCTRL

    Then logon to the Hana studio under the username and execute

    the following command:

    ALTER USER SAPDBCTRL PASSWORD

    b. As the OS user adm, you must provide the user key SAPDBCTRL in

    hdbuserstore on the database server. You can check the existence of the

    user key with the following command:

    hdbuserstore LIST SAPDBCTRL

    If the user key does not exist, you can create it as follows:

    hdbuserstore SET SAPDBCTRL : SAPDBCTRL

    The tool hdbuserstore is installed under the following paths:

    /usr/sap/hdbclient

    or

    /usr/sap//hdbclient

    c. To check whether the sapdbctrl queries without passwords work, execute

    the following command as OS user :

    /usr/sap/hostctrl/exe/saphostctrl -function GetDatabaseStatus -dbname

    -dbtype hdb

    If sapdbctrl responds with the following error text:

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0012

    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

    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 inHana 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 Servicein question was last started.

    The SQL command

    ALTER SYSTEM RESET MONITORING VIEW SYS.M_VOLUME_TO_STATISTICS_RESET

    initialises the statistics shown by this view

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0013

    The monitoring viewM_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",

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0014

    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;

    Execute the Linux command:

    awk 'BEGIN {sum = 0};

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0015

    /^(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 adm access to the instance where SAP HANA's masterindex 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//HDB/hdbenv.sh

    /usr/sap//HDB/exe/hdbnameserver

    Start an index server in a new console:

    /usr/sap//HDB/hdbenv.sh

    /usr/sap//HDB/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 HANAinstance where you are logged on as a SYSTEM user.

    Reset the SYSTEM user's password and store the new password in a

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0016

    secure location with the following SQL command:

    ALTER USER SYSTEM 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.

    9b) Steps To Reset Hana System User Password

    (thanks this Blog which also contains supporting screenshots by Jake Echanove)

    UPDATE: Section 7.3 in the admin guide for SP6 discusses how to do this: http://help.sap.com/hana/SAP_HANA_Administration_Guide_en.pdf

    Reset HANA SYSTEM user password

    SSH to the HANA system and login as root

    SU to the adm user

    su anaadm

    Identify running HANA services

    ps aux | grep anaadm

    Stop the HANA server

    ./HDB stop

    Verify services are no longer running

    ps aux | grep anaadm

    Start the name server service this may not get back to a prompt

    hdbnameserver &

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0017

    Start index server. Run command even though may not be at a prompt.

    hdbindexserver console

    Reset password for user SYSTEM

    ALTER USER SYSTEM PASSWORD Password1234

    Stop hdbindexserver service by hitting Ctrl-C

    Kill hdbnameserver service

    killall -9 hdbnameserver

    Verify all HDB services are stopped

    ps aux | grep anaadm

    Start HANA

    ./HDB start

    Verify HANA services are running

    ps aux | grep anaadm

    Update password in HANA studio

    And you're done :-)

    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).

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0018

    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//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 Agentshttps://cookbook.experiencesaphana.com/bw/deploying-bw-on-hana/preparation/prepare-hana-hardware/

    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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0019

    sapprofile.ini

    daemon.ini

    12a) Trace Files Location

    trace files can be found here:

    /usr/sap//HDB//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___000.py

    Note: Make sure you are connected to the correct HANA instance :-)ref: 1627480 - How to enable serverwide HANA SQL traces?

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0020

    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 (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 thefollowing:

    Configuration:

    Trace file name : C:\SAP\HANA_ODBC.txt

    Trace flags : A:a

    ODBC trace : enabled

    Short trace : disabled

    Debug trace : disabled

    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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0021

    6. Confirm the settings took by running hdbodbc_cons show all. You should see something similar to thefollowing:

    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.

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0022

    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 softwareand 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 newshared layout during the selfupdate process

    . Handling the lm_structure content in a consistent way

    . Keeping the system consistent via update of all the componentswhich are installed on the HANA box

    . Checking the correct component version dependencies. In case ofinconsistencies an error is generated and execution will be stopped

    . Integration to Solution Manager, e.g. consuming generated stacks with HANAcontent

    Other tools such as the On Site configuration tool rely on this landscape

    to be correct in order to work properly.

    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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0023

    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 orUnified Installer?

    It is really simple, if the directories /usr/sap//SUM and /usr/sap//lm_structureexist then the Unified Installer was used and you should apply Support Package Stacksand Revisions with SUM for HANA. If you do not have these directories, the recommendationis to bring your instance up-to-date and install SUM for HANA and lm_structure usingSAP Note 1793303. After following this note you can use SUM for HANA to apply revisionsand 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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0024

    running the following commands:

    export JAVA_HOME=/usr/sap//SUM/jvm/jre/usr/sap//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 []

    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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0025

    even when no access to the system via SQL is possible.

    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 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 canbe 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

    Usage information can be displayed by entering:

    python fullSystemInfoDump.py h

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0026

    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 commandline 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: SYSTEMPassword:

    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 thebackground. 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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0027

    user MONA with the password RED.

    hdbsql -n PARMA -i 1 -u MONA p RED

    To log on using a , enter the following command:

    hdbsql [] -U

    Two-Step Logon, Procedure

    Start HDBSQL:

    hdbsql []

    Log on to the database:

    \c [] -n -i -u ,

    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:

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0028

    # Hdbsql n : -u p

    Port= 315 (## 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//HDB/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 ()

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0029

    The backup creates the backup files in the default directory.The name of each backup file starts with .

    If you want to change the default a location, specify the fullpath, for example:

    BACKUP DATA USING FILE (/backupDir/data/monday/COMPLETE_DATA_BACKUP)

    Performing a Database Backup Using Batch ModeCurrently, the main tool for batch mode backup is the command

    line interface hdbsql.

    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 :315 Example: /usr/sap/hdbclient/hdbuserstore setBACKUP vebwtests1:30015 user password

    c. In crontab, call the following at the desired time:

    /usr/sap/hdbclient/hdbsql U "BACKUP DATA USING FILE ('')"

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0030

    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 StudioYou can use SAP HANA studio to cancel running data backups that youstarted 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.

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0031

    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

    Check that the data backup was canceled.

    23) To check the state of the data backup, use the following command:

    select state_name from "SYS"."M_BACKUP_CATALOG" where 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/')

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0032

    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 possibleonly 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__0__, 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:

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0033

    Call

    hdblogdiag seglist

    This call issues a list of log segments that looks as follows:

    LogSegment[0/0:-(...

    LogSegment[0/1:-(......

    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(...

    Log segment 0 has the lowest log item 1217856 (hexadecimal 0x129540), logsegment 1 has the lowest log item 1252352 (hexadecimal 0x131c00). Thismeans 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 withhdbbbackupdiag -generate (SAP Note1812057)

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0034

    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 todetermine 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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0035

    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 .Use the option -c 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 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_1RedoLogPosition: 0Backup 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:

    "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.

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0036

    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

    --logDirs

    -d

    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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0037

    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 "

    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 thebackup 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 consumptionYou 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.

    Connect to your HANA database server as user sidadm.

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0038

    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 /'

    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' > //

    This will show us how much memory is located by which code line.

    b. hdbcons 'mm l -s -S -p' > //

    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)

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0039

    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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0040

    Useful OSS Notes:

    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 toleverage 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.

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0041

    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 inCorporate 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 enhancementpackage 3 for SAP Supplier Relationship Management 7.0, version for SAP HANA)

    Initial sizing observations are based on lab measurements, load tests and measurements performedin customer test systems. This information may change, if additional measurement results areavailable. This information is only valid, if the system usage is not changed after the move; intenseadditional reporting and OLAP processing is not taken into account.

    Application Server

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0042

    Based on the measurements SAP doesn't expect any changes concerning CPU, memory and networkrequirements for the ABAP application server. This means that the existing hardware and networkinfrastructure can still be used. Please check the PAM (www.service.sap.com/pam) for further details.

    HANA Main Memory

    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 uncompressedbut "well-maintained" disk-based database and include a safety buffer of 20%. This means, if the databaseis 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 inmemory 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 fullysupport the parallel processing capabilities of HANA for optimal response times for analytical applicationsSAP prefers a factor of 3 to 4 more CPU power for HANA than for disk based databases without parallelizationof 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 ofthe database. You can for example look at the CPU consumption of the database process(es) using SAP'smonitoring tools. Regarding the disk space of Suite on HANA, SAP recommends to use half of the requireddisk space that is needed for the Business Suite for disk-based databases. Please note that this does notmean 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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0043

    Update - 18th Dec 2013:

    The OSS Note

    1837331 - HOWTO HANA DB SSO Kerberos/ Active Directory

    contains a fantastic pdf document containing a step by step procedure for setting up Kerberos with Hana

    The configuration is a complex task with various sources of error.

    Main reasons are the cross OS nature of the setup (Linux/ Windows), often resultingin problems with case (Windows: case insensitive, Linux: case sensitive) and the tightintegration into the network configuration (/etc/hosts, DNS).

    In particular, there are various sources of error when creating the keytab and exporting itfrom Active Directory.

    The process is highly manual and consists of several steps across different operatingsystems 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 remoteActive Directory.

    Unzip the attached hdbkrbconf.zip and run as adm

    $ python hdbkrbconf.py -h

    for help.

    There are two main options, "-k" for creating the keytab and "-v" for validating theconfiguration 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.

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0044

    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 showshigh fragmentation ratio.

    Row store grows by allocating a 64MB memory segment and shrinks by freeing emptysegments.

    A segment is internally divided into fixed-size pages. When a row store table requires morememory to store records, the table takes a free page from existing segments. If no segmenthas 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 sparsesegments 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 andto 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','','','');

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0045

    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 SpaceRatio 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 BYHOST, 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 MaximumMemory 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 LogVolume 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.

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0046

    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;

    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.

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0047

    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; thisEQUI join can then be resolved for an IN data set.

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0048

    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 FROM 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 where (a, b, c, d) IN( (?, ?, ?, ?), ... (?, ?, ?, ?) )

    o dbsl_add_stmt

    Use: dbsl_add_stmt

    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 keyworddbsl_add_stmt).

    ABAP

    SELECT node FROM CONNECTION ('HANA') INTO TABLE T_NODE%_HINTS HDB 'dbsl_add_stmt WITH PARAMETERS (''expression'' =''LEAVES("Node1")'' )'

    SQL for the database

    select node from table

    with parameters ( 'expression' = 'leaves("Node1")' )

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0049

    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

    NoteIn 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.

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0050

    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 performingthe

    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 ofhdbrename.

    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 usingcommand 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:

    ///global/hdb/install/bin

    c. Call the hdbrename program by entering this command:

    ./hdbrename

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0051

    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 instanceRemove line 'id='in /usr/sap//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/

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0052

    Collecting Location and Usage Information

    There is a Python script which allows you to collect support information for customer systemseven 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 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

    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 andviews listed in System Tables/Views.

    For security reasons the user name and password for this SQL user cannot be given as commandline 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 beread without SQL access. The resulting zip file name has the following structure:

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0053

    fullsysteminfodump________.zip

    SAPLOCALHOSTFULL and SAPSYSTEMNAME are again taken from sapprofile.ini.

    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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0054

    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 foradministration

    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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0055

    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 followingcommand 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//lm_structure and view the

    landscapeDescription.xml file

    45) Remove the SAP HANA Extended Application Service (SAP HANA scriptserver) from thetopology of your SAP HANA database

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0056

    You want to remove the SAP HANA Extended Application Service (SAP HANAscriptserver) from the topology of your SAP HANA database (DB) because you do notuse 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 stillentered 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 thetopology:

    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 with an SAP HANA

    scriptserver service:

    ALTER SYSTEM ALTER CONFIGURATION ('daemon.ini', 'host', '') 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

    with an SAP HANA scriptserver service:

    ALTER SYSTEM ALTER CONFIGURATION ('topology.ini', 'system')

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0057

    UNSET ('/host/', 'scriptserver') WITH RECONFIGURE

    o Remove the volumes from the topology. To do this, carry out

    the following command for every of an SAP HANA

    scriptserver service:

    ALTER SYSTEM ALTER CONFIGURATION ('topology.ini', 'system') UNSET ('/volumes', '') 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.

    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 whatOS commands like 'df' are displaying:

    df -h

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0058

    /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 wouldindicate that a lot of space on files system level is consumed by files not relatedto data volumes, log volumes or trace files. In this example, this is true for thetrace volume. All trace files together just consume around 100 MB, but consumeddisk 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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0059

    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 volumesyou can use the following SQL statement:

    select top 30 table_name, sum(physical_size) from M_TABLE_VIRTUAL_FILESgroup by table_name

    order by 2 descLog Volumes

    The number of log segments that consume space can either be determined using HANA Studioor 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_%')

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0060

    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 thelogvolume.

    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//global/hdb/log):cd /usr/sap//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//global/hdb/data):mv hdb00003 /usr/sap//global/hdb/data

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0061

    5. Create a symbolic link to the new folder in the old location:

    ln -s /usr/sap//global/hdb/data/hdb00003 /usr/sap//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//global/hdb/log/mnt00001/hdb00003

    9. Move the log volume back to its original location:

    mv /usr/sap//global/hdb/data/hdb00003 /usr/sap//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 thetexts 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.

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0062

    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=:315

    set REGI_USER=

    set REGI_PASSWD=

    where "" 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=:315

    export REGI_USER=

    export REGI_PASSWD=

    3) Import the Languages-DU-TAR-GZ-file with the following command:

    regi import languages

    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

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0063

    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 databaseand 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 databasePR1 to the BW system DEV connected to the database DV1. The name of the ABAP schema in PR1 isSAPPRD.Therefore, PRD is the source system (the system that is to be copied), PR1 is the source database (thedatabasesystem 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 ofthe 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 thebackup files under Backup File Prefix.

    Ensure that the backup directory contains sufficient free space for the backup and that no backup thathas 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 filesare saved in the standard backup directory of the source database system and begin with the prefixentered in step 1. The standard backup directory is defined in the database parameter

    global.ini -> persistence -> basepath_databackup.

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0064

    3. Use SWPM to import the backup.

    a) Start SWPM.b) Choose -> -> System Copy -> Target System -> ->Based on -> 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 datain the backup. For example, if you install a system DEV and use a backup of the system PRD for theinstallation, 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 specifywhether you want the system to check whether the backup exists. If this check is deactivated and thebackup does not exist, the installation will terminate with an error at a later time. You also have to specifythe password of the adm user of the database and the SAPControl URL. The system prefills theSAPControl 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 SAPDBTech JDBC: [437]: only commands for license handling are allowed in current state:)

  • SAP HANA and In-Memory Business Data Management: The SAP Hana Reference for NetWeaver BasisAdministrators

    Generated by Jive on 2013-12-24+01:0065

    5. Additional adjustments after the installationa) Check the secondary database connections.After you copy the database, the target system has the same database connections (for example, for the DBACockpit)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 amountThe incoming requests are processed automatically