Skip to content

Instantly share code, notes, and snippets.

/*********************************************************************************************
sp_AzSQLDBPermissions V1.0
Kenneth Fisher
http://www.sqlstudies.com
This stored procedure returns 3 data sets. The first dataset is the list of database
principals, the second is role membership, and the third is object and database level
permissions.
@sqlstudent144
sqlstudent144 / sp_DBPermissions.sql
Last active December 24, 2023 20:46
sp_DBPermissions
USE master
GO
IF OBJECT_ID('dbo.sp_DBPermissions') IS NULL
EXEC sp_executesql N'CREATE PROCEDURE dbo.sp_DBPermissions AS PRINT ''Stub'';'
GO
/*********************************************************************************************
sp_DBPermissions V6.2
Kenneth Fisher
http://www.sqlstudies.com
@sqlstudent144
sqlstudent144 / sp_SrvPermissions.sql
Last active December 24, 2023 20:43
sp_SrvPermissions
USE master
GO
IF OBJECT_ID('dbo.sp_SrvPermissions') IS NULL
EXEC sp_executesql N'CREATE PROCEDURE dbo.sp_SrvPermissions AS PRINT ''Stub'';'
GO
/*********************************************************************************************
sp_SrvPermissions V6.1
Kenneth Fisher
http://www.sqlstudies.com