My Techie Blog

  Home  |   Contact  |   Syndication    |   Login
  110 Posts | 5 Stories | 406 Comments | 0 Trackbacks

News

Article Categories

Archives

Post Categories

ADO.NET

Ajax

API/WebServices

ASP.NET Resources

BizTalk Server

Blogs I read

Free Books

How to

iOT

JavaScript

JQuery

JSLink - SharePoint

JSON

LINQ

Misc

Mobile BI

MS Business Inteliigence

Reporting Services

Responsive/MVC ASP.NET

SEO

Sharepoint Resources/Tools

SharePoint 2010 Branding

SharePoint 2010 Videos

SharePoint 2013

SharePoint Online

SilverLight

SPServices

SQL Server

Sql Server 2012

SSIS

Web Optimization Tools

Web Performace Tools

Windows 8

Windows Azure

Windows Azure

Windows Phone

WorkFlows

WSS V3

xml

In SQL Server 2005, if you try to drop a database user by right-clicking the user name and clicking Delete, you may encounter an error as follows.
"The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15138).

This problem normally occurs when a user owns a schema and you are trying to delete the user.
There are many workarounds for these one is

 Using the GUI in "Object Explorer" (MS SQL Management Studio) Expand the [databasename] / Security.
Click on Schemas. 
In summary window, determine which Schema(s) are owned by the user and either change the owner or remove the Scheme(s). 
The user can then be deleted.

Or using AdventureWorks DB you can for example:-

USE AdventureWorks;
GO
ALTER SCHEMA HumanResources TRANSFER Person.Address;
Go




And HAPPY GO LUCKY
posted on Wednesday, August 1, 2007 11:44 PM

Feedback

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 9/17/2007 10:34 AM Enrique Pasos
Worked for me! Thx.

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 12/6/2007 3:20 AM imran
this really works. :D

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 1/21/2008 1:58 AM Fred
Thank you so much !

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 8/12/2008 2:47 AM Harun
Thank you it works...

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 10/15/2008 7:40 AM MaryCR
Excellent!!! It works for me too :)

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 11/4/2008 5:39 AM Ruslan
Thanks very much!

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 2/18/2009 12:33 AM Joris
Finally a good solution! You're my hero! :)

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 5/8/2009 9:14 PM cbrad
thank you

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 5/23/2009 12:02 AM Sonic7771
Nice and simple.....thks.

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 6/17/2009 8:53 PM Simm
plain and simple that works !!!

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 7/3/2009 12:00 PM Vythees
Thats very great tip. Grazie.

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 8/24/2009 3:37 AM kapil sharma
thank u very much
its working fine

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 11/6/2009 11:41 PM hardy
Thnax !

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 11/13/2009 2:02 PM Dragos
Worked for me ! Thanks alot !!

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 2/2/2010 2:51 PM Yuping Su
Thank you very much!

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 2/12/2010 4:50 AM Thiru
Thank you very much

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 2/23/2010 8:36 PM Bidyut
Simple and effective solution. A good time saver. Thanks a million!

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 3/11/2010 4:16 PM HeadCase
Awesome solution!!! thanks...:-)

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 3/17/2010 12:29 PM Dan
That's the solution i was looking for. great! thank you very much

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 4/26/2010 12:37 PM Meyya
It works

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 6/16/2010 7:29 AM Maximus
Mine alsa worked, that was beautiful, really thanks

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 7/26/2010 11:39 PM sunil kumar
It Works, Thanks...

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 8/18/2010 2:52 PM Dante
funcionó perfectamante, gracias !!!

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 8/25/2010 10:03 AM DS
¡¡Gracias si funciona!!

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 5/22/2011 11:58 PM janakadalugama
Thanks for the Help

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 7/11/2011 8:32 AM R
Awesome! It is successful!

Thank You for keeping me from a headache.

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 7/14/2011 6:57 AM alex
Still works on MSSQL 2008. Thx

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 7/19/2011 6:08 AM Efren Lugo
Thanks i was trying to fix this problem from some hours.. thanks a lot

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 9/13/2011 9:43 PM Tunji Oseni
Thank you, it works

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 12/22/2011 8:21 AM bryant
ok funciona correctamente peroen el schema se borra el owner

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 2/24/2012 12:35 AM tomek17
Thank you very much, its works

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 4/12/2012 3:33 AM newrule
Thank you very much! it works

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 6/19/2012 6:10 AM Edward Joell
User create with dbo as default schema, and owning no schema. Yet unable to delete with above cited error message. Created new schema. gave that user ownership. changed default schema to new schema. tried to delete user. schema deleted fine. user failed. same error message. No evidence that user owns any schema.

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 3/7/2013 4:05 AM dieterberrios
Worked perfectly! Thanks.

# re: sql server error "The database principal owns a schema in the database, and cannot be dropped." 11/5/2013 9:40 PM Thanks
Worked perfect!

Post A Comment
Title:
Name:
Email:
Comment:
Verification: