SAPHANA Documentation

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

SAP HANA as Platform Database

8.0

Copyright © 2017 Digital Route AB


Copyright © 2017 Digital Route AB

The contents of this document are subject to revision without further notice due to continued progress in methodology, design, and
manufacturing.

Digital Route AB shall have no liability for any errors or damage of any kind resulting from the use of this document.

DigitalRoute® and MediationZone® are registered trademarks of Digital Route AB. All other trade names and marks mentioned
herein are the property of their respective holders.
Table of Contents
1. SAP HANA Installation Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1 Installation Properties for SAP HANA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Extracting Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 SAP HANA Preparations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.1 Generation of SAP HANA Database Definition Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.2 Extract Database Definition Files to SAP HANA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.3 SAP HANA Database Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Software Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 STR Configuration Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.6 SAP HANA Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2. Properties for SAP HANA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3. Changing Platform Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4. Changing Database Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
SAP HANA as Platform Database
This document provides you with the information that you require if you choose to use SAP HANA as your Platform database.

SAP HANA 2.0 is supported.

This document consists of the steps you require to take to install SAP HANA as described in 1. SAP HANA Installation Overview.
In addition, the properties that you can configure are described in 2. Properties for SAP HANA, how to change to a SAP HANA
database in an existing installation of MediationZone is described in 3. Changing Platform Database and how to change the SAP
HANA database password is described in 4. Changing Database Password.

If you want to use SAP HANA as a reference database, see 8.3.6 SAP HANA in Database Profile section in the Desktop User's
Guide.

4
1. SAP HANA Installation Overview
In order to select SAP HANA as database, you must take the following steps during the installation of MediationZone.

You take the steps provided in this documentation after you have completed the general preparations up to and including 3.1.3.1
General Properties in the Installation Instructions.

You must then take the following steps:

1. Set the installation properties required for the SAP HANA database, see 1.1 Installation Properties for SAP HANA.

2. Extract the additional files required, see 1.2 Extracting Files.

3. Make the preparations necessary when using SAP HANA, see 1.3 SAP HANA Preparations.

4. Install the software as instructed in 1.4 Software Installation.

5. Create a SAP HANA connection as part of the post installation configuration described in 1.6 SAP HANA Connection.

In addition there are SAP HANA properties that you can configure after you have installed SAP HANA as your database, as
described in 2. Properties for SAP HANA.

1.1 Installation Properties for SAP HANA


When you are using a SAP HANA database, set the following properties in install.xml:

Property Description

install.sap.jdbc.user Default value: MZADMIN

This property specifies the username of the database that the Platform uses during runtime.

Note!
The installation will fail if the same username is configured for both the database owner,
install.sap.owner, and the runtime (jdbc) user.

install.sap.jdbc.password Example value: QAmzadm1n

This property specifies the password for the jdbc user, previously described.

install.sap.owner Default value: SYSTEM

This property specifies the SAP HANA username for the database owner. The user will own all the
data definitions in the SAP HANA instance to be created.

Note!
The installation will fail if the same username is configured for both the database owner
and the runtime (jdbc) user, mz.jdbc.user .

install.sap.password Default value: QAmzadm1n

This property specifies the password for the database owner, defined with the install.sap.owner
variable described above.

5
install.sap.host Default value: 127.0.0.1

This property specifies IP address or hostname for the database instance.

install.sap.db.name Default value: MZ

This property specifies the name of the SAP HANA database.

install.sap.port Default value: 39013

This property specifies the SAP HANA database port.

install.sap.instance.number Default value: 90

This property specifies the SAP HANA instance number.

install.sap.systemdb.name Default value: SYSTEMDB

This property specifies the SAP HANA System Database name.

1.2 Extracting Files


Extract any additional files from the packages using the following command session. It is assumed that the temporary installation
directory is the working directory when the command session below is executed.

1. Enter the directory you have extracted:

$ cd ./<staging directory>/<release content directory>

2. Extract the packages:

$ ./setup.sh create

