归档标题

Autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et dolore feugait.

月度归档 2015年12月7日

MSSQL ERROR: Create Failed For User ‘UserName’

MSSQL ERROR: Create Failed For User ‘UserName’

When you restore or migrating your MSSQL database from one to another server, below error message may appear:

Create failed for user ‘UserName’. (Microsoft.SqlServer.Smo)

Additional Information:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
User, group, or role ‘UserName’ already exists in the current database. (Microsoft SQL Server, Error: 15023)

You can simple to solve the issue by maps an existing user in a database to a MSSQL Server login:

阅读更多