[SQL Server] Lancer en mode commande un job SQLServer
-- =============================================
-- Author: KHARROUBI ZOUHAIER
-- Create date: 03/09/2010
-- Description: Lancer des jobs SQLServer
-- =============================================
CREATE PROCEDURE [dbo].[usp_ExecuteJobSQLServer]
@NOM_JOB AS NVARCHAR(50)
WITH EXECUTE AS 'kharroubi'
AS
BEGIN
DECLARE @REQUETE AS VARCHAR(200)
SET @REQUETE = N'msdb.dbo.sp_start_job @job_name=''' + @NOM_JOB + ''''
EXEC(@REQUETE)
SELECT @@ERROR AS MsgErreur
END