How do I schedule and run a T-SQL Job in Elastic Database Jobs?

Lee Taylor 31 Reputation points
2023-03-10T19:33:50.0566667+00:00

This Lear Page supposedly shows how to setup and check on elastic database jobs

https://learn.microsoft.com/en-us/azure/azure-sql/database/elastic-jobs-tsql-create-manage?view=azuresql#sp_add_job

However, there is nothing in here to indicate "What" will actually run. there is nothing in there were you specify the actual command or sets of commands (T-SQL) that you want to run. The link really does not make a lot of sense.

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Martin Cairney 2,256 Reputation points
    2023-04-20T21:00:01.1133333+00:00

    Hi Lee
    Each Job is capable to have multiple steps within it. The link you have referenced is only the first part - creating the Job shell and the schedule that it will run.
    You then need to use sp_add_jobstep to add each individual step in the job. This is where you define the actual work the Job will do.
    I hope that clarifies your issue?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.