小编RuS*_*SSe的帖子

Azure自动化Powersell Runbook失败:'Invoke-Sqlcmd'无法识别为cmdlet的名称

我已完成以下教程的所有步骤,以获得用于自动化索引和统计维护的Runbook:

https://blogs.msdn.microsoft.com/azuresqldbsupport/2018/01/15/automating-azure-sql-db-index-and-statistic-maintenance-using-azure-automation/

我能够毫无错误地完成所有教程,但是当我执行Runbook时,它返回一个错误:

Invoke-Sqlcmd : The term 'Invoke-Sqlcmd' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:6 char:16
+ $SQLOutput = $(Invoke-Sqlcmd -ServerInstance $AzureSQLServerName -Use ...
+ ~~~~~~~~~~~~~
+ CategoryInfo: ObjectNotFound: (Invoke-Sqlcmd:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Run Code Online (Sandbox Code Playgroud)

我能做什么?我在Azure中使用SQL Server.具体而言,Azure SQL数据库具有定价/模型层"S4标准(200 DTU)".

powershell maintenance automation azure runbook

3
推荐指数
1
解决办法
1775
查看次数

标签 统计

automation ×1

azure ×1

maintenance ×1

powershell ×1

runbook ×1