Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 475986c

Browse files
authored
Merge pull request #6870 from MicrosoftDocs/master
8/17 AM Publish
2 parents 489e29b + 23790cd commit 475986c

6 files changed

Lines changed: 251 additions & 15 deletions

File tree

docs/dma/dma-commandline.md

Lines changed: 81 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Run Data Migration Assistant from the command line (SQL Server) | Microsoft Docs"
33
description: Learn how to run Data Migration Assistant from the command line to assess SQL Server databases for migration
44
ms.custom: ""
5-
ms.date: "09/01/2017"
5+
ms.date: "08/17/2018"
66
ms.prod: sql
77
ms.prod_service: "dma"
88
ms.reviewer: ""
@@ -27,7 +27,7 @@ With version 2.1 and above, when you install Data Migration Assistant, it will a
2727
> Dmacmd.exe supports running assessments only. Migrations are not supported at this time.
2828
2929

30-
## Command-line arguments
30+
## Assessments using the Command Line Interface (CLI)
3131

3232
```
3333
DmaCmd.exe /AssessmentName="string"
@@ -38,7 +38,6 @@ DmaCmd.exe /AssessmentName="string"
3838
/AssessmentResultJson="file"|/AssessmentResultCsv="file"
3939
```
4040

41-
4241
|Argument |Description | Required (Y/N)
4342
|---------|---------|---------------|
4443
| `/help or /?` | How to use dmacmd.exe help text | N
@@ -53,16 +52,15 @@ DmaCmd.exe /AssessmentName="string"
5352
|`/AssessmentResultCsv` | Full path to the CSV result file | Y <br>(Either AssessmentResultJson or AssessmentResultCsv is required)
5453

5554

56-
57-
58-
## Examples
55+
## Examples for assessments using the CLI
5956

6057
**Dmacmd.exe**
6158

6259
`Dmacmd.exe /? or DmaCmd.exe /help`
6360

6461
**Single-database assessment using Windows authentication and running compatibility rules**
6562

63+
6664
```
6765
DmaCmd.exe /AssessmentName="TestAssessment"
6866
/AssessmentDatabases="Server=SQLServerInstanceName;Initial
@@ -71,8 +69,6 @@ Catalog=DatabaseName;***Integrated Security=true*"**
7169
/AssessmentResultJson="C:\\temp\\Results\\AssessmentReport.json"
7270
```
7371

74-
75-
7672
**Single-database assessment using SQL Server authentication and running feature recommendation**
7773

7874
```
@@ -83,7 +79,6 @@ Catalog=DatabaseName;***User Id=myUsername;Password=myPassword;***"
8379
/AssessmentResultCsv="C:\\temp\\Results\\AssessmentReport.csv"
8480
```
8581

86-
8782
**Single-database assessment for target platform SQL Server 2012, save results to .json and .csv file**
8883

8984
```
@@ -96,7 +91,6 @@ Catalog=DatabaseName;Integrated Security=true"
9691
***/AssessmentResultCsv***="C:\\temp\\Results\\AssessmentReport.csv"
9792
```
9893

99-
10094
**Single-database assessment for target platform SQL Azure Database, save results to .json and .csv file**
10195

10296
```
@@ -110,7 +104,6 @@ Catalog=DatabaseName;Integrated Security=true"
110104
/AssessmentResultJson="C:\\temp\\AssessmentReport.json"
111105
```
112106

113-
114107
**Multiple-database assessment**
115108

116109
```
@@ -126,8 +119,83 @@ Catalog=DatabaseName3;Integrated Security=true"***
126119
/AssessmentResultJson="C:\\Results\\test2016.json"
127120
```
128121

122+
## Azure SQL Database SKU recommendations using the CLI
129123

124+
```
125+
.\DmaCmd.exe /Action=SkuRecommendation
126+
/SkuRecommendationInputDataFilePath="C:\TestOut\out.csv"
127+
/SkuRecommendationTsvOutputResultsFilePath="C:\TestOut\prices.tsv"
128+
/SkuRecommendationJsonOutputResultsFilePath="C:\TestOut\prices.json"
129+
/SkuRecommendationOutputResultsFilePath="C:\TestOut\prices.html"
130+
/SkuRecommendationCurrencyCode=USD
131+
/SkuRecommendationOfferName=MS-AZR-0044p
132+
/SkuRecommendationRegionName=UKWest
133+
/SkuRecommendationSubscriptionId=<Your Subscription Id>
134+
/AzureAuthenticationInteractiveAuthentication=true
135+
/AzureAuthenticationClientId=<Your AzureAuthenticationClientId>
136+
/AzureAuthenticationTenantId=<Your AzureAuthenticationTenantId>
137+
```
130138

