SQL 리소스 공급자 업데이트

중요

Azure Stack Hub 빌드 2108부터 SQL 및 MySQL 리소스 공급자는 액세스 권한이 부여된 구독에 제공됩니다. 이 기능 사용을 시작하거나 이전 버전에서 업그레이드해야 하는 경우 지원 사례를 열고 지원 엔지니어가 배포 또는 업그레이드 프로세스를 안내합니다.

중요

리소스 공급자를 업데이트하기 전에 릴리스 정보를 검토하여 새 기능, 수정 사항 및 배포에 영향을 줄 수 있는 알려진 문제에 대해 알아봅니다. 릴리스 정보는 리소스 공급자에 필요한 최소 Azure Stack Hub 버전도 지정합니다.

중요

리소스 공급자를 업데이트해도 호스팅 SQL Server 업데이트되지 않습니다.

Azure Stack Hub가 새 빌드로 업데이트될 때 새 SQL 리소스 공급자가 릴리스될 수 있습니다. 기존 리소스 공급자는 계속 작동하지만 가능한 한 빨리 최신 빌드로 업데이트하는 것이 좋습니다.

지원되는 Azure Stack Hub 버전 SQL RP 버전 RP 서비스가 실행 중인 Windows Server
2206, 2301, 2306 SQL RP 버전 2.0.13.x Microsoft AzureStack 추가 기능 RP Windows Server 1.2009.0
2108, 2206 SQL RP 버전 2.0.6.x Microsoft AzureStack 추가 기능 RP Windows Server 1.2009.0

SQL Server 리소스 공급자 V2 업데이트

SQL RP V2를 이미 배포하고 업데이트를 검사 경우 리소스 공급자에 업데이트를 적용하는 방법을 검사.

SQL RP V1에서 SQL RP V2로 업데이트하려면 먼저 SQL RP V1.1.93.x로 업데이트했는지 확인한 다음 주 버전 업그레이드 프로세스를 적용하여 SQL RP V1에서 SQL RP V2로 업그레이드합니다.

SQL RP V1.1.93.x에서 SQL RP V2.0.6.0으로 업데이트

사전 요구 사항

  1. SQL RP V1을 최신 1.1.93.x로 업데이트했는지 확인합니다. 기본 공급자 구독에서 RP 리소스 그룹(이름 지정 형식: system.<region>)을 찾습니다. sqladapter). 리소스 그룹에서 버전 태그 및 SQL RP VM 이름을 확인합니다. 아직 이전 버전에 있고 1.1.93.x로 업데이트해야 하는 경우 지원 사례를 열어 도움을 요청하세요.

  2. 지원 사례를 열어 MajorVersionUpgrade 패키지를 가져와서 향후 V2 버전에 대한 ASH 마켓플레이스 허용 목록에 구독을 추가합니다.

  3. Microsoft AzureStack Add-On RP Windows Server 1.2009.0을 Marketplace에 다운로드합니다.

  4. 데이터 센터 통합 필수 구성 요소가 충족되는지 확인합니다.

필수 조건 참조
조건부 DNS 전달이 올바르게 설정되었습니다. Azure Stack Hub 데이터 센터 통합 - DNS
리소스 공급자에 대한 인바운드 포트가 열려 있습니다. Azure Stack Hub 데이터 센터 통합 - 포트 및 프로토콜 인바운드
PKI 인증서 주체 및 SAN이 올바르게 설정됩니다. Azure Stack Hub 배포 필수 PKI 필수 구성 요소
Azure Stack Hub 배포 PaaS 인증서 필수 구성 요소
  1. (연결이 끊긴 환경의 경우) 리소스 공급자 배포에 사용되는 업데이트 프로세스와 유사한 필수 PowerShell 모듈을 설치합니다.

MajorVersionUpgrade 트리거

관리자 권한 PowerShell 콘솔에서 다음 스크립트를 실행하여 주 버전 업그레이드를 수행합니다.

참고

스크립트를 실행하는 클라이언트 컴퓨터가 Windows 10 또는 Windows Server 2016 이전 OS 버전이고 클라이언트 컴퓨터에 X64 운영 체제 아키텍처가 있는지 확인합니다.

중요

배포 또는 업데이트 스크립트를 실행하기 전에 Clear-AzureRmContext -Scope CurrentUserClear-AzureRmContext -Scope Process 를 사용하여 캐시를 지우는 것이 좋습니다.

# Check Operating System version
$osVersion = [environment]::OSVersion.Version
if ($osVersion.Build -lt 10240)
{
    Write-Host "OS version is too old: $osVersion."
    return
}

