Try OpenEdge Now
skip to main content
Programming Interfaces
Data Management : Multi-tenant ABL : Coding for super-tenant access : Tenancy identification : Identifying the tenants defined in a database
 
Identifying the tenants defined in a database
There are some applications where a super tenant might need to query the database directly for all the tenants that it defines, or where accessing multi-tenant data for a set of tenants is more conveniently done by querying the tenants from the database directly. The tenant records for all tenants configured in a database are stored in the _Tenant metaschema table, and the following fields identify the particular tenant defined by each _Tenant record:
*_Tenant-Name — A character field containing the tenant name
*_TenantID — An integer field containing the tenant ID
You can then query these fields to return the names and IDs of all tenants defined in the database without reference to database connection or record tenancy.
Note: You can also identify the groups defined for all tables with groups, and their tenant membership. For more information, see Managing access to tables with groups.