|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Tuesday, April 16, 2013 4:22 PM
Points: 1,032,
Visits: 284
|
|
| I have run this against SQL 2008 Enterprise x64 and it works the same as SQL 2005 Enterprise x64.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 9:27 AM
Points: 3,
Visits: 19
|
|
The version contained in the link from jon.malenfant above works great (even on SQL 2008). I could not see any issues in the script, even with notepad, so thanks jon.
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Friday, June 10, 2011 2:04 PM
Points: 65,
Visits: 67
|
|
| Sorry Guys... There was something wrong with the web editor. I have just resubmitted the script by removing all the . But until the script gets published again here, you might have to DIY removing the in the script, or use jon.malenfant's attachment http://www.sqlservercentral.com/Forums/Attachment3739.aspx. Thanks jon.
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Friday, June 10, 2011 2:04 PM
Points: 65,
Visits: 67
|
|
| The format problem is resolved. The script in the original post should work now.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, May 11, 2010 1:58 AM
Points: 1,
Visits: 5
|
|
| Richard, what kind of use policy does this script concern?
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 7:09 AM
Points: 6,
Visits: 185
|
|
Excellent script, thanks! I was not seeing the object level perms for users tied to database roles I had created, so I simply added another OR statement to the where clause to get what I was looking for:
SELECT DISTINCT Principal_Name,Login_Name, DatabaseName, ObjectName, ObjectType, PermissionName, state_desc, Grantor FROM @ObjectPermissions op WHERE ISNULL(Login_Name, '') like @loginName OR ISNULL(Principal_Name, '') like @loginName OR ISNULL(Principal_Name, '') in (SELECT DISTINCT DB_RoleMember FROM @DBRolePermissions dbrp WHERE (ISNULL(Login_Name, '') LIKE @loginName OR ISNULL(Principal_Name, '') LIKE @loginName) AND dbrp.DatabaseName = op.DatabaseName AND Permission_Type = 'DATABASE_ROLE') ORDER BY DatabaseName, Principal_Name, ObjectName, PermissionName
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 7:44 PM
Points: 442,
Visits: 619
|
|
Do you have an example of what output should look like ?
thanks jim
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: 2 days ago @ 2:19 PM
Points: 30,
Visits: 236
|
|
Great script! I don't see synonyms, can that be added, and the "object level perms for users tied to database roles I had created" from above?
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 3:05 PM
Points: 2,117,
Visits: 2,209
|
|
Thank you so much for this script. Is there any equivalent script compatible with SQL Server 2000?
Thanks for any help.
- webrunner
------------------- "The chemistry must be respected." - Walter White
"A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'" Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
|
|
|
|