Tasks After Restart: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<strong>1.</strong> Execute the following script when you know that SQL Server was restarted: DECLARE @command varchar(1000) SELECT @command = ' USE [?] IF (DB_NAME() LIKE ''%Novus'') BEGIN EXECUTE [dbo].[usp_AsyncTaskMarkAsIdle] ''EDI Scan Folder'' ,''admin''; EXECUTE [dbo].[usp_AsyncTaskMarkAsIdle] ''Orders Invoicing'' ,''admin''; EXECUTE [dbo].[usp_AsyncTaskMarkAsIdle] ''Invoice Printing'' ,''admin''; EN...") |
No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<strong>1.</strong> Execute the following script when you know that SQL Server was restarted: | <strong>1.</strong> Execute the following script when you know that SQL Server was restarted: | ||
DECLARE @command varchar(1000) | <pre>DECLARE @command varchar(1000) | ||
SELECT @command = ' | SELECT @command = ' | ||
USE [?] | USE [?] | ||
Line 17: | Line 17: | ||
END | END | ||
' | ' | ||
EXEC sp_MSforeachdb @command | |||
EXEC sp_MSforeachdb @command</pre> | |||
<strong>Return to [[SQL Server]]</strong> |
Latest revision as of 18:29, 5 October 2023
1. Execute the following script when you know that SQL Server was restarted:
DECLARE @command varchar(1000) SELECT @command = ' USE [?] IF (DB_NAME() LIKE ''%Novus'') BEGIN EXECUTE [dbo].[usp_AsyncTaskMarkAsIdle] ''EDI Scan Folder'' ,''admin''; EXECUTE [dbo].[usp_AsyncTaskMarkAsIdle] ''Orders Invoicing'' ,''admin''; EXECUTE [dbo].[usp_AsyncTaskMarkAsIdle] ''Invoice Printing'' ,''admin''; END ' EXEC sp_MSforeachdb @command
Return to SQL Server