sap hana administration guide

30
Contents About this guide 1 Executive summary 1 Lessons learned 1 Assumptions 3 Required materials 3 Hana Installation 3 Hana Update 8 Adding Hana System in Studio 10 Hana Studio Operations 13 Start and Stop Hana system 13 Administration View 13 Setting database parameters 14 SQL Editor 14 Creating users 15 Adding Schema privleges to other users 16 System privileges 17 Applying License Key via Hana Studio 18 Hana Monitoring 19 Hana Database Backup and Recovery. 20 Backup 20 Recovery 23 Feedback and questions 25 Document control information 25 Document history 25 2013 SAP HANA Administration Guide

Upload: rahulpatchi

Post on 20-Jan-2016

120 views

Category:

Documents


7 download

DESCRIPTION

Admin guide

TRANSCRIPT

Page 1: SAP HANA Administration Guide

Contents

About this guide 1

Executive summary 1

Lessons learned 1

Assumptions 3

Required materials 3

Hana Installation 3

Hana Update 8

Adding Hana System in Studio 10

Hana Studio Operations 13

Start and Stop Hana system 13

Administration View 13

Setting database parameters 14

SQL Editor 14

Creating users 15

Adding Schema privleges to other users 16

System privileges 17

Applying License Key via Hana Studio 18

Hana Monitoring 19

Hana Database Backup and Recovery. 20

Backup 20

Recovery 23

Feedback and questions 25

Document control information 25

Document history 25

2013SAP HANA Administration Guide

Page 2: SAP HANA Administration Guide
Page 3: SAP HANA Administration Guide

About this guide

The purpose of this SAP HANA administration guide is to centralize a variety of product-specific information for technical practitioners so they can quickly become familiar with the SAP HANA administration. This guide serves as a quick start / reference guide for all those who are working on and planning to do administration related work on SAP HANA. Since the information is in one location, practitioners save time by not having to search through installation guides, OSS notes, and other technical information before starting to work on SAP Hana.

All the administration steps mentioned in this document have been tested using specific SAP documentation. This guide also identifies new guidelines when it comes to administering Hana, describe lessons learned, and provide links to additional information that will help practitioners get started.

This admin guide is not intended to replace official SAP documentation, nor should they be used in this way. Practitioners should familiarize themselves with the official SAP technical guide(s) and critical OSS notes. Also this guide focuses only at SAP HANA solution and not other HANA solutions like BW powered on Hana etc.

Executive summary

SAP HANA is a modern platform for real-time analytics and applications. It enables business to analyze their operations based on a large volume and variety of detailed data in real time and with an amazing subsecond response time.

The platform can be deployed as an appliance. SAP in-memory computing is the core technology underlying the SAP HANA platform.

SAP HANA appliance software is a flexible, multipurpose, datasource- agnostic, in-memory appliance that combines SAP software components optimized on hardware provided and delivered by leading SAP technology partners, such as Cisco, Dell, IBM, HP, and Fujitsu, using the Intel Xeon processor. It runs on Suse Linux Operating system.

The appliance includes a number of integrated SAP software components, including the SAP HANA database, data and lifecycle management applications, support for multiple interfaces based on industry standards, and the SAP HANA studio, an easy-to-use data modeling and administration tool.

Lessons learned

1. SAP HANA 1.0 runs on the operating system Linux SUSE SLES 11 SP1/ x86-64. You need to select the packages sysstat and graphviz during the installation of the operating system

2. The server software for the SAP HANA database is only available on SUSE Linux Enterprise Server x86-64.

3. It is always recommended to have Hana database, client on the same patch level. Hana studio can be latest revision, as it is backward compatible.

4. The following platforms are supported for Hana client

Microsoft Windows x32 and x64 versions of:

• Windows XP

• Windows Vista

Page 4: SAP HANA Administration Guide

• Windows 7

SUSE Linux Enterprise Server:

• x86 64-bit: minimum version Linux SLES11 SP1

• x86 32-bit: minimum version Linux SLES 11

5. When installing Hana client the following are installed

SQLDBC

ODBC

6. Supported platform for Hana studio is

Microsoft Windows x32 and x64 versions of:

