There's scheduled MS SQL jobs. In certain cases one would like to run (parts of) these jobs manually, during daytime for instance.
Our director Rob just showed us that it's possible to run a SQL job from any user's Windows Task Manager. The task will be calling a batchfile which will run the SQL job.
Example batchfile, where Domain/User is domain and user involved and TEST is name of job:
sqlcmd.exe -S DOMAIN -USER -Q"execute msdb.dbo.sp_start_job @job_name = 'TEST'"
Our director Rob just showed us that it's possible to run a SQL job from any user's Windows Task Manager. The task will be calling a batchfile which will run the SQL job.
Example batchfile, where Domain/User is domain and user involved and TEST is name of job:
sqlcmd.exe -S DOMAIN -USER -Q"execute msdb.dbo.sp_start_job @job_name = 'TEST'"
Geen opmerkingen:
Een reactie posten