
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'RunStoredProcedure' AND type = 'R')
	CREATE ROLE [RunStoredProcedure]
GO

IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'MonitoringRole' AND type = 'R')
	CREATE ROLE [MonitoringRole]
GO

--PROD
EXEC sp_addrolemember N'RunStoredProcedure', N'**HIPS AD Service account user**'
GO
EXEC sp_addrolemember N'MonitoringRole', N'**HIPS AD Service account user**'
GO

