olahallengren / sql-server-maintenance-solution

SQL Server Maintenance Solution
https://ola.hallengren.com
MIT License
2.91k stars 756 forks source link

Managed Identities for Managed Instances #744

Closed Kinetic-311 closed 3 weeks ago

Kinetic-311 commented 1 year ago

Azure is pushing the Managed Identities for access to Storage Containers/Blobs now. Your product automatically appends a required credential, rightfully assuming a SAS token.

The new Managed Identities method, the MI is added without SQL Server knowledge. A credential is still created but while performing the backup a @Credential is not needed, simply the URL.

Could you add this feature through a Parameter or other detection method?

It seems, on any managed instance version it forces the @Credential to match the URL name, but in this case does not find a SAS method and the Azure MI rejects the backup. When Managed Identities is setup via Code or the Portal a @Credential is not required and in this case fails.

Background Information: https://techcommunity.microsoft.com/t5/azure-sql-blog/how-to-take-secure-on-demand-backups-on-sql-managed-instance/ba-p/3638369

mdaniou commented 1 year ago

Hi,

I ended in your issue and thought I would create a quick change https://github.com/olahallengren/sql-server-maintenance-solution/pull/745

olahallengren commented 3 weeks ago

I have added a fix for this. https://ola.hallengren.com/versions.html