Try OpenEdge Now
skip to main content
Programming Interfaces
Data Management : Multi-tenant ABL : Coding for super-tenant access : Tenancy identification : Identifying database connection tenancy
 
Identifying database connection tenancy
A super tenant can return information about database connection tenancy using these ABL built-in functions:
*IS-DB-MULTI-TENANT function — Returns TRUE if a connected database is multi-tenant enabled.
*TENANT-NAME and TENANT-ID function — Returns the tenancy associated with a current database connection identity.
*TENANT-NAME-TO-ID function — Returns the tenant ID, given the tenant name associated with a current database connection identity.
*GET-EFFECTIVE-TENANT-NAME and GET-EFFECTIVE-TENANT-ID function — Returns the current effective tenancy for a connected database.
Note: The GET-EFFECTIVE-TENANT-* functions return the most recent effective tenancy for a database connection, where as the corresponding TENANT-* functions return the real tenancy of the current database connection identity. The effective tenancy for a database connection can be set using the SET-EFFECTIVE-TENANT function (see Super-tenantqueries), where as the real tenancy for the connection identity can only be set by applying a user authentication or single sign-on (SSO) operation to the connection. These two tenancies can be different, with the most recently set tenancy overriding the other for purposes of effective tenancy when accessing the database.
Note: You cannot use the TENANT-NAME or TENANT-ID function in the WHERE option of the record phrase. Instead, you can use these functions in the TENANT-WHERE option of the record phrase. For more information, see TENANT-WHERE option of the record phrase.