June 12, 2014 at 7:01 am
Hi All,
Am using SQL2008,
I have created one login(xxxxxxx) and now i want to drop that login but i cant able to that.
while i am trying to drop that am getting the Following error..
Login 'xxxxxx' owns one or more database(s). Change the owner of the database(s) before dropping the login.
PFA..
Regards
Jagadeesh..
Regards
Chowdary...
June 12, 2014 at 7:03 am
The message is pretty clear. The login is the owner of one or more databases. You need to change the owner of those databases to be able to drop the user.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 12, 2014 at 7:10 am
The Screenshot which you've attached is basically an Informational Message. It's not an error.... All it is saying is, you should manually drop respective Database users later, because dropping a login using SSMS by default doesn't drop the mapped DB users.
June 12, 2014 at 7:18 am
Hi All thank you for giving the Reply...
Actually am having only one database ,In that the User is not there to drop at database level,If it is there so that i can drop that,If it is not there how can I?.
And that Screenshot i have given just for reference only.
Regards
Jagadeesh......
Regards
Chowdary...
June 12, 2014 at 7:25 am
If you are still getting the same error message when dropping the login, Did you checked who the Database Owner is as Gail suggested?
June 12, 2014 at 8:00 am
Chowdary's (6/12/2014)
Actually am having only one database ,In that the User is not there to drop at database level
I said nothing about the login being a user in the database. The login is the database *owner*, not a user. You need to change the owner of the database to another login, then you can drop that login.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 12, 2014 at 9:50 pm
For e.g.
Use DBName
go
EXEC sp_changedbowner 'sa'
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply