Some times we may get the below error while updating the login from dbo to some other login from user mapping window.
1. I have database which is mapped with dbo login and dbo schema.
2. I tried to update the database with app_user login, then it displays that error message.
To fix the issue we need to change the default owner to 'sa' and then tried to update the login.
Use database_name
sp_changedbowner 'sa'
It may cause because dbo is mapped with some other login, then we need to change the dbo login name to 'sa', it is because the sa login is reffered as dbo and it will exists in all the databases. So we should not modify the dbo login to any other login except 'sa'.
1. I have database which is mapped with dbo login and dbo schema.
2. I tried to update the database with app_user login, then it displays that error message.
To fix the issue we need to change the default owner to 'sa' and then tried to update the login.
Use database_name
sp_changedbowner 'sa'
It may cause because dbo is mapped with some other login, then we need to change the dbo login name to 'sa', it is because the sa login is reffered as dbo and it will exists in all the databases. So we should not modify the dbo login to any other login except 'sa'.
如果dbo map到非sa的login时,在更改dbo时,会遇到一些错误,解决办法是把数据库的默认owner更改为sa,然后在编辑dbo。
Use database_name
sp_changedbowner 'sa'
转自: http://calyansql.blogspot.com/2012/07/cannot-alter-user-dbo-microsoft-sql.html
本文介绍了解决在更新登录名从 DBO 到其他登录名时遇到的错误方法。当数据库映射到非 'sa' 的登录名时,尝试更改 DBO 会导致错误。解决此问题的方法是将数据库的默认所有者更改为 'sa',然后再进行登录名的更改。
931

被折叠的 条评论
为什么被折叠?



