View the roles and privileges a user or has, including roles and privileges they are inheriting. You can also use this task to view the roles and privileges for a given role.
sp_displayroles system procedure: No privileges are required to execute this procedure on yourself. However, to return the system privileges or roles for another user ID or a role, you must have the MANAGE ROLES system privilege.
sp_objectpermission system privilege: No privileges are required to execute this procedure on yourself or on objects you own. However, to call this procedure on another user ID, or on an object owned by another user ID, you must have the MANAGE ANY OBJECT PRIVILEGE system privilege.
Connect to the database
To view the roles and system privileges the user has, execute a statement that calls the sp_displayroles system procedure, similar to the following, where userid is the user ID of the user:
SELECT * FROM sp_displayroles( 'userid', 'expand_down');
To view the object-level privileges a user has, execute a statement that calls the sp_objectpermission system procedure, similar to the following:
SELECT * FROM sp_objectpermission('userid');
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|