131-
## See also
139+
```
140+
.\DmaCmd.exe /Action=SkuRecommendation
141+
/SkuRecommendationInputDataFilePath="C:\TestOut\out.csv"
142+
/SkuRecommendationTsvOutputResultsFilePath="C:\TestOut\prices.tsv"
143+
/SkuRecommendationJsonOutputResultsFilePath="C:\TestOut\prices.json"
144+
/SkuRecommendationOutputResultsFilePath="C:\TestOut\prices.html"
145+
/SkuRecommendationPreventPriceRefresh=true
146+
```
132147

133-
[Data Migration Assistant Download](https://www.microsoft.com/download/details.aspx?id=53595)
148+
|Argument |Description | Required (Y/N)
149+
|---------|---------|---------------|
150+
|`/Action=SkuRecommendation` | Execute SKU assessment using DMA command line | Y
151+
|`/SkuRecommendationInputDataFilePath` | Full path to the performance counter file collected from the computer hosting your databases | Y
152+
|`/SkuRecommendationTsvOutputResultsFilePath` | Full path to the TSV result file | Y <br>(Either TSV or JSON or HTML file path is required)
153+
|`/SkuRecommendationJsonOutputResultsFilePath` | Full path to the JSON result file | Y <br>(Either TSV or JSON or HTML file path is required)
154+
|`/SkuRecommendationHtmlResultsFilePath` | Full path to the HTML result file | Y <br>(Either TSV or JSON or HTML file path is required)
155+
|`/SkuRecommendationPreventPriceRefresh` | Prevents the price refresh from occurring. Use if running in offline mode. | Y <br>(Either this argument is selected for static prices or all the arguments below need to be selected for getting latest prices)
156+
|`/SkuRecommendationCurrencyCode` | The currency in which to display prices (e.g. "USD") | Y <br>(If you want to get the latest prices)
157+
|`/SkuRecommendationOfferName` | The offer name (e.g. "MS-AZR-0003P"). See the [Microsoft Azure Offer Details](https://azure.microsoft.com/support/legal/offer-details/) page for more information. | Y <br>(If you want to get the latest prices)
158+
|`/SkuRecommendationRegionName` | The region name (e.g. "WestUS") | Y <br>(If you want to get the latest prices)
159+
|`/SkuRecommendationSubscriptionId` | The subscription ID. | Y <br>(If you want to get the latest prices)
160+
|`/AzureAuthenticationTenantId` | The authentication tenant. | Y <br>(If you want to get the latest prices)
161+
|`/AzureAuthenticationClientId` | The client ID of the AAD app used for authentication. | Y <br>(If you want to get the latest prices)
162+
|`/AzureAuthenticationInteractiveAuthentication` | Set to true to pop up the window. | Y <br>(If you want to get the latest prices) <br>(Pick one of the 3 authentication options - option 1)
163+
|`/AzureAuthenticationCertificateStoreLocation` | Set to the certificate store location (e.g. "CurrentUser"). | Y <br>(If you want to get the latest prices) <br>(Pick one of the 3 authentication options - option 2)
164+
|`/AzureAuthenticationCertificateThumbprint` | Set to the cert thumbprint. | Y <br>(If you want to get the latest prices) <br>(Pick one of the 3 authentication options - option 2)
165+
|`/AzureAuthenticationToken` | Set to the certificate token. | Y <br>(If you want to get the latest prices) <br>(Pick one of the 3 authentication options - option 3)
166+
167+
## Examples for SKU assessments using the CLI
168+
169+
**Dmacmd.exe**
170+
171+
`Dmacmd.exe /? or DmaCmd.exe /help`
172+
173+
**Azure SQL DB SKU recommendation with price refresh (get latest prices)**
174+
```
175+
.\DmaCmd.exe /Action=SkuRecommendation
176+
/SkuRecommendationInputDataFilePath="C:\TestOut\out.csv"
177+
/SkuRecommendationTsvOutputResultsFilePath="C:\TestOut\prices.tsv"
178+
/SkuRecommendationJsonOutputResultsFilePath="C:\TestOut\prices.json"
179+
/SkuRecommendationOutputResultsFilePath="C:\TestOut\prices.html"
180+
/SkuRecommendationCurrencyCode=USD
181+
/SkuRecommendationOfferName=MS-AZR-0044p
182+
/SkuRecommendationRegionName=UKWest
183+
/SkuRecommendationSubscriptionId=<Your Subscription Id>
184+
/AzureAuthenticationInteractiveAuthentication=true
185+
/AzureAuthenticationClientId=<Your AzureAuthenticationClientId>
186+
/AzureAuthenticationTenantId=<Your AzureAuthenticationTenantId>
187+
```
188+
189+
**Azure SQL DB SKU recommendation without price refresh (use static prices)**
190+
```
191+
.\DmaCmd.exe /Action=SkuRecommendation
192+
/SkuRecommendationInputDataFilePath="C:\TestOut\out.csv"
193+
/SkuRecommendationTsvOutputResultsFilePath="C:\TestOut\prices.tsv"
194+
/SkuRecommendationJsonOutputResultsFilePath="C:\TestOut\prices.json"
195+
/SkuRecommendationOutputResultsFilePath="C:\TestOut\prices.html"
196+
/SkuRecommendationPreventPriceRefresh=true
197+
```
198+
199+
## See also
200+
- [Data Migration Assistant](https://aka.ms/get-dma) download.
201+
- The article [Identify the right Azure SQL Database SKU for your on-premises database](https://aka.ms/dma-sku-recommend-sqldb).
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
---
2+
title: "Identify the right Azure SQL Database SKU for your on-premises database (Data Migration Assistant) | Microsoft Docs"
3+
description: Learn how to use Data Migration Assistant to identify the right Azure SQL Database SKU for your on-premises database
4+
ms.custom: ""
5+
ms.date: "08/17/2018"
6+
ms.prod: sql
7+
ms.prod_service: "dma"
8+
ms.reviewer: ""
9+
ms.suite: "sql"
10+
ms.technology: dma
11+
ms.tgt_pltfrm: ""
12+
ms.topic: conceptual
13+
keywords: ""
14+
helpviewer_keywords:
15+
- "Data Migration Assistant, Assess"
16+
ms.assetid: ""
17+
caps.latest.revision: ""
18+
author: HJToland3
19+
ms.author: jtoland
20+
manager: craigg
21+
---
22+
23+
# Identify the right Azure SQL Database SKU for your on-premises database
24+
25+
The task of migrating your databases to the cloud is a complicated and time-consuming, involving a number of variables. Picking the right Azure database target and SKU for your database can be challenging. Our goal with the Database Migration Assistant (DMA) is to address these questions and to make your database migration experience simple and effective.
26+
27+
This article focuses primarily on DMA’s Azure SQL Database SKU recommendations feature, which allows you to identify the minimum recommended Azure SQL Database SKU based on performance counters collected from the computer(s) hosting your databases. This feature provides recommendations related to pricing tier, compute level, and max data size, as well as estimated cost per month. It also offers the ability to provision all your databases to Azure in bulk.
28+
29+
> [!NOTE]
30+
> This functionality is currently available only via the Command Line Interface (CLI). Support for this feature via the DMA user interface will be added in an upcoming release.
31+
32+
The following instructions help you determine Azure SQL Database SKU recommendations and provision the associated databases to Azure, by using Data Migration Assistant.
33+
34+
## Prerequisites
35+
36+
Download Database Migration Assistant v4.0 or later, and then install it. If you already have the tool installed, close and reopen it, and you will be prompted to upgrade the tool.
37+
38+
## Collect performance counters
39+
40+
The first step in the process is to collect performance counters for your databases. You can collect performance counters by running a PowerShell command on the computer that hosts your databases. DMA provides you with a copy of this PowerShell file, but you can also use your own method to capture performance counters from your computer.
41+
42+
You do not need to perform this task for each database individually. The performance counters collected from a computer can be used to recommend the SKU for all databases hosted on the computer.
43+
44+
> [!IMPORTANT]
45+
> The computer from which you are running this command requires Administrator permissions to the computer hosting your databases.
46+
47+
1. Verify that the PowerShell file required to collect the performance counters is installed in the DMA folder.
48+
49+
![PowerShell file shown in DMA folder](../dma/media/dma-sku-recommend-data-collection-file.png)
50+
51+
2. Run the PowerShell script with the following arguments:
52+
- **ComputerName**: The name of the computer that hosts your databases.
53+
- **OutputFilePath**: The output file path to save the collected counters.
54+
- **CollectionTimeInSeconds**: The amount of time during which you wish to collect performance counter data.
55+
Capture performance counters for at least 40 minutes to get a meaningful recommendation. The longer the duration of the capture, the more accurate the recommendation will be.
56+
- **DbConnectionString**: The Connection string pointing to the master database hosted on the computer from which you are collecting performance counter data.
57+
58+
Here's a sample invocation:
59+
60+
```
61+
.\SkuRecommendationDataCollectionScript.ps1
62+
-ComputerName Foobar1
63+
-OutputFilePath D:\counters2.csv
64+
-CollectionTimeInSeconds 10
65+
-DbConnectionString "Server=localhost;Initial Catalog=master;Integrated Security=SSPI;"
66+
```
67+
68+
After the command executes, the process will output a file with performance counters in the location you specified. This file can be used as input for the SKU recommendation command in the next section.
69+
70+
## Use the DMA CLI to get SKU recommendations
71+
72+
Use the performance counters output file from the previous step as input for this step. DMA will provide you with recommendations for the Azure SQL Database pricing tier, the compute level, and the maximum data size for each database on your computer. DMA will also provide you with the estimated monthly cost for each database.
73+
74+
Run the dmacmd.exe with the following arguments:
75+
76+
- **/Action=SkuRecommendation**: Enter this argument to execute SKU assessments.
77+
- **/SkuRecommendationInputDataFilePath**: The path to the counter file collected in the previous section.
78+
- **/SkuRecommendationTsvOutputResultsFilePath**: The path to write the output results in TSV format.
79+
- **/SkuRecommendationJsonOutputResultsFilePath**: The path to write the output results in JSON format.
80+
- **/SkuRecommendationHtmlResultsFilePath**: Path to write the output results in HTML format.
81+
82+
In addition, you need to pick one of the following arguments:
83+
- Prevent price refresh
84+
- **/SkuRecommendationPreventPriceRefresh**: Prevents the price refresh from occurring. Use if running in offline mode.
85+
- Get the latest prices
86+
- **/SkuRecommendationCurrencyCode**: The currency in which to display prices (e.g. "USD").
87+
- **/SkuRecommendationOfferName**: The offer name (e.g. "MS-AZR-0003P"). For more information, see the [Microsoft Azure Offer Details](https://azure.microsoft.com/support/legal/offer-details/) page.
88+
- **/SkuRecommendationRegionName**: The region name (e.g. "WestUS").
89+
- **/SkuRecommendationSubscriptionId**: The subscription ID.
90+
- **/AzureAuthenticationTenantId**: The authentication tenant.
91+
- **/AzureAuthenticationClientId**: The client ID of the AAD app used for authentication.
92+
- One of the following authentication options:
93+
- Interactive
94+
- **AzureAuthenticationInteractiveAuthentication**: Set to true for an authentication pop-up window.
95+
- Cert based
96+
- **AzureAuthenticationCertificateStoreLocation**: Set to the certificate store location (e.g. "CurrentUser").
97+
- **AzureAuthenticationCertificateThumbprint**: Set to the certificate thumbprint.
98+
- Token based
99+
- **AzureAuthenticationToken**: Set to the certificate token.
100+
101+
Here are some sample invocations:
102+
103+
```
104+
.\DmaCmd.exe /Action=SkuRecommendation
105+
/SkuRecommendationInputDataFilePath="C:\TestOut\out.csv"
106+
/SkuRecommendationTsvOutputResultsFilePath="C:\TestOut\prices.tsv"
107+
/SkuRecommendationJsonOutputResultsFilePath="C:\TestOut\prices.json"
108+
/SkuRecommendationOutputResultsFilePath="C:\TestOut\prices.html"
109+
/SkuRecommendationCurrencyCode=USD
110+
/SkuRecommendationOfferName=MS-AZR-0044p
111+
/SkuRecommendationRegionName=UKWest
112+
/SkuRecommendationSubscriptionId=<Your Subscription Id>
113+
/AzureAuthenticationInteractiveAuthentication=true
114+
/AzureAuthenticationClientId=<Your AzureAuthenticationClientId>
115+
/AzureAuthenticationTenantId=<Your AzureAuthenticationTenantId>
116+
```
117+
118+
```
119+
.\DmaCmd.exe /Action=SkuRecommendation
120+
/SkuRecommendationInputDataFilePath="C:\TestOut\out.csv"
121+
/SkuRecommendationTsvOutputResultsFilePath="C:\TestOut\prices.tsv"
122+
/SkuRecommendationJsonOutputResultsFilePath="C:\TestOut\prices.json"
123+
/SkuRecommendationOutputResultsFilePath="C:\TestOut\prices.html"
124+
/SkuRecommendationPreventPriceRefresh=true
125+
```
126+
127+
The TSV output file will contain the columns shown in the following graphic:
128+
129+
![PowerShell file shown in DMA folder](../dma/media/dma-tsv-file-column.png)
130+
131+
A description of each column follows.
132+
133+
- **DatabaseName** – The name of your database.
134+
- **MetricName** – Whether or not a metric was executed.
135+
- **MetricType** - Recommended Azure SQL Database tier.
136+
- **MetricValue** - Recommended Azure SQL Database SKU.
137+
- **SQLMiEquivalentCores** - If you choose to go for Azure SQL Database Managed Instance, you can use this value for core count.
138+
- **IsTierRecommended** - We make a minimum SKU recommendation for each tier. We then apply heuristics to determine the right tier for your database.
139+
- **ExclusionReasons** - This value is blank if a Tier is recommended. For each tier that is not recommended, we provide the reasons why it was not picked.
140+
- **AppliedRules** - A short notation of the rules that were applied.
141+
142+
Note that the recommended value is the minimum SKU required for your queries to run in Azure with a success rate similar to your on-premises databases. For example, if the recommended minimum SKU is S4 for the standard tier, then choosing S3 or below will cause queries to time out or fail to execute.
143+
144+
The HTML file contains this information in a graphical format. You can use the HTML file to input Azure subscription information, pick the pricing tier, compute level and Max data size for your databases, and generate a script to provision your databases. This script can be executed using PowerShell.
145+
146+
## Provision your databases to Azure
147+
With just a few clicks, you can use the recommendations from the previous step to provision target databases in Azure to which you can migrate your databases. You can also make changes to the recommendations by updating the HTML file as follows.
148+
149+
1. Open the HTML file and enter the following information:
150+
- **Subscription ID** – The subscription ID of the Azure subscription to which you want to provision the databases.
151+
- **Region** – The region in which to provision databases. Make sure your subscription supports the select region.
152+
- **Resource Group** – The resource group to which you want to deploy the databases. Enter a resource group that exists.
153+
- **Server Name** – The Azure SQL Database server to which you want the databases deployed. If you enter a server name that does not exist, it will be created.
154+
- **Admin Username\Password** – The credentials you use to login to the subscription in Azure.
155+
156+
2. Review recommendations for each database, and modify the pricing tier, compute level, and max data size as needed. Be sure to deselect any databases that you do not currently want to provision.
157+
158+
3. Select **Generate Provisioning Script**, save the script, and then execute it in PowerShell.
159+
160+
This process should create all the databases you selected in the HTML page.
161+
162+
You can perform all the steps in this process on a single computer or you can perform them on multiple computers to determine SKU recommendations at scale. DMA makes it a simple and scalable experience by supporting all these steps via the Command Line Interface. Again, support for this feature via the DMA user interface will be available later this year.
163+
164+
## Next steps
165+
- Download the latest version of [Data Migration Assistant](https://aka.ms/get-dma).
166+
- See the article [Run Data Migration Assistant from the command line](https://docs.microsoft.com/sql/dma/dma-commandline?view=sql-server-2017) for a complete listing of commands for running DMA from the CLI.
90.6 KB
Loading
57.6 KB
Loading

docs/dma/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
href: dma-whatsnew.md
55
- name: Assess your SQL Server migration
66
href: dma-assesssqlonprem.md
7+
- name: Identify the right Azure SQL Database SKU
8+
href: dma-sku-recommend-sql-db.md
79
- name: Upgrade SQL Server to a later version
810
href: dma-migrateonpremsql.md
911
- name: Migrate SQL Server to Azure SQL Database

0 commit comments

Comments
 (0)