• Windows XP

• Windows Vista

• Windows 7

SUSE Linux Enterprise Server SLES 11: x86 64-bit version

7. Every user created in Hana database creates the corresponding schema also and that user is the owner of the schema and has full access rights. The schema owner can grant access to his schema to other users

8. Point in time recovery and log backup of Hana database is introduced in SP3. When upgrading Hana database from SP2 to SP3 the log mode is activated. Newly installed databases have the normal log mode activated by default, upgrade does not automatically change log mode to normal. You have to manually change it from legacy to normal in order to activate log backups. Once activated, the system continuously creates log backup in the file system, this results in every increasing requirement of disk space. The frequency of the log backup can be controlled by the parameter log_backup_timeout_s, which determines the sequential period of writing log backups to file system.

9. From Hana server software SP3 onwards, the installer runs a specific hardware check to proof the correctness of the hardware Hana is running on. SAP HANA appliance software can only be installed on validated hardware by SAP hardware partners. If the hardware does not comply with the hardware supported by SAP HANA (for example, if the CPU or any other hardware component differs from the SAP HANA hardware requirements), it will not be possible to install SAP HANA.

10.As of SP3, license key has to be requested after installation. Temporary license keys are automatically installed with the new system and are valid for 90 days, after that permanent license keys has to be requested. If the permanent license keys expires, temporary license is automatically installed which is valid for 28 days.

11.Prior to SAP HANA Revision 26 or SPS4, the system number of a SAP HANA database is not shown on the License Properties page in SAP HANA Studio. The system number is also not available in the M_LICENSE system view of the SAP HANA database. Only the system ID, hardware key, and installation number are available on the License Properties Page in SAP HANA Studio and in the M_LICENSE system view

Page 5: SAP HANA Administration Guide

Assumptions

1. The operating system used for client tools is windows

2. Hana platform edition is used for installation of SAP Hana Software.

Required materials

1. SAP guide: http://help.sap.com/hana_appliance

2. SAP guide : http://service.sap.com/hana

3. Critical OSS Notes:

a. 1603671 – SAP HANA 1.0 software components and software download

b. 1514967 – SAP HANA Central note

c. 1523337 – SAP In-Memory Database 1.0 central note

d. 1514966 – SAP HANA 1.0 Sizing SAP In-Memory Database

e. 1600147 – SAP HANA 1.0 SPS2 Release note

f. 1642937 – SAP HANA Appliance Software SPS 03 Release note

g. 1645183 – Changing log mode for SAP HANA DB after SPS2 to SPS3 upgrade

h. 1699111 – License key update in SAP HANA prior to rev 26

i. 1703417 – SAP HANA database revision 26

j. 1684255 – SAP HANA appliance, revision 25 of SAP HANA database

k. 1673965 – SAP HANA appliance, revision 24 of SAP HANA database

l. 1663228 – SAP HANA appliance, revision 23 of SAP HANA database

m. 1657892 – SAP HANA appliance, revision 22 of SAP HANA database

n. 1653292 – SAP HANA appliance, revision 21 of SAP HANA database

o. 1683688 - Installing and configuring the HANA JDBC driver on BI4.0 client desktops and server

p. 1652078 – SAP HANA database, Hardware check

q. 1678038 – Restarting SAP HANA database fails

Hana Installation

SAP Hana Database, client and studio software is available for download from the following site

http://service.sap.com/swdc Installation and Upgrades Browse our download catalog SAP NetWeaver and complementary products SAP Hana SAP Hana Platform Edition SAP Hana Platform Edit 1.0

Patches to SAP Hana Database, client and studio can be downloaded from

Page 6: SAP HANA Administration Guide

http://service.sap.com/swdc Support Packages and Patches Browse our Download Catalog SAP NetWeaver and complementary products SAP HANA SAP HANA PLATFORM EDITION SAP HANA PLATFORM EDIT 1.0

Installing Hana Database via installation manager on single host system

1. Log on to the Hana Suse Linux server as root user

2. Go to the directory where the Hana database software is extracted

3. Execute the program hdbsetup as follows

./hdbsetup

4. Follow the screen instructions as shown below

Mention installation parameters

