sql server error "The database principal owns a schema in the database, and cannot be dropped."

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

Error The user is not associated with a trusted SQL Server connection

When installing Sql Server 2005/2000 you propbably had  options of installing it using  Mixed mode Authentication (Sql server and Windows Authentication or Windows Authentication.

But i think i must have chosen Windows Auth since its recommended and more secured.So on my Sql Server 2005 i created a user login and gave some it some access to some database,table objects etc..

Only when i tried logging in using the username i got the error "
Error The user is not associated with a trusted SQL Server connection".

I was already pulling my hair out since i knew sql 2005 has some other secure features and new configs involved.
But at the end i figured it out that it was trying to use an acct which it wasn't configured.I did switch the Authentication to mixed mode and it worked like a charm.

To do the switch just expand to your datbase instance right click properties and go to security or something related in sql 2005.

Hope this will save someone elses time
 


«August»
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
2627282930311
2345678