SAP MaxDB Deployment Guide for Linux

This deployment guide shows you how to deploy and connect to a Compute Engine virtual machine (VM) that is ready for the installation of SAP MaxDB on a Linux operating system.

The instructions in this guide use Cloud Deployment Manager to deploy and configure the VM, the Linux operating system, and the required disk volumes for SAP MaxDB.

For details on planning your deployment, see the SAP MaxDB Planning Guide.


If you do not already have a Google Cloud project with billing enabled, you must create one before you can deploy a VM for your SAP MaxDB installation.

To create a project:

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud Console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Make sure that billing is enabled for your Cloud project. Learn how to confirm that billing is enabled for your project.

  4. In the Google Cloud Console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  5. Make sure that billing is enabled for your Cloud project. Learn how to confirm that billing is enabled for your project.

Configuring the gcloud command environment

These instructions use Cloud Shell to enter gcloud commands that deploy or configure your Google Cloud resources. Cloud Shell is accessed through the Cloud Console in your browser.

Cloud Shell runs on a VM that Google Cloud provisions each time you start Cloud Shell. The first time you use Cloud Shell, Google Cloud also creates a persistent $HOME directory for you, which is restored each time you open Cloud Shell.

The provisioned VM includes the latest Cloud SDK, which provides the gcloud command-line tool. Therefore, the gcloud commands that you use in Cloud Shell are the same as those you would use in a locally installed instance of the Cloud SDK.

If you have the Cloud SDK installed, you can issue the gcloud commands that are used in these instructions from your local machine. However, with a locally installed Cloud SDK you must always make sure that you are using the latest version of the Cloud SDK.

Whether you use Cloud Shell or Cloud SDK, you can can set and change the properties of your gcloud command environment and save them as a configuration. Configurations are collections of key-value pairs that influence the behavior of the gcloud commands.

Some basic actions you can take with a configuration in Cloud Shell include:

  • Initialize a configuration with gcloud init.

  • Check the settings of your current gcloud configuration with gcloud config list.

  • Change the Google Cloud project you are working in with gcloud config set project [PROJECT_ID] where [PROJECT_ID] represents your Google Cloud project.

  • Set a default region with gcloud config set compute/region [REGION] where [REGION] represents a Google Cloud region.

  • Set a default zone with gcloud config set compute/zone [ZONE] where [ZONE] represents a Google Cloud zone.

  • Create a new configuration with gcloud config configurations create [NAME] where [NAME] represents the name for the configuration.

For more information about working with configurations, see Managing Cloud SDK configurations.

Creating a network

For security purposes, create a new network. You can control who has access by adding firewall rules or by using another access control method.

If your project has a default VPC network, don't use it. Instead, create your own VPC network so that the only firewall rules in effect are those that you create explicitly.

During deployment, VM instances typically require access to the internet to download Google's monitoring agent. If you are using one of the SAP-certified Linux images that are available from Google Cloud, the VM instance also requires access to the internet in order to register the license and to access OS vendor repositories. A configuration with a NAT gateway and with VM network tags supports this access, even if the target VMs do not have external IPs.

To set up networking:

  1. Go to Cloud Shell.

    Go to Cloud Shell

  2. To create a new network in the custom subnetworks mode, run:

    gcloud compute networks create NETWORK_NAME --subnet-mode custom

    Replace NETWORK_NAME with the name of the new network. The network name can contain only lowercase characters, digits, and the dash character (-).

    Specify --subnet-mode custom to avoid using the default auto mode, which automatically creates a subnet in each Compute Engine region. For more information, see Subnet creation mode.

  3. Create a subnetwork, and specify the region and IP range:

    gcloud compute networks subnets create SUBNETWORK_NAME \
            --network NETWORK_NAME --region REGION --range RANGE

    Replace the following:

    • SUBNETWORK_NAME: the name of the new subnetwork.
    • NETWORK_NAME: the name of the network you created in the previous step.
    • REGION: the region where you want the subnetwork.
    • RANGE: the IP address range, specified in CIDR format, such as If you plan to add more than one subnetwork, assign non-overlapping CIDR IP ranges for each subnetwork in the network. Note that each subnetwork and its internal IP ranges are mapped to a single region.
  4. Optionally, repeat the previous step and add additional subnetworks.

Setting up a NAT gateway

If you need to create one or more VMs without public IP addresses, you need to use network address translation (NAT) to enable the VMs to access the internet. Use Cloud NAT, a Google Cloud distributed, software-defined managed service that lets VMs send outbound packets to the internet and receive any corresponding established inbound response packets. Alternatively, you can set up a separate VM as a NAT gateway.

