You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/migrate/add-server-credentials.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: vikram1988
5
5
ms.author: vibansa
6
6
ms.manager: abhemraj
7
7
ms.topic: how-to
8
-
ms.date: 11/13/2022
8
+
ms.date: 04/13/2023
9
9
ms.custom: engagement-fy23
10
10
---
11
11
@@ -43,7 +43,7 @@ The table below lists the permissions required on the server credentials provide
43
43
Feature | Windows credentials | Linux credentials
44
44
---| ---| ---
45
45
**Software inventory** | Guest user account | Regular/normal user account (non-sudo access permissions)
46
-
**Discovery of SQL Server instances and databases** | User account that is member of the sysadmin server role. | _Not supported currently_
46
+
**Discovery of SQL Server instances and databases** | User account that is a member of the sysadmin server role or has [these permissions](migrate-support-matrix-vmware.md#configure-the-custom-login-for-sql-server-discovery) for each SQL Server instance.| _Not supported currently_
47
47
**Discovery of ASP.NET web apps** | Domain or non-domain (local) account with administrative permissions | _Not supported currently_
48
48
**Agentless dependency analysis** | Domain or non-domain (local) account with administrative permissions | Sudo user account with permissions to execute ls and netstat commands. If you are providing a sudo user account, ensure that you have enabled **NOPASSWD** for the account to run the required commands without prompting for a password every time the sudo command is invoked. <br /><br /> Alternatively, you can create a user account that has the CAP_DAC_READ_SEARCH and CAP_SYS_PTRACE permissions on /bin/netstat and /bin/ls files, set using the following commands:<br /><code>sudo setcap CAP_DAC_READ_SEARCH,CAP_SYS_PTRACE=ep /bin/ls<br /> sudo setcap CAP_DAC_READ_SEARCH,CAP_SYS_PTRACE=ep /bin/netstat</code>
49
49
@@ -65,4 +65,4 @@ Feature | Windows credentials | Linux credentials
65
65
66
66
## Next steps
67
67
68
-
Review the tutorials for discovery of servers running in your [VMware environment](tutorial-discover-vmware.md) or [Hyper-V environment](tutorial-discover-hyper-v.md) or for [discovery of physical servers](tutorial-discover-physical.md)
68
+
Review the tutorials for discovery of servers running in your [VMware environment](tutorial-discover-vmware.md) or [Hyper-V environment](tutorial-discover-hyper-v.md) or for [discovery of physical servers](tutorial-discover-physical.md).
Copy file name to clipboardExpand all lines: articles/migrate/how-to-discover-sql-existing-project.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: vineetvikram
5
5
ms.author: vivikram
6
6
ms.manager: abhemraj
7
7
ms.topic: how-to
8
-
ms.date: 08/19/2022
8
+
ms.date: 04/13/2023
9
9
ms.custom: engagement-fy23
10
10
---
11
11
@@ -22,14 +22,14 @@ This discovery process is agentless that is, nothing is installed on the target
22
22
- Created an [Azure Migrate project](./create-manage-projects.md) before the announcement of SQL and web apps assessment feature for your region
23
23
- Added the [Azure Migrate: Discovery and assessment](./how-to-assess.md) tool to a project
24
24
- Review [app-discovery support and requirements](./migrate-support-matrix-vmware.md#vmware-requirements).
25
-
- In case you're discovering assets on VMware environment then, Make sure servers where you're running app-discovery have PowerShell version 2.0 or later installed, and VMware Tools (later than 10.2.0) is installed.
25
+
- In case you're discovering assets on a VMware environment, make sure the servers where you're running appdiscovery have PowerShell version 2.0 or later installed, and VMware tools (later than 10.2.0) installed.
26
26
- Check the [requirements](./migrate-appliance.md) for deploying the Azure Migrate appliance.
27
27
- Verify that you have the [required roles](./create-manage-projects.md#verify-permissions) in the subscription to create resources.
28
28
- Ensure that your appliance has access to the internet
29
29
30
30
> [!Note]
31
-
> Even though the processes in this document are covered for VMware, the processes are similar for Microsoft Hyper-V and Physical environment.
32
-
> Discovery and assessment for SQL Server instances and databases is available across the Microsoft Hyper-V and Physical environment also.
31
+
> Though the procedure described in this article is for VMware, the processes are similar for Microsoft Hyper-V and Physical environments.
32
+
> Discovery and assessment for SQL Server instances and databases is available across the Microsoft Hyper-V and Physical environments.
33
33
34
34
## Enable discovery of web apps and SQL Server instances and databases
35
35
@@ -44,7 +44,7 @@ This discovery process is agentless that is, nothing is installed on the target
44
44
- Validate that the services running on the appliance are updated to the latest versions. To do so, launch the Appliance configuration manager from your appliance server and select view appliance services from the Setup prerequisites panel.
45
45
- Appliance and its components are automatically updated
46
46
:::image type="content" source="./media/how-to-discover-sql-existing-project/appliance-services-version.png" alt-text="Check the appliance version":::
47
-
- In the manage credentials and discovery sources panel of the Appliance configuration manager, add Domain or SQL Server Authentication credentials that have Sysadmin access on the SQL Server instance and databases to be discovered.
47
+
- In the manage credentials and discovery sources panel of the Appliance configuration manager, add Domain or SQL Server Authentication credentials that have Sysadmin access on the SQL Server instance and databases to be discovered or have [these permissions](migrate-support-matrix-vmware.md#configure-the-custom-login-for-sql-server-discovery) for each SQL Server instance.
48
48
- Web apps discovery works with both domain and non-domain Windows OS credentials as long as the account used has local admin privileges on servers.
49
49
You can leverage the automatic credential-mapping feature of the appliance, as highlighted [here](./tutorial-discover-vmware.md#start-continuous-discovery).
50
50
@@ -59,7 +59,7 @@ This discovery process is agentless that is, nothing is installed on the target
59
59
60
60
## Next steps
61
61
62
-
- Learn how to create an [Azure SQL assessment](./how-to-create-azure-sql-assessment.md)
63
-
- Learn more about [Azure SQL assessments](./concepts-azure-sql-assessment-calculation.md)
64
-
- Learn how to create an [Azure App Service assessment](./how-to-create-azure-app-service-assessment.md)
65
-
- Learn more about [Azure App Service assessments](./concepts-azure-webapps-assessment-calculation.md)
62
+
- Learn how to create an [Azure SQL assessment](./how-to-create-azure-sql-assessment.md).
63
+
- Learn more about [Azure SQL assessments](./concepts-azure-sql-assessment-calculation.md).
64
+
- Learn how to create an [Azure App Service assessment](./how-to-create-azure-app-service-assessment.md).
65
+
- Learn more about [Azure App Service assessments](./concepts-azure-webapps-assessment-calculation.md).
Copy file name to clipboardExpand all lines: articles/migrate/migrate-support-matrix-hyper-v.md
+132-2Lines changed: 132 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: Vikram1988
5
5
ms.author: vibansa
6
6
ms.manager: abhemraj
7
7
ms.topic: conceptual
8
-
ms.date: 03/08/2023
8
+
ms.date: 04/13/2023
9
9
ms.cutom: engagement-fy23
10
10
---
11
11
@@ -86,7 +86,7 @@ Support | Details
86
86
**Windows servers** | Windows Server 2008 and later are supported.
87
87
**Linux servers** | Currently not supported.
88
88
**Authentication mechanism** | Both Windows and SQL Server authentication are supported. You can provide credentials of both authentication types in the appliance configuration manager.
89
-
**SQL Server access** | Azure Migrate requires a Windows user account that is a member of the sysadmin server role.
89
+
**SQL Server access** | To discover SQL Server instances and databases, the Windows or SQL Server account must be a member of the sysadmin server role or have [these permissions](#configure-the-custom-login-for-sql-server-discovery) for each SQL Server instance.
90
90
**SQL Server versions** | SQL Server 2008 and later are supported.
91
91
**SQL Server editions** | Enterprise, Standard, Developer, and Express editions are supported.
92
92
**Supported SQL configuration** | Discovery of standalone, highly available, and disaster protected SQL deployments is supported. Discovery of HADR SQL deployments powered by Always On Failover Cluster Instances and Always On Availability Groups is also supported.
@@ -97,6 +97,136 @@ Support | Details
97
97
>
98
98
> However, you can modify the connection settings, by selecting **Edit SQL Server connection properties** on the appliance.[Learn more](/sql/database-engine/configure-windows/enable-encrypted-connections-to-the-database-engine) to understand what to choose.
99
99
100
+
### Configure the custom login for SQL Server discovery
101
+
102
+
The following are sample scripts for creating a login and provisioning it with the necessary permissions.
103
+
104
+
#### Windows Authentication
105
+
106
+
```sql
107
+
-- Create a login to run the assessment
108
+
use master;
109
+
-- If a SID needs to be specified, add here
110
+
DECLARE @SID NVARCHAR(MAX) = N'';
111
+
CREATE LOGIN [MYDOMAIN\MYACCOUNT] FROM WINDOWS;
112
+
SELECT @SID = N'0x'+CONVERT(NVARCHAR, sid, 2) FROMsys.sysloginswhere name ='MYDOMAIN\MYACCOUNT'
113
+
IF (ISNULL(@SID,'') !='')
114
+
PRINT N'Created login [MYDOMAIN\MYACCOUNT] with SID = '+ @SID
115
+
ELSE
116
+
PRINT N'Login creation failed'
117
+
GO
118
+
119
+
-- Create user in every database other than tempdb and model and provide minimal read-only permissions.
120
+
use master;
121
+
EXECUTE sp_MSforeachdb 'USE [?]; IF (''?'' NOT IN (''tempdb'',''model'')) BEGIN TRY CREATE USER [MYDOMAIN\MYACCOUNT] FOR LOGIN [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH'
122
+
EXECUTE sp_MSforeachdb 'USE [?]; IF (''?'' NOT IN (''tempdb'',''model'')) BEGIN TRY GRANT SELECT ON sys.sql_expression_dependencies TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH'
123
+
EXECUTE sp_MSforeachdb 'USE [?]; IF (''?'' NOT IN (''tempdb'',''model'')) BEGIN TRY GRANT VIEW DATABASE STATE TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH'
124
+
GO
125
+
126
+
-- Provide server level read-only permissions
127
+
use master;
128
+
BEGIN TRY GRANTSELECTONsys.sql_expression_dependencies TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
129
+
BEGIN TRY GRANT EXECUTE ON OBJECT::sys.xp_regenumkeys TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
130
+
BEGIN TRY GRANT VIEW DATABASE STATE TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
131
+
BEGIN TRY GRANT VIEW SERVER STATE TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
132
+
BEGIN TRY GRANT VIEW ANY DEFINITION TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
133
+
GO
134
+
135
+
-- Required from SQL 2014 onwards for database connectivity.
136
+
use master;
137
+
BEGIN TRY GRANT CONNECT ANY DATABASE TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
138
+
GO
139
+
140
+
-- Provide msdb specific permissions
141
+
use msdb;
142
+
BEGIN TRY GRANT EXECUTE ON [msdb].[dbo].[agent_datetime] TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
143
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[sysjobsteps] TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
144
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[syssubsystems] TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
145
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[sysjobhistory] TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
146
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[syscategories] TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
147
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[sysjobs] TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
148
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[sysmaintplan_plans] TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
149
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[syscollector_collection_sets] TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
150
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[sysmail_profile] TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
151
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[sysmail_profileaccount] TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
152
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[sysmail_account] TO [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
153
+
GO
154
+
155
+
-- Clean up
156
+
--use master;
157
+
-- EXECUTE sp_MSforeachdb 'USE [?]; BEGIN TRY DROP USER [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;'
158
+
-- BEGIN TRY DROP LOGIN [MYDOMAIN\MYACCOUNT] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
159
+
--GO
160
+
```
161
+
162
+
#### SQL Server Authentication
163
+
164
+
```sql
165
+
-- Create a login to run the assessment
166
+
use master;
167
+
-- If a SID needs to be specified, add here
168
+
DECLARE @SID NVARCHAR(MAX) = N'';
169
+
IF (@SID = N'')
170
+
BEGIN
171
+
CREATE LOGIN [evaluator]
172
+
WITH PASSWORD ='<provide a strong password>'
173
+
END
174
+
ELSE
175
+
BEGIN
176
+
CREATE LOGIN [evaluator]
177
+
WITH PASSWORD ='<provide a strong password>'
178
+
, SID = @SID
179
+
END
180
+
SELECT @SID = N'0x'+CONVERT(NVARCHAR, sid, 2) FROMsys.sysloginswhere name ='evaluator'
181
+
IF (ISNULL(@SID,'') !='')
182
+
PRINT N'Created login [evaluator] with SID = '+@SID
183
+
ELSE
184
+
PRINT N'Login creation failed'
185
+
GO
186
+
187
+
-- Create user in every database other than tempdb and model and provide minimal read-only permissions.
188
+
use master;
189
+
EXECUTE sp_MSforeachdb 'USE [?]; IF (''?'' NOT IN (''tempdb'',''model'')) BEGIN TRY CREATE USER [evaluator] FOR LOGIN [evaluator]END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH'
190
+
EXECUTE sp_MSforeachdb 'USE [?]; IF (''?'' NOT IN (''tempdb'',''model'')) BEGIN TRY GRANT SELECT ON sys.sql_expression_dependencies TO [evaluator]END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH'
191
+
EXECUTE sp_MSforeachdb 'USE [?]; IF (''?'' NOT IN (''tempdb'',''model'')) BEGIN TRY GRANT VIEW DATABASE STATE TO [evaluator]END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH'
192
+
GO
193
+
194
+
-- Provide server level read-only permissions
195
+
use master;
196
+
BEGIN TRY GRANTSELECTONsys.sql_expression_dependencies TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
197
+
BEGIN TRY GRANT EXECUTE ON OBJECT::sys.xp_regenumkeys TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
198
+
BEGIN TRY GRANT VIEW DATABASE STATE TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
199
+
BEGIN TRY GRANT VIEW SERVER STATE TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
200
+
BEGIN TRY GRANT VIEW ANY DEFINITION TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
201
+
GO
202
+
203
+
-- Required from SQL 2014 onwards for database connectivity.
204
+
use master;
205
+
BEGIN TRY GRANT CONNECT ANY DATABASE TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
206
+
GO
207
+
208
+
-- Provide msdb specific permissions
209
+
use msdb;
210
+
BEGIN TRY GRANT EXECUTE ON [msdb].[dbo].[agent_datetime] TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
211
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[sysjobsteps] TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
212
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[syssubsystems] TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
213
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[sysjobhistory] TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
214
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[syscategories] TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
215
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[sysjobs] TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
216
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[sysmaintplan_plans] TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
217
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[syscollector_collection_sets] TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
218
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[sysmail_profile] TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
219
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[sysmail_profileaccount] TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
220
+
BEGIN TRY GRANTSELECTON [msdb].[dbo].[sysmail_account] TO [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
221
+
GO
222
+
223
+
-- Clean up
224
+
--use master;
225
+
-- EXECUTE sp_MSforeachdb 'USE [?]; BEGIN TRY DROP USER [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;'
226
+
-- BEGIN TRY DROP LOGIN [evaluator] END TRY BEGIN CATCH PRINT ERROR_MESSAGE() END CATCH;
227
+
--GO
228
+
```
229
+
100
230
## Web apps discovery requirements
101
231
102
232
[Software inventory](how-to-discover-applications.md) identifies web server role existing on discovered servers. If a server is found to have a web server installed, Azure Migrate discovers web apps on the server.
0 commit comments