Returns the login profile name of the specified login profile ID, or the login profile name of the login profile associated with the current login or the specified login suid.
lprofile_id(ID)
select lprofile_name(lprofile_id('jon') )
------------------ admin_lr
select lprofile_name(3)-------------intern_lr
select lprofile_name()
------------------ supervisor_lr
Specify a login profile ID – lprofile_name returns its corresponding login profile name. If you specify a login suid, lprofile_name returns the associated (if any) login profile name.
Do not specify ID – lprofile_name returns the login profile name of the current login.
ANSI SQL – Compliance level: Transact-SQL extension.
The permission checks for lprofile_name differ based on your granular permissions settings.
Granular Permissions | Description |
---|---|
Enabled | With granular permissions enabled, any user can execute lprofile_name to return the profile name of their own profile. You must have manage any login profile permission to execute lprofile_name and retrieve the profile name of other users. |
Disabled | With granular permissions disabled, any user can execute lprofile_name to return the profile name of their own profile. You must have sso_role to execute lprofile_name and retrieve the profile name of other users. |