>> Elastic Jobs allow you to create
and manage drops that can be periodically
executed against one or many databases to
run T-SQL or various maintenance tasks.
Learn more on this episode of Data Exposed.
[MUSIC].
>> Hi. Welcome to this episode of Data Exposed.
I'm Anna Hoffman and today I'm joined by SQL DB PM Kate Smith.
Kate, thanks so much for joining us today.
>> Happy to be here, Anna.
>> Today we're going to talk about Elastic Jobs,
and this is something I really don't know anything about.
So can you start by just telling us what are Elastic Jobs?
>> Sure, absolutely. So in the world of databases,
it's very common for
common maintenance tasks to need to be done on a database.
So anything that you might schedule
or that you might do across a large number of databases,
like the same task either over and over again,
day after day, or over and over again across this database,
and this database, and this database,
Elastic Jobs allow you to do that in
a very streamlined and powerful way.
It's write the T-SQL script
once and set up the job and you're good to go.
>> That's awesome. You talked about maintenance,
when should we use Elastic Jobs?
>> That's a great question. Database maintenance
can look like a lot of things,
but some examples that come to
mind would be partition maintenance,
or statistics updates, or statistics maintenance,
or index maintenance, or
any type of data maintenance that you might do,
or it could even be something like a schema update,
adding a column, for example.
Now, schema updates are
an unusual type of maintenance that you might do just one time,
but that would be executed across
a large number of databases
where some of these other maintenance tasks,
index and status updates,
you would do like every night,
or every week, or every month, something like that.
>> Cool. Awesome. So it seems like there's
a wide range of possibilities for when I might use this.
>> Yeah. If you can define it in
T-SQL and define it the right way,
and we'll talk about that later
but so that it can be run again and again,
then you can run it in an Elastic Job.
>> Awesome. Cool. I guess the final question is,
what database is this supported in?
>> So this is an Azure SQL Database specific offering.
It does not work on-premise type offerings,
but it works in almost all of our Azure SQL offering.
So our standard tier,
premium tier, general purpose,
basic, hyperscale supports this,
serverless supports this, elastic pool support this.
Basically the only exception at this point is managed instance,
which supports the on-prem analog to this,
which is SQL Server Agent.
>> Cool. If I was using
SQL Server Agent and I move to Azure SQL Database,
is Elastic Job something that I can use
to fulfill the same purpose?
>> Yes. So if you're running jobs on-prem
and using SQL Server Agent to do maintenance,
you can take any T-SQL that
you have already written for your SQL Server agent.
If you move your database over to Azure,
you can take those T-SQL scripts and set them up
in Elastic Jobs to run in Azure.
That is the offering basically.
SQL Server Agent with the exception of
managed instance is not supported in Azure,
but Elastic Jobs are the way
forward for all those other offerings.
>> Awesome. Great. Well, Kate,
thanks so much for coming on today.
This is a great intro to
Elastic Jobs and I think we're going to do a few more of these.
So maybe people should tune in and we'll also
post some links to the blogs that you've done as well.
>> Yeah, that's a very powerful,
very cool tool that I'm excited to see people using it.
>> Awesome. Thanks Kate and thanks for watching.
If you enjoyed this video,
be sure to like it and subscribe to our channel or
comment on what you're doing with Elastic Jobs. Thanks.
[MUSIC]