INF: How Grant and Revoke work in SQL Server 6.5.ID: Q154422
|
In SQL Server version 6.5, the implementation of permissions has changed compared to previous versions. This article describes the SQL Server 6.5 behavior.
The Sysprotects table maintains information about user and group
permissions. A change in SQL Server 6.5 from the previous version is how it
writes to the Sysprotects table, which in turn affects what permission is
assigned to a user or to a group. SQL Server determines what to write to
the Sysprotects table based on the current content of the table.
SQL Server evaluates whether a row exists in the Sysprotects table for the
specific permission, action, object, and user or group. If a row exists in
Sysprotects relating to the specific permission, SQL Server performs one of
the following steps:
GRANT select ON authors_test TO user1
go
sp_helprotect authors_test
go
Owner Object Grantee Grantor ProtectType Action Column
----- ------------ ------- ------- ----------- ------ ---------
dbo authors_test user1 dbo Grant Select (All+New)
GRANT select ON authors_test TO group1
go
sp_helprotect authors_test
go
Owner Object Grantee Grantor ProtectType Action Column
----- ------------ ------- ------- ----------- ------ ---------
dbo authors_test user1 dbo Grant Select (All+New)
dbo authors_test group1 dbo Grant Select (All+New)
REVOKE select ON authors_test FROM group1
go
sp_helprotect authors_test
go
Owner Object Grantee Grantor ProtectType Action Column
----- ------------ ------- ------- ----------- ------ ---------
dbo authors_test user1 dbo Grant Select (All+New)
REVOKE select ON authors_test FROM group1
go
sp_helprotect authors_test
go
Owner Object Grantee Grantor ProtectType Action Column
----- ------------ ------- ------- ----------- ------ ---------
dbo authors_test user1 dbo Grant Select (All+New)
GRANT select ON authors_test TO public
go
REVOKE select ON authors_test FROM group1
go
sp_helprotect authors_test
go
Owner Object Grantee Grantor ProtectType Action Column
----- ------------ ------- ------- ----------- ------ ---------
dbo authors_test user1 dbo Grant Select (All+New)
dbo authors_test group1 dbo Revoke Select (All+New)
dbo authors_test public dbo Grant Select (All+New)
GRANT select ON authors_test TO group1
go
sp_helprotect authors_test
go
Owner Object Grantee Grantor ProtectType Action Column
----- ------------ ------- ------- ----------- ------ ---------
dbo authors_test user1 dbo Grant Select (All+New)
dbo authors_test group1 dbo Grant Select (All+New)
dbo authors_test public dbo Grant Select (All+New)
Additional query words: sql
Keywords : kbnetwork SSrvGen SSrvSQL_Admin
Version : 6.5
Platform : WINDOWS
Issue type :
Last Reviewed: March 31, 1999