$osArch = (Get-WmiObject Win32_OperatingSystem).OSArchitecture
if ($osArch -ne "64-bit")
{
    Write-Host "OS Architecture is not 64 bit."
    return
}

# Check LongPathsEnabled registry key
$regPath = 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem'
$longPathsEnabled = 'LongPathsEnabled'
$property = Get-ItemProperty -Path $regPath -Name $longPathsEnabled -ErrorAction Stop
if ($property.LongPathsEnabled -eq 0)
{
    Write-Host "Detect LongPathsEnabled equals to 0, prepare to set the property."
    Set-ItemProperty -Path $regPath -Name $longPathsEnabled -Value 1 -ErrorAction Stop
    Write-Host "Set the long paths property, please restart the PowerShell."
    return
} 

# Use the NetBIOS name for the Azure Stack Hub domain. 
$domain = "YouDomain" 

# For integrated systems, use the IP address of one of the ERCS VMs
$privilegedEndpoint = "YouDomain-ERCS01"

# Provide the Azure environment used for deploying Azure Stack Hub. Required only for Azure AD deployments. Supported values for the <environment name> parameter are AzureCloud, AzureChinaCloud, or AzureUSGovernment depending which Azure subscription you're using.
$AzureEnvironment = "AzureCloud"

# Point to the directory where the resource provider installation files were extracted.
$tempDir = 'C:\extracted-folder\MajorVersionUpgrade-SQLRP'

# The service admin account can be Azure Active Directory or Active Directory Federation Services.
$serviceAdmin = "admin@mydomain.onmicrosoft.com"
$AdminPass = ConvertTo-SecureString 'xxxxxxxx' -AsPlainText -Force
$AdminCreds = New-Object System.Management.Automation.PSCredential ($serviceAdmin, $AdminPass)

# Add the cloudadmin credential that's required for privileged endpoint access.
$CloudAdminPass = ConvertTo-SecureString 'xxxxxxxx' -AsPlainText -Force
$CloudAdminCreds = New-Object System.Management.Automation.PSCredential ("$domain\cloudadmin", $CloudAdminPass)

# Change the following as appropriate.
$PfxPass = ConvertTo-SecureString 'xxxxxxx' -AsPlainText -Force

# Provide the pfx file path
$PfxFilePath = "C:\tools\sqlcert\SSL.pfx"

# PowerShell modules used by the RP MajorVersionUpgrade are placed in C:\Program Files\SqlMySqlPsh
# The deployment script adds this path to the system $env:PSModulePath to ensure correct modules are used.
$rpModulePath = Join-Path -Path $env:ProgramFiles -ChildPath 'SqlMySqlPsh'
$env:PSModulePath = $env:PSModulePath + ";" + $rpModulePath 

. $tempDir\MajorVersionUpgradeSQLProvider.ps1 -AzureEnvironment $AzureEnvironment -AzCredential $AdminCreds -CloudAdminCredential $CloudAdminCreds -Privilegedendpoint $privilegedEndpoint -PfxPassword $PfxPass -PfxCert $PfxFilePath

참고

DNS 주소와 SQL RP V2의 해당 IP 주소는 다릅니다. 새 공용 IP를 얻으려면 지원에 문의하여 DRP 중단 유리를 요구하고 SQLRPVM1130-PublicIP 리소스를 찾을 수 있습니다. "nslookup sqlrp.dbadapter"를 실행할 수도 있습니다.<이미 공용 IP를 찾기 위해 엔드포인트 테스트를 통과한 클라이언트 컴퓨터의 fqdn>"입니다.

업그레이드가 성공적인지 확인

  1. MajorVersionUpgrade 스크립트는 오류 없이 실행되었습니다.
  2. 마켓플레이스의 리소스 공급자를 확인하고 SQL RP 2.0이 성공적으로 설치되었는지 확인합니다.
  3. 이전 시스템입니다.<location.sqladapter> 리소스 그룹 및 시스템.<기본 공급자 구독의 location.dbadapter.dns> 리소스 그룹은 스크립트에 의해 자동으로 삭제되지 않습니다.
  • 스토리지 계정 및 Key Vault sqladapter 리소스 그룹에 잠시 유지하는 것이 좋습니다. 업그레이드 후 테넌트 사용자가 일관성 없는 데이터베이스 또는 로그인 메타데이터를 관찰하는 경우 리소스 그룹에서 메타데이터를 복원하는 지원을 받을 수 있습니다.
  • dbadapter.dns 리소스 그룹의 DNS 영역이 DNS 레코드 없이 비어 있는지 확인한 후에는 dbadapter.dns 리소스 그룹을 삭제해도 안전합니다.
  • [중요] V1 배포 스크립트를 사용하여 V1 버전을 제거하지 마세요. 업그레이드가 완료되고 업그레이드가 성공했음을 확인한 후 공급자 구독에서 리소스 그룹을 수동으로 삭제할 수 있습니다.

