1 Version 4.0 -- 1/15/89 sp_helprotect
______________________________________________________________________
NAME: sp_helprotect
FUNCTION:
Reports permissions by database object, and optionally by user
for that object.
SYNTAX:
sp_helprotect name [, name_in_db]
EXAMPLES:
1) grant select on titles to judy
grant update on titles to judy
sp_helprotect Version 4.0 -- 1/15/89 2
______________________________________________________________________
revoke update on titles(price) from judy
sp_helprotect titles
After this series of GRANT and REVOKE statements, executing
sp_helprotect titles results in this display:
type action user column
--------- ----------- ------- -----------
Grant Select public All
Grant Select guest All
Grant Update guest All
Grant Select judy All
Grant Update judy title_id
Grant Update judy title
Grant Update judy type
Grant Update judy pub_id
3 Version 4.0 -- 1/15/89 sp_helprotect
______________________________________________________________________
Grant Update judy advance
Grant Update judy royalty
Grant Update judy notes
Revoke Update judy price
(12 rows affected)
2) sp_helprotect judy
Displays all the permissions that judy has in the database.
PARAMETERS:
name - is either the name of the table, view, or stored pro-
cedure; or the name of a user or group in the current data-
base.
name_in_db - is a user's name in the current database.
sp_helprotect Version 4.0 -- 1/15/89 4
______________________________________________________________________
COMMENTS:
o Executing sp_helprotect reports permissions on a database
object. If the name_in_db parameter is supplied, only those
user's permissions on the database object are reported. If
name is not an object, the procedure checks to see if it is a
user or group. If so, the permissions for the user or group
are listed.
o The procedure looks for objects and users in the current data-
base only.
MESSAGES:
The name supplied for the name parameter included a reference to
a database. The name must be local to the database.
The name supplied for name_in_db is not a user or group in the
current database.
5 Version 4.0 -- 1/15/89 sp_helprotect
______________________________________________________________________
The name supplied for the name parameter is not an object, user,
or group in the current database.
PERMISSIONS:
Execute permission to public.
TABLES USED:
syscolumns, sysobjects, sysprotects, sysusers,
master.dbo.spt_values
SEE ALSO:
sp_help, GRANT, REVOKE