cleanup
This commit is contained in:
Binary file not shown.
@@ -27,6 +27,18 @@
|
||||
<ConnectionProtocol>NotSpecified</ConnectionProtocol>
|
||||
<ApplicationName />
|
||||
</ConnectionNode>
|
||||
<ConnectionNode Name="SSUNB893VM01\APSSQL:CENTRALINFRA\ua208700">
|
||||
<Created>2023-01-05T08:37:52.8737239+01:00</Created>
|
||||
<Type>SQL</Type>
|
||||
<Server>SSUNB893VM01\APSSQL</Server>
|
||||
<UserName />
|
||||
<Authentication>Windows Authentication</Authentication>
|
||||
<InitialDB>master</InitialDB>
|
||||
<LoginTimeout>30</LoginTimeout>
|
||||
<ExecutionTimeout>0</ExecutionTimeout>
|
||||
<ConnectionProtocol>NotSpecified</ConnectionProtocol>
|
||||
<ApplicationName>Microsoft SQL Server Management Studio - Query</ApplicationName>
|
||||
</ConnectionNode>
|
||||
<ConnectionNode Name="sun185aps.sunstore.ch\apssql:CENTRALINFRA\ua208700">
|
||||
<Created>2022-12-22T13:19:37.2478174+01:00</Created>
|
||||
<Type>SQL</Type>
|
||||
@@ -42,7 +54,20 @@
|
||||
</Items>
|
||||
</LogicalFolder>
|
||||
<LogicalFolder Name="Queries" Type="0" Sorted="true">
|
||||
<Items />
|
||||
<Items>
|
||||
<FileNode Name="create session.sql">
|
||||
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:SSUNB893VM01\APSSQL:True</AssociatedConnectionMoniker>
|
||||
<AssociatedConnSrvName>SSUNB893VM01\APSSQL</AssociatedConnSrvName>
|
||||
<AssociatedConnUserName />
|
||||
<FullPath>create session.sql</FullPath>
|
||||
</FileNode>
|
||||
<FileNode Name="deactivate job.sql">
|
||||
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:SSUNB893VM01\APSSQL:True</AssociatedConnectionMoniker>
|
||||
<AssociatedConnSrvName>SSUNB893VM01\APSSQL</AssociatedConnSrvName>
|
||||
<AssociatedConnUserName />
|
||||
<FullPath>deactivate job.sql</FullPath>
|
||||
</FileNode>
|
||||
</Items>
|
||||
</LogicalFolder>
|
||||
<LogicalFolder Name="Miscellaneous" Type="3" Sorted="true">
|
||||
<Items />
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
USE msdb
|
||||
|
||||
BEGIN TRANSACTION
|
||||
SET XACT_ABORT ON;
|
||||
SET NOCOUNT ON;
|
||||
|
||||
DECLARE
|
||||
@jobid UNIQUEIDENTIFIER = NULL
|
||||
,@jobName varchar(100)
|
||||
;
|
||||
|
||||
SELECT
|
||||
@jobid = [s].[job_id]
|
||||
,@jobName = [s].[name]
|
||||
FROM [dbo].[sysjobs] [s]
|
||||
WHERE [s].[name] like '[_]D0032_ - LkdSrv - APS Synchro After - ArizonaCASH'
|
||||
|
||||
IF @jobid IS NOT NULL
|
||||
BEGIN
|
||||
EXEC msdb.dbo.sp_update_job
|
||||
@job_id = @jobid
|
||||
,@enabled=0
|
||||
;
|
||||
PRINT CONVERT(VARCHAR(20), CURRENT_TIMESTAMP, 114)+' - job "'+@jobName+'" deactivated';
|
||||
|
||||
END
|
||||
|
||||
COMMIT TRANSACTION
|
||||
Reference in New Issue
Block a user