How to List All Permissions for SQL Server Fixed Database and Server Roles

sql serversql-server-2012

I am trying to list all current permissions for db_owner and sysadmin for SQL Server 2012. I found these SPs:

EXEC sp_srvrolepermission 'securityadmin'
EXEC sp_dbfixedrolepermission 'db_owner'

However, these are deprecated and only accurate as of SQL Server 2000. Is there an equivalent mechanism to accomplish the same thing today?

Best Answer

Neither of these roles has an enumerated list of permissions. db_owner has all permissions in a database, and sysadmin is exempt from permissions checking on both the server and every database. There are a handful of system procedures that are hardcoded to check for sa or perhaps dbo.