Add updated SqlAgent folder

This commit is contained in:
Neeraj Kumar
2025-11-02 14:50:48 -05:00
parent 2c94b89801
commit 8fca292a50
141 changed files with 6723 additions and 0 deletions

View File

@ -0,0 +1,56 @@
USE [ProdDUTASJobSchedule];
GO
/**************************************************************************************************
-- FILE: JobDependencies.sql
-- PURPOSE: Manage JobDependencies table - Create, Read, Update, Delete for a single dependency
-- TABLE: dbo.JobDependencies
**************************************************************************************************/
-------------------------------
-- SELECT - View Dependency
-------------------------------
SELECT *
FROM [dbo].[JobDependencies]
WHERE [JobName] = N'PROD_DAILY_DTSGSID0';
GO
-------------------------------
-- INSERT - Create Dependency
-------------------------------
INSERT INTO [dbo].[JobDependencies]
(
[JobName],
[PredecessorJobName]
)
VALUES
(
N'PROD_DAILY_DTSGSID0', -- Dependent job
N'PROD_DAILY_DTSBX305' -- Predecessor job
);
GO
-------------------------------
-- UPDATE - Modify Dependency
-------------------------------
UPDATE [dbo].[JobDependencies]
SET [PredecessorJobName] = N'PROD_DAILY_DTSBX215'
WHERE [JobName] = N'PROD_DAILY_DTSGSID0'
AND [PredecessorJobName] = N'PROD_DAILY_DTSBX305';
GO
-------------------------------
-- DELETE - Remove Dependency
-------------------------------
DELETE FROM [dbo].[JobDependencies]
WHERE [JobName] = N'PROD_DAILY_DTSGSID0'
AND [PredecessorJobName] = N'PROD_DAILY_DTSBX215';
GO
-------------------------------
-- SELECT - View Dependency
-------------------------------
SELECT *
FROM [dbo].[JobDependencies]
WHERE [JobName] = N'PROD_DAILY_DTSGSID0';
GO