Any additional files should now have been extracted.

1.3 SAP HANA Preparations


This section describes the preparations necessary when installing SAP HANA as database.

1.3.1 Generation of SAP HANA Database Definition Files


The following script will tell each package to create the corresponding data definition files.

1. Enter the release content directory:

$ cd <staging directory>/<release content directory>

2. Extract the packages:

6
2.

$ ./setup.sh prepare_db

The database definition files are now created in the subdirectory ./database/saphana and archived in the file database-setu
p.tar file.

1.3.2 Extract Database Definition Files to SAP HANA


When SAP HANA and MediationZone are not installed on the same machine (the database may be installed on any machine
within the network), the database definition files need to be transferred to the SAP HANA machine before the database can be
created.

1. On the SAP HANA machine (as SAP HANA UNIX user): transfer the database-setup.tar file from the
MediationZone machine and extract the files:

$ tar -xvf ./database-setup.tar

2. Set the permissions for the extracted files:

$ chmod -R 755 ./saphana

1.3.3 SAP HANA Database Creation

The creation of the database must be made by the SAP HANA UNIX user, or another UNIX user with the same privileges, on the
machine where SAP HANA is installed. The SAP HANA UNIX user is assumed in this installation

1. Create the SAP HANA database instance. The working directory is saphana.

$ ./saphana_create_instance.sh

If no error occurs, the database creation will now be completed and the rest of this section can be ignored.

Hint!
When the instance creation script has been executed, there is a log file in the /tmp directory that can be used
for trouble shooting. The mz.log file contains SAP HANA responses from the database creation.

2. If the script fails, clean up the system before the next try:

Stop DB (Needed to drop it):

hdbsql -i 90 -d SystemDB -u SYSTEM -p QAmzadm1n "ALTER


SYSTEM STOP DATABASE MZ"

Drop DB:

7
hdbsql -i 90 -d SystemDB -u SYSTEM -p QAmzadm1n "DROP
DATABASE MZ"

If you require to change any installation parameter defined in the install.xml, the installation must be restarted from the
generation step. For further information, see 1.3.1 Generation of SAP HANA Database Definition Files.

1.4 Software Installation


This step must be executed as the mzadmin UNIX user. The following command session will setup the directory structure and
install all the software. The release content directory is the working directory for the installation.

To install the software:

1. Enter the extracted directory:

$ cd ./<staging directory>/<release content directory>

2. Execute the installation:

$ ./setup.sh install

Hint!
The setup script verifies that the target filesystem has at least 5GB of free space. If the validation fails you will
be prompted to continue or not. Choosing not to continue aborts the installation. You can disable this validation
by adding a flag to the setup script.

$ ./setup.sh install -DsilentMode=y

The Platform will be automatically started and shut down during the installation.

Note!
If the Platform fails to start, check the platform.log file in $MZ_HOME/log for details.

3. Start the Platform:

$ mzsh startup platform

The installation of the Platform Container is now completed.

1.5 STR Configuration Script


Run the following command to call the script specified by the property install.str.config-script in install.xml :

8
$ ./setup.sh configure

1.6 SAP HANA Connection


This step must be executed as the mzadmin UNIX user.

Note!
In this step you are asked to provide the path to the ngdbc.jar (SAP HANA JDBC driver). This JDBC driver is not
included in the MediationZone release, but should be provided by your SAP contact.

1. Run the the following command to configure the SAP HANA connection parameters:

$ ./setup.sh configure_saphana

After you have completed this step, you have completed 3. Installation of the Platform Container and you can revert to following the
installation procedure described in full in the Installation Instructions.

9
2. Properties for SAP HANA
This chapter describes the SAP HANA related properties that you can set for MediationZone.

These settings are used by the Platform for the connection towards the MediationZone database, and by EC/ECSAs for
connections towards external databases.

Property Description

saphana.connectionpool.maxlimit Default value: 10

