Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
nishithrn
Yak Posting Veteran
58 Posts |
Posted - 2003-12-27 : 07:32:29
|
| Is it that whenever any permission is granted/revoked, an entry is made in one of the system tables..?? If yes, which is that table..???Regards |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2003-12-27 : 09:41:23
|
| BOL says sysprotectsContains information about permissions that have been applied to security accounts with the GRANT and DENY statements. This table is stored in each database.HTH-------------------------What lies behind you and what lies ahead of you are small matters compared to what lies within you.-Ralph Waldo Emerson |
 |
|
|
KnooKie
Aged Yak Warrior
623 Posts |
Posted - 2004-01-02 : 07:31:26
|
| or sysobjects..........CREATE PROCEDURE usp_GrantSELECTPermissions/* Grant SELECT permissions to ALL tables in UserRpt DB */ASSET NOCOUNT ONDECLARE @tablename varchar(50)DECLARE @tablepermission CURSOR SET @tablepermission = CURSOR FORSELECT nameFROM sysobjectsWHERE type = 'U'OPEN @tablepermissionFETCH NEXT FROM @tablepermissionINTO @tablenameWHILE @@fetch_status = 0 BEGIN EXEC ('GRANT SELECT ON dbo. ' + @tablename + ' TO UserReport') FETCH NEXT FROM @tablepermission INTO @tablename ENDCLOSE @tablepermissionDEALLOCATE @tablepermission====Paul |
 |
|
|
|
|
|