Database principal permissions script


With the GUI of SSMS is it not easy to grasp all permission and role membership of a database principal. With the code following, you can get all object level and schema level permissions and role membership. If the principal is member of a role, the role membership is extracted until the end.

Create Index Rebuild Script With DMV


Creating an operation script via T-SQL is a common way. With T-SQL code following, you can create index rebuild script for all indexes which is fragmented more then 20 % .