If you get error Msg 15281, Level 16 in SQL Server, chances are you’re trying to run an ad hoc distributed query, but you haven’t enabled ad hoc distributed queries.
This can be fixed easily by enabling ad hoc distributed queries.
If you get error Msg 15281, Level 16 in SQL Server, chances are you’re trying to run an ad hoc distributed query, but you haven’t enabled ad hoc distributed queries.
This can be fixed easily by enabling ad hoc distributed queries.
In SQL Server, the sp_help_schedule stored procedure returns information about schedules in the SQL Server Agent.
This article provides an overview of this stored procedure including examples.
In SQL Server, the sp_help_jobschedule stored procedure returns information about the scheduling of jobs.
This article provides an overview of this stored procedure including examples.
When you create a SQL Server Agent job with T-SQL, you use the sp_add_jobstep stored procedure to add each job step.
If you ever need to add a new step to that job, you can use sp_add_jobstep once again to add the new job step.
But you may also need to modify the existing step, depending on how you’d like the job to progress through the steps.
In SQL Server, you can use the sp_update_job stored procedure to modify an existing SQL Server Agent job.
In SQL Server, you can use the sp_update_jobstep stored procedure to modify an existing job step of a SQL Server Agent job.
When you create a SQL Server Agent job, you create one or more job steps for that job. The sp_update_jobstep procedure allows you to update a specific job step independent of the actual job or any other job steps.
SQL Server Agent schedules can be managed independently of jobs. This means you can update the schedule directly without updating the job itself.
You can do this with the sp_update_schedule stored procedure.
If you’re in the process of creating a SQL Server Agent job with T-SQL, you may be wondering whether to create its schedule with the sp_add_schedule stored procedure or the sp_add_jobschedule procedure.
Here’s a quick explanation of the difference between these two procedures.
SQL Server Agent is a Microsoft Windows service that executes scheduled administrative tasks, which are called jobs in SQL Server.
T-SQL includes a large collection of stored procedures that deal with SQL Server Agent jobs.
Here, we’ll use some of them to create and schedule a SQL Server Agent job.
You can also create SQL Server Agent jobs via the GUI (in SSMS) if you prefer.
When you first create a SQL Server Agent job, you might want to do a quick test to see if it’s going to actually run without any issues.
This is quite straightforward when using the SSMS GUI, but how do you do it in T-SQL?
Answer: The sp_start_job stored procedure.