Re: Please help with deleting a user.

Al (Al@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
I created a <log in> in sql server 2005. When I tried to delete the log
in, it gave me a message that to complete the process I should delete
the users (belonging to this log in) in each databse, it also said that
it may be necessary to transfer the ownership of the schemas to new
users. I tried doing that using:


it says that it can not alter "dbo" schema.

My user that I am trying to delete is "DrawingReview" (it is a generic
name for my applicatin) and when I click on the properties of this user
it shows that the user owns "dbo" schema.

First, some terminology:

A *login* is a server-level entity. A *login* may map to a *user* in one
or more databases. The name the of the server login and database user
can be the same, but they don't have to. And there is a very special
case, where they are not: the login is the owner of a database. In
that case, the login always maps to the database user dbo.

I don't why it said that DrawingRewiew as the owner of the dbo schema.
The dbo schema is always owned by the dbo user. Possibly
DrawingReview was the database owner, but I don't think you can
drop logins that owns databases.

Just use DROP USER DrawingReview to drop the user. If the user owns
schemas you will be told. If the user was created with sp_adduser,
there will be a schema DrawingReview as well. You may want to drop
that schema, if there are no objects in it.

Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Links for SQL Server Books Online:
SQL 2008:
SQL 2005:
SQL 2000:


Relevant Pages

  • Split messages
    ... This is based off the northwind database. ... Create document schema: ... Select the SQL entry, make sure that we are pointing to the SQL ... For the item select a receive pipeline and name it EmpSplitPipe.btp. ...
  • Re: Decouple SQL queries from class in OOP design
    ... If the data is owned by the application, embedding SQL might be ... - It couples the application to the database schema. ... - The "validate employee ID" functionality is likely to be used ...
  • Re: Access 2007, SQL 2000
    ... Since users are not dbo, and SQL 2000 used the user name as the schema identifier, you have to make sure that every reference to a SQL Server object is fully qualified with the dbo. ... Normally a user should not be able to create any new objects in the db, but if they do, those new objects will be in the userName schema, not the dbo schema, assuming the user is not a db owner. ...
  • Failed to copy table objects - DTS Wizard
    ... one SQL 2000 database to another - both on the same ... I am using Enterprise Manager which is using SQL ... The name 'dbo' was not found in the ... sa is a member of Server Role "System Administrators" ...
  • RE: SQL Adapter
    ... Did you add the SQL schema with the 'Add Generated Items - Add Adapter' wizard. ... Target namespace and Request and Response root element name. ... > have to be inserted in an SQL Database. ...