Error: -
Cannot alter the user 'dbo'. (Microsoft SQL Server, Error:
15150)
When you try to revoke the rights of a login on a database the
following error can appear:
Cannot drop
the user 'dbo'
Solution
This happens because the dbo user is
mapped to that particular login.
You need to change the
database owner to a different login:
Run the Query showing the below:
Note: - Before Running the
Query remove the [ ] sign.
1. USE [DATABASE NAME];
2. ALTER AUTHORIZATION ON DATABASE::[DATABASE NAME] TO [sa]
If you Facing any error: -
Replace sa to administrator
After this the login will not be mapped anymore in that database with dbo user:
No comments:
Post a Comment