또 다른 방법은 푸른 자동화를 사용하여 아래 실행 책을 사용하려면 다음을 수행
param
(
# Desired Azure SQL Database edition {Basic, Standard, Premium}
[parameter(Mandatory=$true)]
[string] $Edition,
# Desired performance level {Basic, S0, S1, S2, P1, P2, P3}
[parameter(Mandatory=$true)]
[string] $PerfLevel
)
inlinescript
{
# I only care about 1 DB so, I put it into variable asset and access from here
$SqlServerName = Get-AutomationVariable -Name 'SqlServerName'
$DatabaseName = Get-AutomationVariable -Name 'DatabaseName'
Write-Output "Begin vertical scaling script..."
# Establish credentials for Azure SQL Database server
$Servercredential = new-object System.Management.Automation.PSCredential("yourDBadmin", ("YourPassword" | ConvertTo-SecureString -asPlainText -Force))
# Create connection context for Azure SQL Database server
$CTX = New-AzureSqlDatabaseServerContext -ManageUrl “https://$SqlServerName.database.windows.net” -Credential $ServerCredential
# Get Azure SQL Database context
$Db = Get-AzureSqlDatabase $CTX –DatabaseName $DatabaseName
# Specify the specific performance level for the target $DatabaseName
$ServiceObjective = Get-AzureSqlDatabaseServiceObjective $CTX -ServiceObjectiveName "$Using:PerfLevel"
# Set the new edition/performance level
Set-AzureSqlDatabase $CTX –Database $Db –ServiceObjective $ServiceObjective –Edition $Using:Edition -Force
# Output final status message
Write-Output "Scaled the performance level of $DatabaseName to $Using:Edition - $Using:PerfLevel"
Write-Output "Completed vertical scale"
}
참조 :
Azure Vertically Scale Runbook
유/아래로 확장 할 때 일정을 설정.
필자는 입력 매개 변수가있는 2 개의 스케줄을 사용했으며, 1은 스케일 업을위한 것이고 다른 하나는 스케일링을위한 것입니다.
도움이 되길 바랍니다.
서비스 목표가 너무 나쁘면 간단한 "P1 "인간이 알고 이해할 수있는 스타일 식별자.;) –
그래, 실제로 얻지는 못했지만 계층을 확장하는 경우 내 테스트에서 Name, Edition 및 ServiceObjectiveId (GUID)를 제공해야합니다. – kspearrin
@DavidPeden,'select * from slo_service_objectives' - 목적 ID와 "P1"또는 "S2"와 같은 이름 사이의 매핑을 제공합니다. –