SQL RP V1 이전 버전에서 SQL RP V1.1.93.x로 업데이트

SQL 리소스 공급자 V1 업데이트는 누적됩니다. 1.1.93.x 버전으로 직접 업데이트할 수 있습니다.

리소스 공급자를 1.1.93.x로 업데이트하려면 UpdateSQLProvider.ps1 스크립트를 사용합니다. 로컬 관리 권한으로 서비스 계정을 사용하고 구독의 소유자 입니다. 이 업데이트 스크립트는 리소스 공급자의 다운로드에 포함됩니다.

업데이트 프로세스는 리소스 공급자 배포에 사용되는 프로세스와 유사합니다. 업데이트 스크립트는 DeploySqlProvider.ps1 스크립트와 동일한 인수를 사용하며 인증서 정보를 제공해야 합니다.

스크립트 프로세스 업데이트

UpdateSQLProvider.ps1 스크립트는 최신 OS 이미지를 사용하여 새 VM(가상 머신)을 만들고, 최신 리소스 공급자 코드를 배포하고, 이전 리소스 공급자에서 새 리소스 공급자로 설정을 마이그레이션합니다.

참고

Marketplace 관리에서 Microsoft AzureStack 추가 기능 RP Windows Server 1.2009.0 이미지를 다운로드하는 것이 좋습니다. 업데이트를 설치해야 하는 경우 로컬 종속성 경로에 단일 MSU 패키지를 배치할 수 있습니다. 이 위치에 둘 이상의 MSU 파일이 있는 경우 스크립트가 실패합니다.

UpdateSQLProvider.ps1 스크립트가 새 VM을 만든 후 스크립트는 이전 리소스 공급자 VM에서 다음 설정을 마이그레이션합니다.

  • 데이터베이스 정보
  • 호스팅 서버 정보
  • 필수 DNS 레코드

중요

배포 또는 업데이트 스크립트를 실행하기 전에 Clear-AzureRmContext -Scope CurrentUserClear-AzureRmContext -Scope Process 를 사용하여 캐시를 지우는 것이 좋습니다.

스크립트 매개 변수 업데이트

UpdateSQLProvider.ps1 PowerShell 스크립트를 실행할 때 명령줄에서 다음 매개 변수를 지정할 수 있습니다. 그렇지 않거나 매개 변수 유효성 검사가 실패하는 경우 필요한 매개 변수를 제공하라는 메시지가 표시됩니다.

매개 변수 이름 Description 주석 또는 기본값
CloudAdminCredential 권한 있는 엔드포인트에 액세스하는 데 필요한 클라우드 관리자 자격 증명입니다. 필수
AzCredential Azure Stack Hub 서비스 관리자 계정에 대한 자격 증명입니다. Azure Stack Hub를 배포하는 데 사용한 것과 동일한 자격 증명을 사용합니다. AzCredential에서 사용하는 계정에 MFA(다단계 인증)가 필요한 경우 스크립트가 실패합니다. 필수
VMLocalCredential SQL 리소스 공급자 VM의 로컬 관리자 계정에 대한 자격 증명입니다. 필수
PrivilegedEndpoint 권한 있는 엔드포인트의 IP 주소 또는 DNS 이름입니다. 필수
AzureEnvironment Azure Stack Hub를 배포하는 데 사용한 서비스 관리자 계정의 Azure 환경입니다. Microsoft Entra 배포에만 필요합니다. 지원되는 환경 이름은 AzureCloud, AzureUSGovernment이거나 중국 Microsoft Entra ID인 AzureChinaCloud를 사용하는 경우 입니다. AzureCloud
DependencyFilesLocalPath 인증서 .pfx 파일도 이 디렉터리에 저장해야 합니다. 단일 노드의 경우 선택 사항이지만 다중 노드의 경우 필수입니다.
DefaultSSLCertificatePassword .pfx 인증서의 암호입니다. 필수
MaxRetryCount 오류가 발생한 경우 각 작업을 다시 시도하려는 횟수입니다. 2
RetryDuration 다시 시도 사이의 시간 제한 간격(초)입니다. 120
제거 리소스 공급자 및 연결된 모든 리소스를 제거합니다. No
DebugMode 실패 시 자동 정리를 방지합니다. No

업데이트 스크립트 PowerShell 예제

