April 22, 2013

Run SQL server job using query


To start a job

In Object Explorer, connect to an instance of Database Engine.

On the Standard bar, click New Query.

Copy and paste the following example into the query window and click Execute.

-- starts a job named Weekly Sales Data Backup. 

USE msdb ;

GO

EXEC dbo.sp_start_job N'YOURJOBNAME' ;

GO



No comments:

Post a Comment