Auto-scale Azure SQL runbook error

backtothefuture 91 Reputation points
2021-10-08T13:29:23.46+00:00

I'm trying to test the process to autoscale a SQL DB using a runbook triggered by an alert, as per instructions here :
https://techcommunity.microsoft.com/t5/azure-database-support-blog/how-to-auto-scale-azure-sql-databases/ba-p/2235441

I amended the script in the couple of places where it calls AzureRM commands to use those for Az.sql.

When the alert is triggered the runbook is called but encounters this error:
"The 'Get-AzSqlDatabase' command was found in the module 'Az.Sql', but the module could not be loaded."

How can I fix this? Apologies if it's a dumb question, I'm pretty much a powershell newbie.

Azure SQL Database
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,132 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alberto Morillo 32,896 Reputation points MVP
    2021-10-08T14:09:45.117+00:00

    Usually updating all Azure Automation modules work for me. Please follow steps here.

    Even when runbooks that have been working for some time, all of a sudden can start failing intermittently, and updating the modules fix the problems.

    1 person found this answer helpful.