that can be used to check the different permissions of the users on a securable. Securable is just term being used for the different objects like table, stored procedures, functions, views etc.. The securable_class are like these: ASSEMBLY, OBJECT, SERVER, DATABASE, XML Schema Collection etc. You can look at all the securable classes by using this SQL:

SELECT distinct class_desc
FROM sys.fn_builtin_permissions(default)
ORDER BY class_desc
GO

And specifying the word default just translates the input to Null in these functions. So, how and when can you make use of these functions? These are helpful if you want to prepare a report for the permissions for different logins. Here is an example:

Let’s see my login permissions first (my login is also part of the sysadmin role):

/*Show me permissions on the server*/

SELECT * FROM sys.fn_my_permissions(default, ‘SERVER’);

/*Now, show me permissions on the database*/

SELECT * FROM sys.fn_my_permissions(default, ‘DATABASE’);

/*Or a specific object*/

SELECT * FROM sys.fn_my_permissions(‘usp_collect_stats’, ‘OBJECT’);

And now, if I want to check the permissions for another login, all I need to do is switch the security context first by using “EXECUTE AS” and then execute the same commands as above: