- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如标题所示,我正在尝试自动扩展Azure数据库。我已经找到了用于单个数据库的Powershell工作流脚本,该脚本运行良好。我想知道是否可以自动缩放 flex 池。我试图重写脚本,但失败多次。
这是下面的脚本:
workflow Set-AzureSqlDatabaseEdition
{
param
(
# Name of the Azure SQL Database server (Ex: bzb98er9bp)
[parameter(Mandatory=$true)]
[string] $SqlServerName,
# Target Azure SQL Elastic Pool
[parameter(Mandatory=$true)]
[string] $ElasticPoolName,
# Desired Azure SQL Elastic Pool edition {Basic, Standard, Premium}
[parameter(Mandatory=$true)]
[string] $Edition,
# Desired DTU
[parameter(Mandatory=$true)]
[string] $DTU,
# DatabaseDtuMin
[parameter(Mandatory=$true)]
[string] $DatabaseDtuMin,
# DatabaseDtuMax
[parameter(Mandatory=$true)]
[string] $DatabaseDtuMax,
# Credentials for $SqlServerName stored as an Azure Automation credential asset
# When using in the Azure Automation UI, please enter the name of the credential asset for the "Credential" parameter
[parameter(Mandatory=$true)]
[PSCredential] $Credential
)
inlinescript
{
Write-Output "Begin vertical scaling script..."
# Establish credentials for Azure SQL Database server
$Servercredential = new-object System.Management.Automation.PSCredential($Using:Credential.UserName, (($Using:Credential).GetNetworkCredential().Password | ConvertTo-SecureString -asPlainText -Force))
# Create connection context for Azure SQL Database server
$CTX = New-AzureSqlDatabaseServerContext -ManageUrl “https://$Using:SqlServerName.database.windows.net” -Credential $ServerCredential
# Get Azure Elastic Pool context
$EP = Get-AzureRmSqlElasticPool $CTX ElasticPoolName $Using:ElasticPoolName
# Specify the specific performance level for the target $DatabaseName
$DTU = Get-AzureRmSqlElasticPool $CTX ElasticPoolName $Using:DTU
# Set the new edition/performance level
Set-AzureRmSqlElasticPool $CTX ElasticPoolName $DTU –ServiceObjective $DTU –Edition $Using:Edition -Force
# Output final status message
Write-Output "Scaled the performance level of $Using:DatabaseName to $Using:Edition - $Using:PerfLevel"
Write-Output "Completed vertical scale"
}
}
最佳答案
如果您愿意使用第三方产品,请查看CloudMonix-它具有一项功能,可以按任何度量标准和/或日期时间自动缩放 flex 池,SQL Warehouse和SQL Azure数据库。
您可以在其中定义比例范围和比例调整。比例范围通常是基于时间的标准,在这两个标准之间会进行比例缩放(例如,对于上午9点至下午5点,最小等级为P3,最大等级为P5,依此类推),并且比例调整是基于某种性能指标(DTU> 80或网站上的“请求/秒”> 50,依此类推)
无需PowerShell
关于powershell - 是否可以自动制作天蓝色弹性泳池秤?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50813099/
我一直在寻找一种正确的方法来使用内部负载均衡器来改造我的内部虚拟机规模集,该负载均衡器不会通过公共(public) IP 暴露在互联网上。但是,节点应该能够访问互联网来下载 github 中的一些包。
我一直在寻找一种正确的方法来使用内部负载均衡器来改造我的内部虚拟机规模集,该负载均衡器不会通过公共(public) IP 暴露在互联网上。但是,节点应该能够访问互联网来下载 github 中的一些包。
我正在使用 D3 编写一些图表组件。其中一些组件是有意通用的,因此它们可以在各种场景中重复使用。 在一个函数中,我收到一个比例对象作为参数。我想根据这是线性尺度、时间尺度还是顺序尺度采取略有不同的操作
我想看看因子值在哪里转换为数字值。我试图通过简单地添加 print 来实现这一点。到处都有说法... geom_tile2 ggplot2:::ggplot_build.ggplot functio
我有一个通过 USB 连接到我的 Ubuntu 笔记本电脑的数字秤,我想从中读取测量值。串行协议(protocol)非常简单(9600,8N1,ttyUSB0),我能够通过使用终端的 putty (V
我是一名优秀的程序员,十分优秀!