- adapted the procedures to not loop, but only do 1 batch of deletion.

The job will be called in a loop, every minutes and will handle the enforcement of not starting during working hours.
- Added the job that will call all cleanup procs in sequence
This commit is contained in:
Thierry Schork
2025-09-03 16:17:57 +02:00
parent 60007cd7df
commit b19a4c4bdd
6 changed files with 259 additions and 135 deletions

View File

@@ -4,9 +4,6 @@ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
SET XACT_ABORT ON;
SET NOCOUNT ON;
GO
IF OBJECT_ID('dbo.sp_DBPermissions') IS NULL
EXECUTE sp_executesql N'CREATE PROCEDURE dbo.sp_DBPermissions AS PRINT ''Stub'';';
GO
/*********************************************************************************************
sp_DBPermissions V7.0
@@ -175,7 +172,7 @@ Data is ordered as follows
-- 08/15/2023 - Add orphan functionality with @ShowOrphans parameter.
*********************************************************************************************/
ALTER PROCEDURE [dbo].sp_DBPermissions
CREATE OR ALTER PROCEDURE [dbo].sp_DBPermissions
(
@DBName sysname = NULL,
@Principal sysname = NULL,