|
Sybernet / Supplied Procedures Reference
Release 3.00 Dec 18, 2005 |
|
This procedure is used by Sybernet to determine if execute permission has been granted to a user. The advantage of using a stored procedure means you can select the permission on any object from any database. Sybernet does not assume everyone belongs to group "public." This is different from Sybase's interpretation. If you disagree, and you wish Sybernet to check the permissions in public as well, change the default for checkPublic to 1.
procedure sp_sysprotects
(
@procname varchar(92)
, @checkPublic int = 0
, @id int = null output
, @uid int = null output
, @action smallint = 224 output
, @protecttype tinyint = null output
, @columns varbinary(133) = null output
, @grantor int = null output
)
| Parameter | Description |
|---|---|
procname |
Object to be examined. This name should be fully qualified if this object resides in another database. |
checkpublic |
Determines if public access is okay. |
action |
The type of permission you are looking for (224 is execute permission). |
protecttype |
Determines if this permission is granted or revoked:
|
The following example illustrates how to call SP_SYSPROTECTS:
declare
@protecttype tinyint
begin
exec sp_sysprotects
@procname = 'http.dbo.sp_html_who'
, @protecttype = @protecttype output
if (@protecttype=0) or (@protecttype=1)
select 'Granted!'
else
select 'Not granted!'
end