SET-EFFECTIVE-TENANT function

Sets the effective tenancy of a multi-tenant database connection for a super-tenant user. A super tenant has no real tenancy of its own, but can act as if it is a particular regular tenant without the user having to authenticate a new connection identity that has that particular tenancy. Therefore, the effective tenancy is the acting regular tenancy of a super tenant.

Initially, OpenEdge sets the effective tenancy for any super-tenant identity to the default tenant. The purpose of this function is to change the effective tenancy of a super tenant identity to any regular tenant.

Syntax

SET-EFFECTIVE-TENANT ( tenant-expression[ , database-name ])
tenant-expression
An integer or character string expression. If tenant-expression evaluates to an integer, the value must be a valid tenant ID for a regular or default tenant. If tenant-expression evaluates to a character string, the value must be a valid tenant name for a regular or default tenant. Otherwise, the statement raises ERROR.
database-name
A character expression that evaluates to a logical database name or database alias. If no database is specified and more than one database is connected, the AVM raises an error. If the database name is not a valid name for a connected database, the AVM raises an error.

Notes

See also

GET-EFFECTIVE-TENANT-ID function, GET-EFFECTIVE-TENANT-NAME function