To create a Cloud NAT instance for your project, see Using Cloud NAT.

After you configure Cloud NAT for your project, your VM instances can securely access the internet without a public IP address.

Deploying a Linux VM for SAP MaxDB with Deployment Manager

The following instructions use Deployment Manager to deploy a VM instance with Linux and all of the persistent disks that SAP MaxDB requires.

About Deployment Manager

In these instructions, you define the resource options for your installation in a Deployment Manager configuration file template.

Deployment Manager treats all of the resources that are created for your SAP system as a single entity called a deployment. You can view and work with all of the deployments for your project on the Deployments page in the Cloud Console.

Be aware of the following behaviors when using Deployment Manager:

  • Deleting a deployment deletes all of the resources associated with the deployment, including the VMs, the persistent disks, and any SAP systems that are installed on the VM.
  • By default, Deployment Manager uses the ACQUIRE resource creation policy. If you specify a VM name that is already in use by another VM in your project, Deployment Manager doesn't create a new VM, but instead adds the existing VM to your new deployment. If your original VM was created by a previous run of Deployment Manager, the VM is associated with two deployments.

    If you then delete the new deployment, the acquired VM is deleted from the deployment that originally created it. To avoid such a scenario, either set the Deployment Manager resource policy to CREATE, or make sure that you use unique resource names in your new deployment.

    For information about the policies you can use while creating resources with Deployment Manager and how to specify them, see the Deployment Manager documentation.

Deployment procedure

  1. Open the Cloud Shell.

    Go to the Cloud Shell

  2. Download the template.yaml configuration file template to your working directory by entering the following command in the Cloud Shell:

  3. Optionally, rename the template.yaml file to identify the configuration it defines.

  4. Open the template.yaml file in the Cloud Shell code editor.

    To open the Cloud Shell code editor, click the pencil icon in the upper right corner of the Cloud Shell terminal window.

  5. In the template.yaml file, update the following property values by replacing the brackets and their contents with the values for your installation.

    Property Data type Description
    type String

    Specifies the location, type, and version of the Deployment Manager template to use during deployment.

    The YAML file includes two type specifications, one of which is commented out. The type specification that is active by default specifies the template version as latest. The type specification that is commented out specifies a specific template version with a timestamp.

    If you need all of your deployments to use the same template version, use the type specification that includes the timestamp.

    instanceName String The name of the VM instance on which SAP MaxDB will be installed. The name must be 13 characters or less and be specified in lowercase letters, numbers, or hyphens.
    instanceType String The type of Compute Engine virtual machine on which SAP MaxDB will be installed. Specify a machine type with two or more vCPUs. For example, `n1-standard-4`. If you are running SAP MaxDB with SAP NetWeaver on the same VM, select a machine type that includes enough CPUs and memory to support both systems. See the SAP NetWeaver Planning Guide.
    zone String The zone in which you are deploying your SAP MaxDB. It must be in the same region that you selected for your subnetwork.
    subnetwork String The name of the subnetwork that you created in a previous step. If you are deploying to a shared VPC, specify this value as [SHAREDVPC_PROJECT]/[SUBNETWORK]. For example, myproject/network1.
    linuxImage String The name of the Linux operating- system image or image family that you are using with SAP MaxDB. To specify an image family, add the prefix family/ to the family name. For example, family/rhel-7 or family/sles-12-sp3-sap. To specify a specific image, specify only the image name. For the list of available image families, see the Images page in the Cloud console.
    linuxImageProject String The Google Cloud project that contains the image you are going to use. This project might be your own project or a Google Cloud image project, such as rhel-sap-cloud or suse-sap-cloud. For a list of GCP image projects, see the Images page in the Compute Engine documentation.
    maxdbSID String The database instance ID.
    maxdbRootSize Integer The size in GB of /sapdb, which is the root directory of the database instance. The minimum and default values for maxdbRootSize are both 8 GB.
    maxdbDataSize Integer The size of /sapdb/[DBSID]/sapdata, which holds the database data files. The minimum and default values for maxdbDataSize are both 30 GB.
    maxdbLogSize Integer The size of /sapdb/[DBSID]saplog, which holds the database transaction logs. The minimum and default values for maxdbLogSize are both 8 GB.
    maxdbBackupSize Integer The size of the /maxdbbackup volume. This property is optional. If set to 0 or omitted, no disk is created.
    maxdbDataSSD boolean Specifies whether the data drive uses an SSD persistent disk (`Yes`) or an HDD persistent disk (`No`). `Yes` is the default.
    maxdbLogSSD boolean Specifies whether the log drive uses an SSD persistent disk (`Yes`) or an HDD persistent disk (`No`). `Yes` is the default. SSD is recommended for the log drive.
    usrsapSize Integer Required only if you are installing SAP MaxDB to run with SAP NetWeaver on the same VM instance.
    sapmntSize Integer Required only if you are installing SAP MaxDB to run with SAP NetWeaver on the same VM instance.
    swapSize Integer Required only if you are installing SAP MaxDB to run with SAP NetWeaver on the same VM instance.

    The following configuration file creates a VM that is configured to run both the SAP MaxDB database server and SAP NetWeaver. The configuration file directs Deployment Manager to deploy an n1-standard-16 VM that is running a SLES 12 SP3 operating system. The VM includes all of the directories that are required to run SAP MaxDB with NetWeaver.

    - name: sap_maxdb
      # By default, this configuration file uses the latest release of the deployment
      # scripts for SAP on Google Cloud.  To fix your deployments to a specific release
      # of the scripts, comment out the type property above and uncomment the type property below.
      # type:
        instanceName: xmp-maxdb-lin
        instanceType: n1-standard-16
        zone: us-central1-f
        subnetwork: example-sub-network
        linuxImage: family/sles-12-sp3-sap
        linuxImageProject: suse-sap-cloud
        maxdbSID: MD1
        maxdbRootSize: 10
        maxdbDataSize: 50
        maxdbLogSize: 30
        maxdbBackupSize: 100
        maxdbDataSSD: Yes
        maxdbLogSSD: Yes
        usrsapSize: 15
        sapmntSize: 15
        swapSize: 24
  6. Create the VM instance:

    gcloud deployment-manager deployments create [DEPLOYMENT-NAME] --config [TEMPLATE-NAME].yaml

    The above command invokes the Deployment Manager, which deploys the VM according to the specifications in your template.yaml file. The process might take a few minutes. To check the progress of your deployment, follow the steps in the next section.

