Skip to content

Commit f02c6a7

Browse files
Merge pull request #260851 from abhims14/patch-2
Update known-issues-azure-sql-migration-azure-data-studio.md
2 parents f893e58 + 425ce07 commit f02c6a7

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

articles/dms/known-issues-azure-sql-migration-azure-data-studio.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ This article provides a list of known issues and troubleshooting steps associate
255255

256256
## Error code: 2060 - SqlSchemaCopyFailed
257257

258+
- **Message**: `Login failed for user 'Domain\MachineName$`.
259+
260+
- **Cause**: This error generally happens when customer uses Windows authentication to login the source. The customer provides Windows authentication credential but SHIR converts it to machine account (Domain\MachineName$).
261+
262+
- **Recommendation**: The solution is to add machine account to the SQL Server. [How to Create a SQL Server Computer Account Login](https://stackoverflow.com/questions/38680366/how-to-add-a-new-sql-server-machine-account)
263+
258264
- **Message**: `The SELECT permission was denied on the object 'sql_logins', database 'master', schema 'sys'.`
259265

260266
- **Cause**: The account customers use to connect Azure SQL Database lacks the permission to access `sys.sql_logins` table.
@@ -263,11 +269,21 @@ This article provides a list of known issues and troubleshooting steps associate
263269

264270
1. Add 'sysadmin' role to the account, which grants the admin permission.
265271

266-
1. If customers can't use admin account or can't grant admin permission to the account, they can create a user in master and grant **dbmanager** and **loginmanager** permission to the user. For example,
272+
1. If customers can't use sysadmin account or can't grant sysadmin permission to the account, then minimum permission on source SQL Server required is "db_owner" and on target Azure SQL DB create a user in master and grant **##MS_DatabaseManager##**,**##MS_DatabaseConnector##**, **##MS_DefinitionReader##** and **##MS_LoginManager##** fixed server roles to the user. For example,
267273

268274
```sql
269275
-- Run the script in the master
270-
CREATE USER testuser FROM LOGIN testlogin;
276+
-- Please run the script on Master database
277+
CREATE LOGIN testuser with Password = '*********';
278+
ALTER SERVER ROLE ##MS_DefinitionReader## ADD MEMBER [testuser];
279+
GO
280+
ALTER SERVER ROLE ##MS_DatabaseConnector## ADD MEMBER [testuser];
281+
GO
282+
ALTER SERVER ROLE ##MS_DatabaseManager## ADD MEMBER [testuser];
283+
GO
284+
ALTER SERVER ROLE ##MS_LoginManager## ADD MEMBER [testuser];
285+
GO
286+
CREATE USER testuser from login testuser;
271287
EXEC sp_addRoleMember 'dbmanager', 'testuser';
272288
EXEC sp_addRoleMember 'loginmanager', 'testuser';
273289
```

0 commit comments

Comments
 (0)