on 11-30-2015 8:01 PM
Hello,
Checking master and sybsystemprocs I've found the following sp :
"sp_aux_checkroleperm"
but I cannot find information related to it in the product manuals.
Does anyone knows about it and what it's supposed to do?
Thank you
Regards
Jose
SAP/Sybase has many a sub/helper procedures where logic is neatly packed so that it can be called from various places. Manuals may not explain about the the sub/helper procedure(s). e.g. sp_sysmon calls a number of procedures depending on options chosen. But you will find documentation about sp_sysmon mostly.
SAP/Sybase has ( so far !) not hidden the source SQL of most of the stored procedures either. So if you are curious you can look at the code using the technique Bret shows above.
So the source code above and the name of the procedure give you a hint of what is being done.
sp_depends for this procedure shows that it taps into configuration system tables and the proc itself is called by other system procedures like sp_dboption, sp_configure, sp_dropdevice etc...
HTH
Avinash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sp_aux_checkroleperm is called as a subprocedure by many of the other system stored procedures. The initial comment block describes what it does:
1> sp_helptext sp_aux_checkroleperm
2> go
# Lines of Text
---------------
12
(1 row affected)
text
-------------------------------------------------------------------------------
----------------
/*
** SP_AUX_CHECKROLEPERM
** Checks if the user has a particular role or permission. It does this
** check depending on whether granular permissions is enabled or not. If
** it is not enabled then the role specified by @rolename will be checked
** o
therwise the permission specified by @role_perm_name will be checked.
** If a @rolename is NULL and granular permissions is not enabled or
** if granular permissions is enabled and @role_perm_name is NULL then
** it assumed that there was no role/permissi
on check required and a
** 0 is returned.
**
** Parameters:
** @rolename - Name of role to check for if granular permissions
** not enabled. If @rolename is "dbo" then we check
** to see if user_id() is 1.
**
** @role_perm_name - Name of role
or permission to check if granular
** permissions is enabled. When granular permissions is
** enabled some stored procedures require either a
** permission or a role. In the case when checking for
** a role a rolename may be passed i
n instead of a
** permission name.
**
** @dbname - If not null then pass to has_privilege as database
** name to do the permission check in.
** @gp_enabled - (output) 0 if granular permissions is not enabled
** otherwise set to 1.
** Return
s:
** 0 - User has role or permission.
** 1 - role checked and user doesn't have it.
** 2 - permission checked and user doesn't have it.
** History:
** August 2010 malloy written.
*/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.