Verifying deployment

The following steps use Cloud Logging, which might incur charges. For more information, see Cloud Logging pricing.

  1. Open Cloud Logging to check for errors and monitor the progress of the installation.

    Go to Logging

  2. On the Resources tab, select Global as your logging resource. If 'INSTANCE DEPLOYMENT COMPLETE' is displayed for a VM, Deployment Manager processing is complete for the VM.

    Logging display

  3. After the SAP MaxDB system deploys, connect to your VM by using SSH. From the Compute Engine VM instances page, you can click the SSH button for your VM instance, or you can use your preferred SSH method.

    SSH button on Compute Engine VM instances page.

  4. Change to the root user.

    sudo su -
  5. At the command prompt, enter df -h. Ensure that you see output similar to the following, such as the //sapdb/[DBSID]/sapdata directory.

    Data volumes created by the script.

  6. If you are installing SAP MaxDB on the same VM as SAP NetWeaver, confirm that the swap directory was created by entering the following command:

    cat /proc/meminfo | grep Swap

    You should see results similar to the following example:

    Example of terminal output when the swap directory exits.

If any of the validation steps show that the installation failed:

  1. Correct the error.
  2. On the Deployments page, delete the deployment to clean up the VMs and persistent disks from the failed installation.
  3. Rerun your deployment.

Installing the database

Now that your operating system is configured, you can install your SAP MaxDB database. MaxDB is typically installed with the SAP product that it is integrated with.

To install SAP MaxDB on your VM:

  1. Establish an SSH connection to your Linux-based VM.
  2. Download the SAP Software Provisioning Manager (SWPM), the SAP product installation media, and MaxDB installation Media according to SAP installation guides.
  3. Install your SAP product and SAP MaxDB database according to the SAP installation guides for your SAP product. For additional guidance, see the SAP MaxDB documentation.

SAP provides additional installation information in SAP Note 1020175 - FAQ: SAP MaxDB installation, upgrade or applying a patch.

Performing post-deployment tasks

Before using your SAP MaxDB instance, we recommend that you perform the following post-deployment steps:

  1. Update your SAP MaxDB software with the latest patches, if available.
  2. Install any additional components.
  3. Configure and back up your new SAP MaxDB database.

For more information, see SAP MaxDB Database Administration.


This section contains information about how to correct common issues.

Troubleshooting connecting to your VM

If you are having issues connecting to your VM through SSH, ensure that you have created a firewall rule to open port 22 on the GCP network you are using.

For other possible issues, see Known issues for SSH from the browser.