A super tenant can return information about database connection tenancy using these ABL built-in functions:
IS-DB-MULTI-TENANTfunction — Returns TRUE if a connected database is multi-tenant enabled.
TENANT-NAMEandTENANT-IDfunction — Returns the tenancy associated with a current database connection identity.
TENANT-NAME-TO-IDfunction — Returns the tenant ID, given the tenant name associated with a current database connection identity.
GET-EFFECTIVE-TENANT-NAMEandGET-EFFECTIVE-TENANT-IDfunction — 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.