December 21, 2014 at 5:05 am
Hi
i have a DB IN SQL SERVER . I Dettach it and take it to another pc
and attach it on sql server of that pc.
but in mydb-->security-->users there is a user of another sql server which is not here in this sql server.
i wants to delete it. it is also db_owner.
but i cant remove it.
how can it do?
Thanks
December 21, 2014 at 10:39 pm
Hi,
Please share the error you are getting while trying to delete the user.
Are you getting error related to schema or something else.
Regards
Shafat Husain
Regards,
Shafat Husain
🙂
And Your Lord Never Forgets...!! (64:19 -- Quran)
December 22, 2014 at 1:25 am
If that login is the owner of a database, you won't be able to remove it. First change the owner of the database to another login, then try again.
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
December 22, 2014 at 4:09 pm
Replace "<your_db_name>" with the restored db name:
ALTER AUTHORIZATION ON DATABASE::<your_db_name> TO sa
USE <your_db_name>
DROP USER <user_name>
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply