For invoking an SQL Server Job from another Job which is present on a different instance, we have different ways like
So, the most easy approach would be to use the SQLCMD Operating system command.
Create a new step in the job with the type "Operating System (CmdExec)" and use the below command
- Create a Linked server and use msdb..sp_start_job to start the job
- Using xp_cmdshell
- Using SQLCMD Operating system command
So, the most easy approach would be to use the SQLCMD Operating system command.
Create a new step in the job with the type "Operating System (CmdExec)" and use the below command
SQLCMD -S <Server Name> -E -Q "EXEC msdb..sp_start_job <Job Name>" |
No comments:
Post a Comment