开发者

Is there any system defined function to check if user has alter permission?

I am using MS-sql server 2008

I need to know if a user id has "Alter Contraints" permiss开发者_运维百科ion on one database.

Is there any system defined functions for this ?


This query will show you all the permissions a user has:

select * from fn_my_permissions(NULL, 'DATABASE')

You can also do specific tables, or an entire server.

http://sqltips.wordpress.com/2007/05/28/retreive-current-user-permissions-in-sql-server-2005/


There is HAS_PERMS_BY_NAME()

http://msdn.microsoft.com/en-us/library/ms189802.aspx


Have you seen sys.fn_my_permissions?

http://msdn.microsoft.com/en-us/library/ms176097.aspx

http://www.siusic.com/wphchen/list-all-permissions-a-user-has-in-sql-server-database-error-4064-321.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