Define <sid>adm password, and leave the defaults

Page 7: SAP HANA Administration Guide

Specify the data and log area

Mention database user password

Review the information entered and click Install, to install the Hana Database

Page 8: SAP HANA Administration Guide

Installing Hana Database via command line on single host system

1. Log on to the Hana Suse Linux server as root user

2. Go to the directory where the Hana database software is extracted

3. Execute the installation program as shown below

./hdbinst

4. Specify the data requested by the program. Default values are displayed in square brackets

5. Press enter if you want to confirm default values or else enter the custom value.

6. Upon entering the parameters, installation takes around 10-15 mins and successfully installation message is displayed

7. After successful installation leave log out of the root user.

Installing Hana Client on Linux.

1. Download and extract the software to an empty directory

2. Login to the Hana server as root user

3. Call the program hdbsetup (GUI installation) or hdbinst (command line installation) by entering one of the following commands

GUI : “./hdbsetup –a client”

Command Line : “./hdbinst –a client”

4. Follow the instruction displayed by the installation tool

5. Set the environment variable LD_LIBRARY_PATH to the installation path

6. Log out of root user

Installation Hana client software on windows environment.

Page 9: SAP HANA Administration Guide

1. Download and extract the software to an empty directory

2. Go to the directory where the software is downloaded

3. Execute the command hdbinst –a client

4. Follow the instructions and mention the installation parameters

5. Once client is installed, it creates a folder call ‘hdbclient’ under <drive>:/program files/sap/

Please note that Hana client is installed on windows server where BOBJ is also installed, so the nessary drivers are available for BOBJ to connect to Hana database.

Installation of Hana Studio via installation manager on windows

1. Download and extract the software to an empty directory

2. Go to the directory where the software is downloaded

3. Execute the file hdbsetup.exe

4. In the following screen, confirm the installation directory. By default Hana studio is installed under <drive>://program files/hdbstudio

Installation of Hana Studio via command on windows

1. Download and extract the software to an empty directory

2. Open command windows

3. Go to the directory where the software is downloaded

4. Execute the command ‘hdbinst – a studio”

Page 10: SAP HANA Administration Guide

5. Enter the installation directory. Default is <drive>://program files/sap

6. There are 2 installation log files written, *.log and *.msg. they are stored in %TEMP%\hdb_studio_<time_stamp>

Installation of Hana Studio via command on Linux

1. Log on with root user

2. Go to the directory where the software is downloaded

3. Execute the command ‘./hdbinst – a studio”

4. Enter the installation directory.

5. There are 2 installation log files written, *.log and *.msg. they are stored in /var/tmp/hdb_studio_<time_stamp>

Hana Update

Updating Hana Database to newest revision

1. Ensure that no users are logged into the database or using the Hana database.

2. Log on to the system as root

3. Go to the directory where Hana update software is downloaded and extracted (eg. /software/SAP_HANA_DATABASE)

4. Excute the command ‘hdbup’ as shown in screen shot below

5. Specify the sequence number of the system to be upgraded as shown below

Page 11: SAP HANA Administration Guide

6. After successful upgrade logs file are written to /var/tmp/hdb_<SID>_upgrade_<TIMESTAMP>.log

Updating Hana Client in Linux

1. Ensure that no users are logged into the database or using the Hana database.

2. Log on to the system as root

3. Go to the directory where Hana update software for client is downloaded and extracted (eg. /software/SAP_HANA_CLIENT)

4. Execute the command ./hdbupd

5. Specify the sequence number of the system to be upgraded as shown below

6. After successful update logs are written to /var/tmp/hdb_<SID>_upgrade_<TIMESTAMP>.log

Updating Hana Studio in Linux

1. Log on to the system as root

2. Go to the directory where Hana update software for studio is downloaded and extracted (eg. /software/SAP_HANA_STUDIO)

3. Execute the command ./hdbupd

4. Specify the sequence number of the system to be upgraded as shown below

5. After successful update logs are written to /var/tmp/hdb_<SID>_upgrade_<TIMESTAMP>.log

Updating Hana Studio in Windows

1. Go to the directory where Hana Studio is downloaded and extracted

