Displaying the login profile name

To display the login profile name of a specified login profile ID or login suid, use:

lprofile_name([{login profile id | login suid}])

System security officer role is required to view the profile name of the specified login ID if it is not the current user’s login ID.

The following displays the login profile name of the specified login profile ID:

Example 4

select lprofile_name(3)
-------------
   intern_lr

If no parameter is specified the login profile name of the current user is returned. If a login profile is not associated with the specified login account, then the login profile name of the default login profile is returned. The login profile ignore parameter must not be set.

The login profile name can also be displayed using sp_displaylogin. If a login profile is not directly associated with the login account and a default login profile exist, the name of the default login profile is displayed.