SQL 리소스 공급자 버전을 1.1.33.0 또는 이전 버전으로 업데이트하는 경우 PowerShell에 특정 버전의 AzureRm.BootStrapper 및 Azure Stack Hub 모듈을 설치해야 합니다.

SQL 리소스 공급자를 버전 1.1.47.0 이상으로 업데이트하는 경우 이 단계를 건너뛸 수 있습니다. 배포 스크립트는 C:\Program Files\SqlMySqlPsh 경로에 필요한 PowerShell 모듈을 자동으로 다운로드하고 설치합니다.

참고

PowerShell 모듈을 다운로드하여 C:\Program Files\SqlMySqlPsh 폴더가 이미 있는 경우 업데이트 스크립트를 실행하기 전에 이 폴더를 클린 것이 좋습니다. 이는 올바른 버전의 PowerShell 모듈을 다운로드하여 사용하는지 확인하기 위한 것입니다.

# Run the following scripts when updating to version 1.1.33.0 only.
# Install the AzureRM.Bootstrapper module, set the profile, and install the AzureStack module.
# Note that this might not be the most currently available version of Azure Stack Hub PowerShell.
Install-Module -Name AzureRm.BootStrapper -Force
Use-AzureRmProfile -Profile 2018-03-01-hybrid -Force
Install-Module -Name AzureStack -RequiredVersion 1.6.0

참고

연결이 끊긴 시나리오에서는 필요한 PowerShell 모듈을 다운로드하고 리포지토리를 필수 구성 요소로 수동으로 등록해야 합니다. SQL 리소스 공급자 배포에서 자세한 정보를 얻을 수 있습니다.

다음은 관리자 권한 PowerShell 콘솔에서 실행할 수 있는 UpdateSQLProvider.ps1 스크립트를 사용하는 예제입니다. 필요에 따라 변수 정보 및 암호를 변경해야 합니다.

# Use the NetBIOS name for the Azure Stack Hub domain. On the Azure Stack Hub SDK, the default is AzureStack but this might have been changed at installation.
$domain = "AzureStack"

# For integrated systems, use the IP address of one of the ERCS VMs.
$privilegedEndpoint = "AzS-ERCS01"

# Provide the Azure environment used for deploying Azure Stack Hub. Required only for Azure AD deployments. Supported values for the <environment name> parameter are AzureCloud, AzureChinaCloud, or AzureUSGovernment depending which Azure subscription you're using.
$AzureEnvironment = "<EnvironmentName>"

# Point to the directory where the resource provider installation files were extracted.
$tempDir = 'C:\TEMP\SQLRP'

# The service admin account (this can be Azure AD or AD FS).
$serviceAdmin = "admin@mydomain.onmicrosoft.com"
$AdminPass = ConvertTo-SecureString 'P@ssw0rd1' -AsPlainText -Force
$AdminCreds = New-Object System.Management.Automation.PSCredential ($serviceAdmin, $AdminPass)

# Set the credentials for the new resource provider VM.
$vmLocalAdminPass = ConvertTo-SecureString 'P@ssw0rd1' -AsPlainText -Force
$vmLocalAdminCreds = New-Object System.Management.Automation.PSCredential ("sqlrpadmin", $vmLocalAdminPass)

# Add the cloudadmin credential required for privileged endpoint access.
$CloudAdminPass = ConvertTo-SecureString 'P@ssw0rd1' -AsPlainText -Force
$CloudAdminCreds = New-Object System.Management.Automation.PSCredential ("$domain\cloudadmin", $CloudAdminPass)

# Change the following as appropriate.
$PfxPass = ConvertTo-SecureString 'P@ssw0rd1' -AsPlainText -Force

# For version 1.1.47.0 or later, the PowerShell modules used by the RP deployment are placed in C:\Program Files\SqlMySqlPsh
# The deployment script adds this path to the system $env:PSModulePath to ensure correct modules are used.
$rpModulePath = Join-Path -Path $env:ProgramFiles -ChildPath 'SqlMySqlPsh'
$env:PSModulePath = $env:PSModulePath + ";" + $rpModulePath

# Change directory to the folder where you extracted the installation files.
# Then adjust the endpoints.
. $tempDir\UpdateSQLProvider.ps1 -AzCredential $AdminCreds -VMLocalCredential $vmLocalAdminCreds -CloudAdminCredential $cloudAdminCreds -PrivilegedEndpoint $privilegedEndpoint -AzureEnvironment $AzureEnvironment -DefaultSSLCertificatePassword $PfxPass -DependencyFilesLocalPath $tempDir\cert

리소스 공급자 업데이트 스크립트가 완료되면 현재 PowerShell 세션을 닫습니다.

다음 단계

SQL 리소스 공급자 유지 관리