Page 12: SAP HANA Administration Guide

2. Execute the program ‘hdbsetup.exe’

3. Following screen appears. Follow the instructions to update the studio

For more information on Installation and update, please refer to the SAP Hana Installation guides.

Adding Hana System in Studio

Once SAP HANA Studio is installed you can access the Hana server by adding the system in the Studio. Below are the steps for adding the Hana system in the studio.

1. In the windows machine where you have installed studio, go to Start Program SAP HANA and click on SAP HANA Studio program

2. Right click on Navigator panel and select Add System as shown below

3. In the dialog box that appears, enter Hana hostname or ipaddress, Instance number, description and click next.

Page 13: SAP HANA Administration Guide

4. Enter the Hana database username and password and click next

5. In the next screen, leave default and click finish

Page 14: SAP HANA Administration Guide

6. If the database username, password and connection parameters are correct then connection is established successfully and you see the system catalog and schema’s in the database as shown below

7. At first, the system status of Hana server shows yellow. Do the following to make it turn green.

a. In the SAP HANA studio, choose Window Preferences General Network Connections Active provider and change the value from Native to Direct, as shown below

b. Add in the hostfile of your windows machine were Hana studio is running the following entries

10.118.0.80 Hana-Small Hana-Small.solutions.glbsnet.com

Once both the above steps are done, the status of the Hana system in the studio turns green.

Please note that, since Hana server runs on Linux and domain names are not applicable, you have to do step ‘b’ above. This ensures that the Hana system status is green, which also allows you to start and stop the Hana system from the studio directly.

Page 15: SAP HANA Administration Guide

OR

Hana Studio Operations

You can do the following operations in Hana Studio

Start and Stop Hana system

To Stop Hana system, right click on the Hana system in the studio and click on stop. The status turns to grey once the Hana system is stopped successfully. Logs of stop is displayed in the studio.

To start the Hana system, right click on the Hana system in the studio and click on start. The status turns to green upon successful starting of Hana system.

Administration View

To view the administration console of Hana server in studio, either right click on the Hana system in studio and select ‘Administration’ or click on Administration icon in the navigator as shown below

Page 16: SAP HANA Administration Guide

OR

Setting database parameters

Database parameter such as Data Volume path, log backup path, database backup path, log backup timeout, log mode etc can be set directly from the Studio.

In the Administration view, go to Configuration tab and expand global.ini and under persistence you have all the database related parameter that can be adjusted.

SQL Editor

You can open sql editor directly in studio and query from the database. To do so right click on Hana system in studio and select sql editor or click on sql editor icon in navigator as show below

Page 17: SAP HANA Administration Guide

Creating users

Please note that, in Hana database, creating users via studio also creates the respective schema, with the same name as the user name and that corresponding user is the full owner of that schema. In order to give permissions to other users to the created schema, you must log in as that schema user and grant the privileges. For eg. if user ‘test’ is created via studio, schema ‘test is also automatically created. Only test users has full permission on schema test and can create objects under schema test. If another user wants to add objects to the test schema, then you have to login as test user into the Hana database via studio and grant respective privileges to other user. Also you can create users by executing create user query in the sql editor.

You can create schema only via the sql editor query and assign a user owner of that schema. You cannot create schema only (without user) via studio. In studio it only has option to create user and schema together.

To create Hana database user via studio, follow below steps

1. Login to the Hana Studio and expand the system and then Authorization. Right click on users and select new user, as shown below

2. Enter the username and initial password and select the authorization tab such as ‘Granted Roles’,

‘SQL Privileges’, ‘Analytic Privileges’, ‘System Privileges’, ‘Package Privileges’ and click on the button to add the respective authorization for the user. Please refer to the SAP HANA Database Security guide for more information on Hana database security.

Page 18: SAP HANA Administration Guide

Adding Schema privileges to other users

To give permission to create, select, execute, delete objects in a schema to other users apart from the schema owner, follow the below steps

1. Login as the schema owner.

2. Expand the system and authorization menu and under users, right click on the user, whom you want to add to your schema and select open

3. In the authorization tab ‘SQL Privileges’ click on and enter your schema name. Select the schema name in the list below.

