Skip to Content
Technical Articles
Author's profile photo Volker Saggau

HANA Cloud deployment with several databases

Problem:

If you have more that one HANA Cloud server in your account, you have to tell the system which database you want to choose for your work.

Solution: 

You need to modify your mta.yaml file like this:

You need to add in a default scenario:

  • resources:
  •    parameters:
  •       service-name: <my-service-name>
  •       config:
  •            database_id: <database_id>

 

-> service-name is the name you want your serve to have at the end

Not setting the service name leads (default) to a generated name by the system. This is perfectly fine.

This sample of a service starts with “FridayXXX”. So now you are responsible for the service name.  Obviously this improves the readability.

Listing your services in cloud foundry admin you will find your service back by it’s name

HDI%20service%20with%20name%20Friday_XXX

HDI service with name FridayXXX

 

-> database_id: is the id of your SAP HANA Cloud database in Cloud Foundry. You can find the database_id at various places in your cloud foundry environment. Please do not mix up with instance_id.

Not qualifying the database_id will default into the default database of your cf space. Typical this is the first database you have created.

Summary:

With a few additions to your mta.yaml file you get more control on the deployment behaviour.

As general remarks:

  • One has to respect whitespace in yaml files.
  • The defaults are good for beginner with only on database that just want to start working.

 

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Michael Cocquerel
      Michael Cocquerel

      Could you confirm there is one default database by cloud foundry space meaning if our databases are in separated spaces, there is no need to provide database_id ?
      Could you also confirm we can provide database_id via an mta extension file at deployment time meaning there is no need to create specific mtar for each database ?

      Author's profile photo Volker Saggau
      Volker Saggau
      Blog Post Author

      Could you confirm there is one default database by cloud foundry space meaning if our databases are in separated spaces, there is no need to provide database_id ?

      Yes.

      Could you also confirm we can provide database_id via an mta extension file at deployment time meaning there is no need to create specific mtar for each database ?

      Yes.