Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 How to delete a user that has a schema

Author  Topic 

pras2007
Posting Yak Master

216 Posts

Posted - 2010-03-03 : 22:07:25
Hello All,

I’m trying to delete old user logins from our database and when I attempt to perform this task I get the following error message:

Msg 15138, Level 16, State 1, Line 1
The database principal owns a schema in the database, and cannot be dropped.

When I tried to solve this issue by running the below script:

ALTER AUTHORIZATION ON SCHEMA::CH\username TO dbo

I get the folloing error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '\'.

Does anyone know how to transfer ownership on a schema to dbo, and then delete the user login?

Please advice.

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-03-04 : 00:43:07
change CH\username to [CH\username]
Go to Top of Page
   

- Advertisement -