Create a geodatabase in SAP HANA

Available with Standard or Advanced license.

To create a geodatabase in SAP HANA, read the prerequisites, then follow the steps to install and configure SAP HANA and use the Enable Enterprise Geodatabase geoprocessing tool or a Python script to create a geodatabase in the database.

Prerequisites

Before you create a geodatabase in SAP HANA, do the following:

  1. Confirm the ArcGIS, SAP HANA, and operating system combinations you want to use are compatible.
  2. Download the SAP HANA client required to connect to the version of SAP HANA you'll use to store your geodatabase.
  3. Obtain an ArcGIS Server keycodes file and place it in a location you can access from the ArcGIS client you'll use to create the geodatabase.
  4. Install and configure SAP HANA.

1. Install and configure SAP HANA

Before you can run the Enable Enterprise Geodatabase tool or script to create a geodatabase in SAP HANA, you (or your IT department or database administrator) must install and configure the SAP HANA database management system. Follow the instructions provided by SAP to install and configure SAP HANA.

2. Configure clients

Before you create a geodatabase, you must configure your ArcGIS client to connect to SAP HANA. The ArcGIS clients you can use to create a geodatabase in SAP HANA are ArcGIS Pro Standard, ArcGIS Pro Advanced, or ArcGIS Server (enterprise edition). You can run a Python script from any of these clients, or you can run the Enable Enterprise Geodatabase geoprocessing tool from ArcGIS Pro. The minimum software versions supported are ArcGIS Pro 2.1 and ArcGIS Server 10.6.

Note:

You need an ArcGIS Server (enterprise) keycodes file to authorize your geodatabase in the next section. Even if you do not run a Python script from an ArcGIS Server machine to create the geodatabase, you must install and authorize ArcGIS Server to get the keycodes file. You may need to copy the file from the ArcGIS Server machine to a location the geoprocessing tool or Python script can access.

Once you create a geodatabase in the SAP HANA database, ArcMap and related clients (such as ArcGlobe or ArcCatalog can no longer connect to it.

Follow these steps to install and configure the client you need to create the geodatabase. If you do not have permissions to install software, have your IT department perform these steps.

  1. Install the ArcGIS client you want to use for geodatabase creation.

    Follow the instructions provided in the software installation guides.

  2. In most cases, your ArcGIS client is installed on a different computer than the SAP HANA database server; therefore, install and configure the SAP HANA ODBC driver on the ArcGIS client computer. Follow the client configuration steps applicable to your ArcGIS client:

3. Create an sde user

Using SAP HANA tools or SQL, create a standard database user named sde. If you don't create a standard user, you must grant the sde user at least the minimum privileges required for the geodatabase administrator.

If you are not the SAP HANA administrator, ask the administrator to create the sde user and grant required privileges.

4. Connect to the database as the sde user

You can use the Create Database Connection geoprocessing tool or the New Database Connection option in ArcGIS Pro to connect to the SAP HANA database. Connect as the sde user and save the password with the connection.

5. Create a geodatabase

Use one of the methods described in the following sections to create a geodatabase in your SAP HANA database.

Use the Enable Enterprise Geodatabase tool

If you installed and configured ArcGIS Pro to connect to SAP HANA, you can run the Enable Enterprise Geodatabase tool. This tool uses the database connection file (.sde) you created in section 4 to connect to the database and create the geodatabase system tables, views, functions, and procedures.

Use a Python script

Follow these steps to run a Python script from an ArcGIS Pro or ArcGIS Server machine:

  1. Create a text file on the ArcGIS client machine and copy the following script into the file. Change the location on the local machine where your ArcGIS Server keycodes file is stored.
    import arcpy, os, sys, tempfile
    
    if len(sys.argv) != 3:
    	print ("usage: enable_gdb.py  database_dsn  sde_pwd")
    	sys.exit(3)
    
    path = tempfile.gettempdir()
    if os.path.exists(path + r'\enable_gdb.sde'):
        os.remove(path + r'\enable_gdb.sde')
        
    
    arcpy.management.CreateDatabaseConnection(path ,r'enable_gdb.sde', 'SAP HANA',sys.argv[1], 'DATABASE_AUTH','sde',sys.argv[2], 'SAVE_USERNAME')
    
    arcpy.management.EnableEnterpriseGeodatabase(path + r'\enable_gdb.sde', r"\\mykeycodes\Server_Ent_Adv")
    
    if os.path.exists(path + r'\enable_gdb.sde'):
        os.remove(path + r'\enable_gdb.sde')
        
    sys.exit(0)
  2. Save the file with a .py extension.
  3. Run the script, providing options and information specific to your site.

    In the following example, the file enable_gdb.py is run against the SAP HANA data source named hana1. The connection is made as the sde login with password M@kagdb4me.

    enable_gdb.py hana1 M@kagdb4me

    You can find messages related to geodatabase creation in the sde_setup.log file, which is created in the directory specified for your TEMP or TMP variable on the computer where the Python script is run. If you have any problem creating a geodatabase, check this file to troubleshoot the problem.

A geodatabase is created in your SAP HANA database.

Next, create users and user groups, and grant the privileges users require to get their work done.

Tip:

You can use the Create Database User geoprocessing tool to create a standard SAP HANA database user.