This property specifies the maximum number of connections in the pool. It is recommended
that the value is set to 3 or greater. A usual setting would be between 10 and 100.

10
3. Changing Platform Database
This section describes how to change the Platform database to SAP HANA on an existing MediationZone installation.

Note!
Changing the database will cause the stored data to be lost.

This includes:
System log messages
Duplicate Batch processing data
Archiving data
Error Correction System data
User Access data (deprecated and configurable with Platform property)
System Statistics
Alarm data
Group Server data
License data
Workflow transactions and workflow states

Migration of the data listed above is possible, however the method for this is outside the scope of this document.

Follow these steps to change the Platform database type to a SAP HANA database.

1. Create a properties file for the new database. This file contains the database related properties that are available when
you install MediationZone.

$ mzsh mzadmin/<password> db-scripts create-properties \


--properties-file <properties file>

2. Update the properties that are applicable for the new database type. For further information about the properties in this file,
see 1.1 Installation Properties for SAP HANA.

3. Extract the database scripts that are required to create the new database.

$ mzsh mzadmin/<password> db-scripts extract


--output-directory <db script directory> \
--properties-file <properties file>

4. When the database and MediationZone are not installed on the same machine (the database may be installed on any
machine within the network), you need to transfer the database definition files.

5. Create the new database.

To create the SAP HANA database, follow the steps in 1.3.3 SAP HANA Database Creation.

6. Disable all workflow groups from the Execution Manager in Desktop, or by entering an mzsh command, for example:

$ mzsh mzadmin/<password> wfgroupdisable \*

Note!
If you use the wfgroupdisable command, make sure that you enable all system tasks again when you are
done.

7. Stop all batch workflows and let them finish execution.

11
7.

8. Shut down all connected Desktops.

9. If you want to see which Desktops are connected, you can use the following command:

$ mzsh mzadmin/<password> pico -view

10. Shut down all EC/ECSAs and the Platform.

$ mzsh shutdown platform <ec name> <ecsa name>

11. Set up the connection to the new database.

$ cd ./scripts/system-configure
$ ./saphana.sh

12. Start the platform.

$ mzsh startup platform

13. Start all EC/ECSAs that were previously shut down.

$ mzsh startup <ec names> <ecsa names>

14. Enable the workflow groups.

12
4. Changing Database Password
Use the procedure below to change the password of the user mzadmin in a SAP HANA database.

Note!
A prerequisite for this to work properly is that the database is only used by the Platform and not by any configurations.

1. Disable all workflow groups, either from the Execution Manager in Desktop, or by using the mzsh wfdisable command.

2. Let all batch workflows finish execution.

Note!
Batch workflows containing Inter Workflow agents that do not have the Deactivate on Idle check box selected
will have to be shutdown manually.

3. Use the command mzsh topo to list the instances of the the service storage-dispatcher.

$ mzsh topo get --format data-only


topo://services:standard/obj:storage-dispatcher

Example - List of sevice instances

{
"storage-dispatcher1" : {
"config" : {
"db-properties" : {
"currentSchema" : "mzadmin"
"databaseName" : "MZ"
}
"password" :
"DR_DEFAULT_KEY-48851644227183C2041D838568E117EC",
"type" : "saphana",
"url" : "jdbc:sap://myhost:39013/?"
"user" : "mzadmin"
},
"start-after" : [],
"template" : "1/standard/saphana"
}
}

4. Use the mzsh topo command to update the passwords in the STR:

$ mzsh topo set


topo://services:standard/val:storage-dispatcher.<service
instance>.\
config.password `mzsh encryptpassword <password>`

13
Example - Updating the password(s)

$ mzsh topo set


topo://services:standard/val:storage-dispatcher.storage
-dispatcher1.\
config.password `mzsh encryptpassword mypassword`

5. Shut down the platform using the mzsh shutdown command.

6. Update the SAP HANA password to correspond to the one you set in the STR.

7. Startup the Platform.

8. Enable all workflow groups and start all workflows again.

14
15

You might also like