Add member failed for DatabaseRole

Sayed Ahmad Alrefai 20 Reputation points
2024-08-08T12:48:22.54+00:00

TITLE: Microsoft SQL Server Management Studio


Add member failed for DatabaseRole 'db_accessadmin'. (Microsoft.SqlServer.Smo)

For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=17.100.30.0&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Add+member+DatabaseRole&LinkId=20476


ADDITIONAL INFORMATION:

An exception occurred while Add member failed for DatabaseRole or batch. (Microsoft.SqlServer.ConnectionInfo)


Cannot use the special principal 'dbo'. (Microsoft SQL Server, Error: 15405)

For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-15405-database-engine-error


BUTTONS:

OK


SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

  2. Erland Sommarskog 138.7K Reputation points MVP Volunteer Moderator
    2024-08-08T21:45:51.24+00:00

    It seems that you did

    ALTER ROLE db_accessadmin ADD MEMBER dbo
    

    As the error message says, you cannot do this for the database user dbo. Nor is there any reason to, since dbo is almighty in the database and already has all powers that come with db_accessadmin.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.