Skip to content

Commit bd2dd06

Browse files
committed
RBAC
1 parent c110093 commit bd2dd06

File tree

1 file changed

+98
-26
lines changed

1 file changed

+98
-26
lines changed

articles/dms/pre-reqs.md

Lines changed: 98 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,52 +10,124 @@ ms.service: dms
1010
ms.workload: data-services
1111
ms.custom: mvc
1212
ms.topic: article
13-
ms.date: 03/12/2019
13+
ms.date: 05/29/2019
1414
---
1515

1616
# Overview of prerequisites for using the Azure Database Migration Service
17-
There are several prerequisites required to ensure that the Azure Database Migration Service runs smoothly when performing database migrations. Some of the prerequisites apply across all scenarios (source-target pairs) supported by the service, while other prerequisites are unique to a specific scenario.
17+
18+
There are several prerequisites required to ensure Azure Database Migration Service runs smoothly when performing database migrations. Some of the prerequisites apply across all scenarios (source-target pairs) supported by the service, while other prerequisites are unique to a specific scenario.
1819

1920
Prerequisites associated with using the Azure Database Migration Service are listed in the following sections.
2021

2122
## Prerequisites common across migration scenarios
23+
2224
Azure Database Migration Service prerequisites that are common across all supported migration scenarios include the need to:
23-
- Create a VNET for the Azure Database Migration Service by using the Azure Resource Manager deployment model, which provides site-to-site connectivity to your on-premises source servers by using either [ExpressRoute](https://docs.microsoft.com/azure/expressroute/expressroute-introduction) or [VPN](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-about-vpngateways).
24-
- Ensure that your Azure Virtual Network (VNET) Network Security Group rules do not block the following communication ports 443, 53, 9354, 445, 12000. For more detail on Azure VNET NSG traffic filtering, see the article [Filter network traffic with network security groups](https://docs.microsoft.com/azure/virtual-network/virtual-networks-nsg).
25-
- When using a firewall appliance in front of your source database(s), you may need to add firewall rules to allow the Azure Database Migration Service to access the source database(s) for migration.
26-
- Configure your [Windows Firewall for database engine access](https://docs.microsoft.com/sql/database-engine/configure-windows/configure-a-windows-firewall-for-database-engine-access).
27-
- Enable the TCP/IP protocol, which is disabled by default during SQL Server Express installation, by following the instructions in the article [Enable or Disable a Server Network Protocol](https://docs.microsoft.com/sql/database-engine/configure-windows/enable-or-disable-a-server-network-protocol#SSMSProcedure).
2825

29-
## Prerequisites for migrating SQL Server to Azure SQL Database
26+
* Create an Azure Virtual Network (VNet) for Azure Database Migration Service by using the Azure Resource Manager deployment model, which provides site-to-site connectivity to your on-premises source servers by using either [ExpressRoute](https://docs.microsoft.com/azure/expressroute/expressroute-introduction) or [VPN](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-about-vpngateways).
27+
* Ensure that your VNet Network Security Group (NSG) rules don't block the following communication ports 443, 53, 9354, 445, 12000. For more detail on Azure VNet NSG traffic filtering, see the article [Filter network traffic with network security groups](https://docs.microsoft.com/azure/virtual-network/virtual-networks-nsg).
28+
* When using a firewall appliance in front of your source database(s), you may need to add firewall rules to allow Azure Database Migration Service to access the source database(s) for migration.
29+
* Configure your [Windows Firewall for database engine access](https://docs.microsoft.com/sql/database-engine/configure-windows/configure-a-windows-firewall-for-database-engine-access).
30+
* Enable the TCP/IP protocol, which is disabled by default during SQL Server Express installation, by following the instructions in the article [Enable or Disable a Server Network Protocol](https://docs.microsoft.com/sql/database-engine/configure-windows/enable-or-disable-a-server-network-protocol#SSMSProcedure).
31+
32+
> [!IMPORTANT]
33+
> Creating an instance of Azure Database Migration Service requires access to VNet settings that are normally not within the same resource group. As a result, the user creating an instance of DMS requires permission at subscription level. To create the required roles, which you can assign as needed, run the following script:
34+
>
35+
> ```
36+
>
37+
> $readerActions = `
38+
> "Microsoft.DataMigration/services/*/read", `
39+
> "Microsoft.Network/networkInterfaces/ipConfigurations/read"
40+
>
41+
> $writerActions = `
42+
> "Microsoft.DataMigration/services/*/write", `
43+
> "Microsoft.DataMigration/services/*/delete", `
44+
> "Microsoft.DataMigration/services/*/action"
45+
>
46+
> $writerActions += $readerActions
47+
>
48+
> # TODO: replace with actual subscription IDs
49+
> $subScopes = ,"/subscriptions/00000000-0000-0000-0000-000000000000/","/subscriptions/11111111-1111-1111-1111-111111111111/"
50+
>
51+
> function New-DmsReaderRole() {
52+
> $aRole = [Microsoft.Azure.Commands.Resources.Models.Authorization.PSRoleDefinition]::new()
53+
> $aRole.Name = "Azure Database Migration Reader"
54+
> $aRole.Description = "Lets you perform read only actions on DMS service/project/tasks."
55+
> $aRole.IsCustom = $true
56+
> $aRole.Actions = $readerActions
57+
> $aRole.NotActions = @()
58+
>
59+
> $aRole.AssignableScopes = $subScopes
60+
> #Create the role
61+
> New-AzRoleDefinition -Role $aRole
62+
> }
63+
>
64+
> function New-DmsContributorRole() {
65+
> $aRole = [Microsoft.Azure.Commands.Resources.Models.Authorization.PSRoleDefinition]::new()
66+
> $aRole.Name = "Azure Database Migration Contributor"
67+
> $aRole.Description = "Lets you perform CRUD actions on DMS service/project/tasks."
68+
> $aRole.IsCustom = $true
69+
> $aRole.Actions = $writerActions
70+
> $aRole.NotActions = @()
71+
>
72+
> $aRole.AssignableScopes = $subScopes
73+
> #Create the role
74+
> New-AzRoleDefinition -Role $aRole
75+
> }
76+
>
77+
> function Update-DmsReaderRole() {
78+
> $aRole = Get-AzRoleDefinition "Azure Database Migration Reader"
79+
> $aRole.Actions = $readerActions
80+
> $aRole.NotActions = @()
81+
> Set-AzRoleDefinition -Role $aRole
82+
> }
83+
>
84+
> function Update-DmsConributorRole() {
85+
> $aRole = Get-AzRoleDefinition "Azure Database Migration Contributor"
86+
> $aRole.Actions = $writerActions
87+
> $aRole.NotActions = @()
88+
> Set-AzRoleDefinition -Role $aRole
89+
> }
90+
>
91+
> # Invoke above functions
92+
> New-DmsReaderRole
93+
> New-DmsContributorRole
94+
> Update-DmsReaderRole
95+
> Update-DmsConributorRole
96+
> ```
97+
98+
## Prerequisites for migrating SQL Server to Azure SQL Database
99+
30100
In addition to Azure Database Migration Service prerequisites that are common to all migration scenarios, there are also prerequisites that apply specifically to one scenario or another.
31101
32102
When using the Azure Database Migration Service to perform SQL Server to Azure SQL Database migrations, in addition to the prerequisites that are common to all migration scenarios, be sure to address the following additional prerequisites:
33103
34-
- Create an instance of Azure SQL Database instance, which you do by following the detail in the article C[reate an Azure SQL database in the Azure portal](https://docs.microsoft.com/azure/sql-database/sql-database-get-started-portal).
35-
- Download and install the [Data Migration Assistant](https://www.microsoft.com/download/details.aspx?id=53595) v3.3 or later.
36-
- Open your Windows Firewall to allow the Azure Database Migration Service to access the source SQL Server, which by default is TCP port 1433.
37-
- If you are running multiple named SQL Server instances using dynamic ports, you may wish to enable the SQL Browser Service and allow access to UDP port 1434 through your firewalls so that the Azure Database Migration Service can connect to a named instance on your source server.
38-
- Create a server-level [firewall rule](https://docs.microsoft.com/azure/sql-database/sql-database-firewall-configure) for the Azure SQL Database server to allow the Azure Database Migration Service access to the target databases. Provide the subnet range of the VNET used for the Azure Database Migration Service.
39-
- Ensure that the credentials used to connect to source SQL Server instance have [CONTROL SERVER](https://docs.microsoft.com/sql/t-sql/statements/grant-server-permissions-transact-sql) permissions.
40-
- Ensure that the credentials used to connect to target Azure SQL Database instance have CONTROL DATABASE permission on the target Azure SQL databases.
104+
* Create an instance of Azure SQL Database instance, which you do by following the detail in the article C[reate an Azure SQL database in the Azure portal](https://docs.microsoft.com/azure/sql-database/sql-database-get-started-portal).
105+
* Download and install the [Data Migration Assistant](https://www.microsoft.com/download/details.aspx?id=53595) v3.3 or later.
106+
* Open your Windows Firewall to allow the Azure Database Migration Service to access the source SQL Server, which by default is TCP port 1433.
107+
* If you are running multiple named SQL Server instances using dynamic ports, you may wish to enable the SQL Browser Service and allow access to UDP port 1434 through your firewalls so that the Azure Database Migration Service can connect to a named instance on your source server.
108+
* Create a server-level [firewall rule](https://docs.microsoft.com/azure/sql-database/sql-database-firewall-configure) for the Azure SQL Database server to allow the Azure Database Migration Service access to the target databases. Provide the subnet range of the VNET used for the Azure Database Migration Service.
109+
* Ensure that the credentials used to connect to source SQL Server instance have [CONTROL SERVER](https://docs.microsoft.com/sql/t-sql/statements/grant-server-permissions-transact-sql) permissions.
110+
* Ensure that the credentials used to connect to target Azure SQL Database instance have CONTROL DATABASE permission on the target Azure SQL databases.
41111
42112
> [!NOTE]
43113
> For a complete listing of the prerequisites required to use the Azure Database Migration Service to perform migrations from SQL Server to Azure SQL Database, see the tutorial [Migrate SQL Server to Azure SQL Database](https://docs.microsoft.com/azure/dms/tutorial-sql-server-to-azure-sql).
44114
>
45115
46-
## Prerequisites for migrating SQL Server to Azure SQL Database Managed Instance
47-
- Create an instance of Azure SQL Database Managed Instance by following the detail in the article [Create an Azure SQL Database Managed Instance in the Azure portal](https://aka.ms/sqldbmi).
48-
- Open your firewalls to allow SMB traffic on port 445 for the Azure Database Migration Service IP address or subnet range.
49-
- Open your Windows Firewall to allow the Azure Database Migration Service to access the source SQL Server, which by default is TCP port 1433.
50-
- If you are running multiple named SQL Server instances using dynamic ports, you may wish to enable the SQL Browser Service and allow access to UDP port 1434 through your firewalls so that the Azure Database Migration Service can connect to a named instance on your source server.
51-
- Ensure that the logins used to connect the source SQL Server and target Managed Instance are members of the sysadmin server role.
52-
- Create a network share that the Azure Database Migration Service can use to back up the source database.
53-
- Ensure that the service account running the source SQL Server instance has write privileges on the network share that you created and that the computer account for the source server has read/write access to the same share.
54-
- Make a note of a Windows user (and password) that has full control privilege on the network share that you previously created. The Azure Database Migration Service impersonates the user credential to upload the backup files to Azure storage container for restore operation.
55-
- Create a blob container and retrieve its SAS URI by using the steps in the article [Manage Azure Blob Storage resources with Storage Explorer](https://docs.microsoft.com/azure/vs-azure-tools-storage-explorer-blobs#get-the-sas-for-a-blob-container). Be sure to select all permissions (Read, Write, Delete, List) on the policy window while creating the SAS URI.
116+
## Prerequisites for migrating SQL Server to an Azure SQL Database managed instance
117+
118+
* Create an Azure SQL Database managed instance by following the detail in the article [Create an Azure SQL Database Managed Instance in the Azure portal](https://aka.ms/sqldbmi).
119+
* Open your firewalls to allow SMB traffic on port 445 for the Azure Database Migration Service IP address or subnet range.
120+
* Open your Windows Firewall to allow the Azure Database Migration Service to access the source SQL Server, which by default is TCP port 1433.
121+
* If you are running multiple named SQL Server instances using dynamic ports, you may wish to enable the SQL Browser Service and allow access to UDP port 1434 through your firewalls so that the Azure Database Migration Service can connect to a named instance on your source server.
122+
* Ensure that the logins used to connect the source SQL Server and target Managed Instance are members of the sysadmin server role.
123+
* Create a network share that the Azure Database Migration Service can use to back up the source database.
124+
* Ensure that the service account running the source SQL Server instance has write privileges on the network share that you created and that the computer account for the source server has read/write access to the same share.
125+
* Make a note of a Windows user (and password) that has full control privilege on the network share that you previously created. The Azure Database Migration Service impersonates the user credential to upload the backup files to Azure storage container for restore operation.
126+
* Create a blob container and retrieve its SAS URI by using the steps in the article [Manage Azure Blob Storage resources with Storage Explorer](https://docs.microsoft.com/azure/vs-azure-tools-storage-explorer-blobs#get-the-sas-for-a-blob-container). Be sure to select all permissions (Read, Write, Delete, List) on the policy window while creating the SAS URI.
56127
57128
> [!NOTE]
58129
> For a complete listing of the prerequisites required to use the Azure Database Migration Service to perform migrations from SQL Server to Azure SQL Database Managed Instance, see the tutorial [Migrate SQL Server to Azure SQL Database Managed Instance](https://aka.ms/migratetomiusingdms).
59130
60131
## Next steps
61-
For an overview of the Azure Database Migration Service and regional availability, see the article [What is the Azure Database Migration Service](dms-overview.md).
132+
133+
For an overview of the Azure Database Migration Service and regional availability, see the article [What is the Azure Database Migration Service](dms-overview.md).

0 commit comments

Comments
 (0)