You are here: Re: Stored Procedure to list out user access « MsSQL Server « IT news, forums, messages
Re: Stored Procedure to list out user access

Posted by Erland Sommarskog on 01/19/08 22:51

SQL Server (alderran666@gmail.com) writes:
> Is there a built in stored procedure that would allow me to list out
> the database permissions assigned to a particular user or role?

Not really. Rather you are best off querying the view
sys.database_permissions. You can also use fn_my_permissions and
has_perms_by_name, but you would first need to impersonate the user in
question.

All the above applies to SQL 2005 only. There were big overhaul of
security in SQL 2005.

Make it a habit to always specify which version of SQL Server you are using
when you ask questions.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация