Script to get Security Information of SQL Server 2005\2008\R2\2012 and Above

Script to Get Database Level,Server Level and Object Level Information with Permissions :

In my working environment I’ve used the script to find security information which should return Server Logins, Database Logins and object level permissions. I’ve used it  and thought to sharing this to you since this could be helpful to you.

Works With

  • SQL Server 2005
  • SQL Server 2008 and
  • SQL Server 2008 R2

Please go through below link to get the Scripts:

https://sqlserveradmintutorial.blogspot.com/2018/07/script-to-get-security-information-of.html

SQL Server 2012 codenamed SQL Server Denali is on the way to market by 2012. As you all know SQL Server 2012 has new features related to security, we have contained database where you are allowed to create contained users and the next feature is server level roles, other security features are not related to this article, we will cover those later. The above link scripts earlier to retrieve permissions from SQL 2005 and SQL 2008\R2 (link above) however these scripts are no longer useful for SQL Server 2012 as it won’t return the new contained user and server level role permissions.

New columns & DMV’s are added in SQL Server 2012 which will be helpful to retrieve those information’s . In addition to this I’ve added two more scripts which will return server level and database level permissions which is not given in SQL Server 2005 scripts

Works With

  • SQL Server 2012 (Denali) and above

Please go through below link to get the Scripts:

https://sqlserveradmintutorial.blogspot.com/2018/07/script-to-get-security-information-of_4.html

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.