Patrick.O.Ige

Knowledge Creation is Essential to Business, and Communication is Essential to Knowledge Creation

  Home  |   Contact  |   Syndication    |   Login
  94 Posts | 5 Stories | 342 Comments | 0 Trackbacks

News

SharePoint SharePoint SharePoint

Article Categories

Archives

Post Categories

ADO.NET

Ajax

API/WebServices

ASP.NET Resources

BizTalk Server

Blogs I read

Free Books

How to

JQuery

LINQ

Misc

Mobile BI

Reporting Services

SEO

Sharepoint Resources/Tools

SharePoint 2010 Branding

SharePoint 2010 Videos

SilverLight

SQL Server

Sql Server 2012

SSIS

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
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
posted on Wednesday, August 01, 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

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