1. How can we configure Ola Hallengren's solution on a managed instance? (We want output file for each run, storing it is an issue)
  2. If we want backup retention longer than 35 days for the database in managed instance, what are the possibilities? (copy_only backups to blob storage?)

Ola Hallengren's maintenance solution has several parts:

Database backups - you don't usually want to use these in Managed Instances because you can't restore the backups to another location, like on-premises. The only use for database backups is to restore them into another managed instance - like if you're doing it for disaster recovery, backing them up to blob storage, and then syncing that blob to a different Azure account (in case you're worried about a malicious actor closing your Azure account, and leaving you with no backups.) If you do want to use backups for that purpose, you can use the @Url parameter for the DatabaseBackup proc, and back up to a URL.

Integrity checks - these work the same way they work for normal SQL Server - no change for Ola's scripts here.

Index and statistics maintenance - these also work the same way they'd work on-premises, but be aware that with the limited transaction log throughput of Azure SQL DB and its relatives, you probably want to use the @Delay parameter when you rebuild/reorg indexes so that you slow down the amount of transaction log throughput you're generating, and leave some DTUs for user transactions.

Parameters common to all procs - don't try to log them to the file system, because you simply don't have access to the file system.

  • Right, the Index and integrity jobs are same as in On premises. Was more looking for a solution to have longer backup retention (6 months as current policy) and keep the output file to some file location which seems not to be happening. Thanks for your inputs.. – Ramakant Dadhichi Mar 28 at 13:15
  • MS just released the capabilities of doing custom backup retention pr. database. You can go all the way up to 35 days now. Longer retention, you have to build something yourself i guess. – Kasper Brandenburg Apr 3 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.