4. Under privileges section on the right, check the desired privileges you like to give and whether you want these privileges grantable to other users and click save. This will add the user to your schema and that user then can perform the respective action.

Page 19: SAP HANA Administration Guide

System privileges

Authorization tab ‘system privileges’, has number of administrator roles such as backup admin, data admin, create schema, license admin etc. These privileges allows the user to perform specific administration task. In order to restrict the user from any administration task, remove that respective privilege under system privilege tab.

Page 20: SAP HANA Administration Guide

Applying License Key via Hana Studio

To request Hana system license key, you need Hardware Key and SID. You can get the Hana system Hardware Key details in the studio by right clicking on the system and selecting properties and then License.

Once you get the Hana license, follow the below steps to apply the license via studio

1. Right click on the Hana system in studio were you want to apply the license and select properties

2. Under License, click on Install License Key button

3. Select the license key file you received from SAP

4. Once license is applied and success message is displayed.

Page 21: SAP HANA Administration Guide

Hana Monitoring

In Hana Studio, there are types of Monitoring activity, which can be carried out, as described below

1. System Monitoring : In Hana studio under navigator, the system monitor button displays information such as system status, Data disk total and used size, log disk total and used size, memory utilized, percentage of CPU consumed etc

2. Also via Hana studio database logs and trace files can be viewed. To do that, go to administration view in Hana studio and open ‘Diagnosis Files’ tab. You can see all the Hana system logs and traces under this tab. Double clicking the log, trace files opens the content.

3. For information about monitoring the SAP LT (Landscape Transformation) Replication server, see the Technical operations Manual for SAP NetWeaver

4. To monitor ETL based replication, please refer to the Business Objects Data Services console guide

Page 22: SAP HANA Administration Guide

Hana Database Backup and Recovery.

Hana Database data and log files, including the configuration files can be backed up and recovered directly from the Hana Studio. The user used to perform the backup and recovery should have system privileges such as BACKUP_ADMIN, CATALOG_READ.BACKUP_ADMIN, CATALOG_READ.

The backup process is executed as operating system user <sid>adm on Linux

Also below are some of the points to be noted, regarding the Hana database backup.and recovery

Data backup in only available in operational mode online

During data backup, the system is available as usual

During recovery, the database cannot be accessed by end-users and applications.

The backup and recovery process cannot be used for system copies.

Backup only supports files as backup media. Backup to pipes/tapes is not supported.

Provide all data and log backups at the beginning of a recovery

Once started, backup or recovery cannot be canceled

If a recovery fails, the complete recovery must be repeated

The configuration path for data and log backup must be defined system wide and not host-specific

It is not possible to create a system copy using backup and recovery.

Backup

To start the database backup, perform the following steps.

1. In Hana studio login with the user who has the above mentioned backup privileges

2. Right click on the system and select backup, as shown below

3. In the next screen, mention the location to write the backup file. This can be a folder inside the Hana server or an external file server. Also mention backup file prefix, eg. COMPLETE_DATA_BACKUP, as shown below.

Page 23: SAP HANA Administration Guide

4. Click next and review the backup settings as shown below

Page 24: SAP HANA Administration Guide

5. Click Finish to start the backup. Backup progess windows appears as shown below

6. Once backup is successful, backup execution summary displays the results as shown below.

7. Copy the configuration files (ini files) from the folder /usr/sap/<sid>/SYS/global/custom/config to the backup location.

Page 25: SAP HANA Administration Guide

Recovery

To start recovery of Hana system, follow the below steps

1. Log on to Hana Studio with the user who has the respective system privileges to do recovery.

2. Right click on the system in Hana studio and select recovery

3. Enter the <sid>adm username and password

4. Confirm system shutdown by checking ‘confirm the system can be shutdown when recovery start’

Page 26: SAP HANA Administration Guide

5. In the next screen, select the recovery type. In this test, most recent state is selected.

6. Specify the backup file location of both data and log files in the next screen

7. In the next screen, review the information entered and click Finish to start the recovery.

Page 27: SAP HANA Administration Guide

8. Upon successful recovery, status message is displayed

9. Copy the configuration files backup manually to the respective folders.