Pages

Mar 16, 2018

SQL Server: The database principal owns a database role and cannot be dropped. (Microsoft SQL Server, Error: 15421)

Error while deleting the orphan user.

TITLE: Microsoft SQL Server Management Studio
------------------------------

Drop failed for User ''.  (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=14.0.17213.0+((SSMS_Rel).171128-2020)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+User&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

The database principal owns a database role and cannot be dropped. (Microsoft SQL Server, Error: 15421)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=12.00.4237&EvtSrc=MSSQLServer&EvtID=15421&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------


Check what database role is owned by this user by right click each role. When you find it update it to dbo.


Are you done, now you will be able to delete this user. Good Luck!

No comments: