Skip to content

Commit fae574d

Browse files
authored
Merge pull request #103788 from MashaMSFT/patch-84
added full mode upgrade powershell
2 parents 34279a9 + 20b796f commit fae574d

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

articles/virtual-machines/windows/sql/virtual-machines-windows-sql-register-with-resource-provider.md

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,20 +156,20 @@ Register SQL Server VM in lightweight mode with PowerShell:
156156

157157
If the SQL IaaS Extension has already been installed to the VM manually, then you can register the SQL Server VM in full mode without restarting the SQL Server service. **However, if the SQL IaaS extension has not been installed, registering in full mode will install the SQL IaaS extension in full mode and restart the SQL Server service. Please proceed with caution.**
158158

159-
Below is the code snippet to register with SQL VM resource provider in full mode. To register in full management mode, use the following PowerShell command:
159+
160+
To register your SQL Server VM directly in full mode (and possibly restart your SQL Server service), use the following PowerShell command:
160161

161162
```powershell-interactive
162163
# Get the existing Compute VM
163164
$vm = Get-AzVM -Name <vm_name> -ResourceGroupName <resource_group_name>
164165
165166
# Register with SQL VM resource provider in full mode
166-
Update-AzSqlVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName -SqlManagementType Full
167+
New-AzSqlVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName -SqlManagementType Full
167168
```
168169

169-
170170
### NoAgent management mode
171171

172-
SQL Server 2008 and 2008 R2 installed on Windows Server 2008 can be registered with the SQL VM resource provider in the [NoAgent mode](#management-modes). This option assures compliance and allows the SQL Server VM to be monitored in the Azure portal with limited functionality.
172+
SQL Server 2008 and 2008 R2 installed on Windows Server 2008 (_not R2_) can be registered with the SQL VM resource provider in the [NoAgent mode](#management-modes). This option assures compliance and allows the SQL Server VM to be monitored in the Azure portal with limited functionality.
173173

174174
Specify either `AHUB` or `PAYG` as the **sqlLicenseType**, and either `SQL2008-WS2008` or `SQL2008R2-WS2008` as the **sqlImageOffer**.
175175

@@ -178,17 +178,37 @@ To register your SQL Server 2008 or 2008 R2 instance on Windows Server 2008 inst
178178

179179
# [AZ CLI](#tab/bash)
180180

181-
Register SQL Server VM in NoAgent mode with the Az CLI:
181+
Register your SQL Server 2008 VM in NoAgent mode with the Az CLI:
182182

183183
```azurecli-interactive
184184
az sql vm create -n sqlvm -g myresourcegroup -l eastus |
185185
--license-type PAYG --sql-mgmt-type NoAgent
186186
--image-sku Enterprise --image-offer SQL2008-WS2008R2
187187
```
188+
189+
190+
Register your SQL Server 2008 R2 VM in NoAgent mode with the Az CLI:
191+
192+
```azurecli-interactive
193+
az sql vm create -n sqlvm -g myresourcegroup -l eastus |
194+
--license-type PAYG --sql-mgmt-type NoAgent
195+
--image-sku Enterprise --image-offer SQL2008R2-WS2008R2
196+
```
188197

189198
# [PowerShell](#tab/powershell)
190199

191-
Register SQL Server VM in NoAgent mode with PowerShell:
200+
Register SQL Server 2008 VM in NoAgent mode with PowerShell:
201+
202+
203+
```powershell-interactive
204+
# Get the existing compute VM
205+
$vm = Get-AzVM -Name <vm_name> -ResourceGroupName <resource_group_name>
206+
207+
New-AzSqlVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName -Location $vm.Location `
208+
-LicenseType PAYG -SqlManagementType NoAgent -Sku Standard -Offer SQL2008-WS2008
209+
```
210+
211+
Register SQL Server 2008 R2 VM in NoAgent mode with PowerShell:
192212

193213

194214
```powershell-interactive
@@ -247,10 +267,9 @@ Run the following PowerShell code snippet:
247267
```powershell-interactive
248268
# Get the existing Compute VM
249269
$vm = Get-AzVM -Name <vm_name> -ResourceGroupName <resource_group_name>
250-
251-
# Update to full mode
252-
New-AzSqlVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName -Location $vm.Location `
253-
-LicenseType PAYG -SqlManagementType Full
270+
271+
# Register with SQL VM resource provider in full mode
272+
Update-AzSqlVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName -SqlManagementType Full
254273
```
255274

256275
---

0 commit comments

Comments
 (0)