use current_userdb
GO
select o.name , pm.permission_name,pr.name, user_name(pm.grantee_principal_id) from sys.database_permissions pm inner join
sys.database_principals pr
on pm.grantee_principal_id = pr.principal_id
inner join sys.objects o
on o.object_id = pm.major_id
where object_name(pm.major_id) = 'object1'
This blog is created to add all the information and experiences that I have learnt while working on MS sql server as a DBA. The blog is also updated frequently with the real world problem that I encounter hands on at work and the resolutions to resolve them. I hope this blog will be of some use to you and you will revisit. Thank you for stopping by and you are welcome to leave comments.
Tuesday, January 19, 2016
Subscribe to:
Posts (Atom)