cancel
Showing results for 
Search instead for 
Did you mean: 

Use Database module (HDI container) across multiple MTA projects

0 Kudos

Hi,

I have an exsting DB module in an MTA project in cloud foundry and I have my tables and views created and data maintained in this DB instance .

I'm starting off a new MTA project, but i would still need to access the same DB tables and views from my first project here in the second MTA project . Is there anyway to achieve this ?

Accepted Solutions (0)

Answers (2)

Answers (2)

gregorw
Active Contributor
0 Kudos

Please check out my repository access-hdi-with-synonyms as Synonyms are the way to go to access other HDI containers.

mariusobert
Developer Advocate
Developer Advocate
0 Kudos

Hi,

I never tried this myself. Have you tried to add another HDI resource in the MTA.yaml file of the new project and use the same service instance/HDI container name?

0 Kudos

      I tried creating a resource in the 2nd MTA with the following :

      resources:
       - name: hdi_tinyworlddb
         parameters:
            config:
              schema: TINYWORLDMTA_HDI_TINYWORLDDB_1
         properties:
            hdi-container-name: tinyworldmta-hditinyworlddb-I34537FqwYlBuu5cjwm9eU
         type: com.sap.xs.hdi-container
      

      where

      1. hdi_tinyworlddb : is the same resource name used in original MTA
      2. tinyworldmta-hditinyworlddb-I34537FqwYlBuu5cjwm9eU : is the name of instance that got created with ref to above resource(hdi_tinyworlddb) when the 1st MTA was Build
      3. Schema TINYWORLDMTA_HDI_TINYWORLDDB_1: is the schema name that shows up in the service key file for the above instance(tinyworldmta-hditinyworlddb-I34537FqwYlBuu5cjwm9eU)

      I hope this is what you meant?

      It doesnt seem to bring any of the tables,views in the new instance that gets created when i build 2nd MTA DB module when i check the new instance via database explorer.

      mariusobert
      Developer Advocate
      Developer Advocate
      0 Kudos

      Yes, this is what I meant. In this case I'm not sure 😞