dataplat / dbatools

🚀 SQL Server automation and instance migrations have never been safer, faster or freer
https://dbatools.io
MIT License
2.43k stars 794 forks source link

Azure SQL Elastic Jobs management #7740

Open EitanBlumin opened 3 years ago

EitanBlumin commented 3 years ago

Summarize Command's Functionality'

With the rise in popularity of Azure SQL databases, there's also rising need in Elastic Jobs.

It would be terrific if there would've been a set of cmdlets in dbatools that would make it much easier than it currently is.

Is there a command that is similiar or close to what you are looking for?

No EDIT: Actually Yes, the *-DbaAgentJob* cmdlets

Technical Details

https://techcommunity.microsoft.com/t5/azure-sql/elastic-jobs-in-azure-sql-database-what-and-why/ba-p/1177902

potatoqualitee commented 3 years ago

Agreed! Seems this would be a wrapper module around Az.Sql, however, which would be a new azure-centric module that depends on dbatools and az.sql. Which command would you like to see first?

EitanBlumin commented 3 years ago

I would love it if there would've been a single cmdlet responsible for setting up an Elastic Jobs Agent if it doesn't exist already.

And also the Elastic Jobs equivalent of New-DbaAgentJob, New-DbaAgentJobStep, etc.

wsmelton commented 2 years ago

For proper support with Azure services would it not be advisable to use their commands and workflows for this process?

https://docs.microsoft.com/en-us/azure/azure-sql/database/elastic-jobs-powershell-create

EitanBlumin commented 2 years ago

@wsmelton , the same thing could be said about any other task implemented by dbatools.

For proper support with SQL Server would it not be advisable to use Microsoft commands and utilities for any process?

The answer is: Of course!

But wouldn't it be awesome if dbatools made it so much easier and accessible?

wsmelton commented 2 years ago

I prefer to use automation tools that give more consistent deployment options such as ARM and Bicep. The same use case as to whether you use DSC or dbatools to deploy SQL Server. They each have their purpose but for Azure resources, I'd chose the stronger tooling 🤷🏻 .

In any case, this would not be something dbatools would not do as Chrissy already stated it would be in a separate module.

For proper support with SQL Server would it not be advisable to use Microsoft commands and utilities for any process?

Microsoft recommends our module now 😉 .

EitanBlumin commented 2 years ago

Microsoft recommends our module now 😉 .

Well, yes, but we didn't get this far by preferring to stick with existing MS tooling, right?