Ms Sql Error 15150
Contents |
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: SQL SERVER ERROR 15150 SQL Server > Getting started with SQL Server Question 0 Sign in incorrect syntax near 'sp_changedbowner'. to vote 1.Created a new Login-"ADMIN" 2. Created a new Database "TEST1" Now, cannot alter the schema 'dbo' I'm trying to alter the User to 'ADMIN' in the 'USER MAPPING' but get the following error- "Cannot alter user
Sql Error 15405
'dbo' Error:-15150" I read couple of related topics but it does not give me a step by step process. Can you please provide me the steps and syntax properly as Im new to
Sp_changedbowner Example
SQL Server. Friday, May 21, 2010 1:10 AM Reply | Quote Answers 0 Sign in to vote To expand on that,if you want a login to be an administrator, the database login joins the sysadmin fixed server role.Or, if you don't want the login to be an administrator of the entire SQL Server, but do want the user to be in charge of a database, the database cannot alter the user 'dbo' user joins thedbowner fixed database role.Microsoft, SQL Server Books Online Marked as answer by Alex Feng (SQL)Moderator Friday, May 28, 2010 11:03 AM Friday, May 21, 2010 8:00 PM Reply | Quote Answerer 0 Sign in to vote Hi, Please refer to the Jens reply in the following thread: http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/4fab1ac4-d601-4cae-8619-fbfea3b4c2c8 If there are any more problems, please let me know. Thanks.***Xiao Min Tan***Microsoft Online Community*** Marked as answer by Alex Feng (SQL)Moderator Friday, May 28, 2010 11:03 AM Tuesday, May 25, 2010 9:46 AM Reply | Quote Moderator All replies 0 Sign in to vote What are you trying to do? Each database has a "dbo", database owner. You can add more users to the database.Kalman Toth, SQL Server & Business Intelligence Training; SQL 2008 GRAND SLAM Friday, May 21, 2010 7:45 AM Reply | Quote Moderator 0 Sign in to vote To expand on that,if you want a login to be an administrator, the database login joins the sysadmin fixed server role.Or, if you don't want the login to be an administrator of the entire SQL Server, but do want the user to be in charge of a database, the database user joins thedbowner fixed database role.Microsoft
views Categories: Errors, SQL Server When you try to revoke the rights of a login on a database the following error
Sp_changedbowner 'sa'
can appear: Cannot drop the user 'dbo' Solution This the database principal owns a schema in the database, and cannot be dropped. happens because the dbo user is mapped to that particular login. You need to change the database owner to a different login: USE DATABASE_NAME; ALTER AUTHORIZATION ON DATABASE::DATABASE_NAME TO [sa] After this the login will not be mapped anymore in that database with https://social.msdn.microsoft.com/Forums/sqlserver/en-US/2665798f-27f7-49c4-a85a-8fee77425a54/sql-server-error-15150?forum=sqlgetstarted dbo user: Tags: cannot drop the user dbo Currently 4.63/51 2 3 4 5 i Permalink 3 comments Comment from: bhaskara [Visitor] Thanks It helped out me. Good explanation. 11/29/14 @ 15:18 Comment from: Osi [Visitor] Gracias men, ahora puedo eliminar la replica ya que no lo poda hacer por que tenia un usuario que no http://blog.sql-assistance.com/index.php/cannot-drop-the-user-dbo exista. 06/16/15 @ 00:25 Comment from: deepak [Visitor] Good explanation. It worked!!!! Keep it up the good work! 10/30/15 @ 16:18 Comment feed for this postLeave a comment Name: Email: Your email address will not be revealed on this site. Comment text: Options: Auto-BR (Line breaks become
) Remember me (For my next comment on this site) Allow message form (Allow users to contact me through a message form -- Your email will not be revealed!) DBA BlogUseful things about managing SQL Server. Scripts, errors, tips and other thinks that worth sharing. October 2016 Sun Mon Tue Wed Thu Fri Sat <<< >>> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 SearchCategoriesAllSQL ServerConstraintsDatabase MaintenanceDatabase RecoveryErrorsIndexesPerformance & TunningSecurityServer ConfigurationT-SQLSSASErrorsSSISErrorsSecurityServer ConfigurationSSRSErrorsUncategorizedEmail SubscriptionEnter your email address:Translate translate Advertising XML Feeds Navigation LinksRecent
SQL Server experts to answer whatever question you can come up with. Our new SQL Server Forums are live! Come on http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=70031 over! We've restricted the ability to create new threads on these forums. SQL Server Forums Profile | ActiveTopics | Members | Search | ForumFAQ Register Now and get your question answered! Username: Password: Save Password Forgot your Password? All Forums Old Forums CLOSED - General SQL Server How to Drop User Login Forum Locked Printer Friendly Author Topic erikkl2000 Starting Member USA 15 sql error Posts Posted-08/06/2006: 15:41:21 Hi,I am trying to drop a user login from my database and i can not get this drop to happen with out an exception. For example when i try to remove the user mappings and click ok i get an exception of:::TITLE: Microsoft SQL Server Management Studio------------------------------Drop failed for User 'dbo'. (Microsoft.SqlServer.Smo)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+User&LinkId=20476------------------------------ADDITIONAL INFORMATION:An exception occurred while cannot alter the executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)------------------------------Cannot drop the user 'dbo'. (Microsoft SQL Server, Error: 15150)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.2047&EvtSrc=MSSQLServer&EvtID=15150&LinkId=20476------------------------------BUTTONS:OK------------------------------i have tried to reproduce this error by creating another user and mapping its username to databases and then unmap and there is not problem.. What do i do?erikEXEC sp_changedbowner 'UserLogin' nr SQLTeam MVY United Kingdom 12543 Posts Posted-08/06/2006: 16:42:59 You are trying to drop dbo?==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. erikkl2000 Starting Member USA 15 Posts Posted-08/06/2006: 16:49:53 Yes erikkl2000 Starting Member USA 15 Posts Posted-08/06/2006: 16:57:01 That error accrues when i try to remove a user mapping... nr SQLTeam MVY United Kingdom 12543 Posts Posted-08/06/2006: 18:21:15 You can't drop dbo - it is the databae owmner.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. erikkl2000 Starting Member USA 15 Posts Posted-08/06/2006: 20:32:13 I know this is an easy one but i have just resently started really paying attention to things like users a