DROP LOGIN

  • Dear All,

    Could you please advise on the below error.

    Msg 15174, Level 16, State 1, Line 1

    Login 'abcd' owns one or more database(s). Change the owner of the database(s) before dropping the login.

    I have changed the db_owner to 'xxxx' for all databases by using

    EXEC sp_changedbowner 'xxxx' and tried to drop the login 'abcd' still Iam facing the above error.

    Thanks in advance,

    Regards,

    Ravichandra.

  • Any one help me out from this? please

    Regards,

    Ravichandra.

  • run this...

    select name [database], suser_sname(sid) [owner] from master.dbo.sysdatabases

    what it says? If still seeing the owner as your problamatic username then change it.

    ----------
    Ashish

  • Thanks Ashish !!! You are right.

    Actually, One database was in offline and also it mapped to old login 'abcd' which I couldn't noticed.

    I came to know once I ran a query which you sent to me.

    Now,Iam able to delete.

    Once again thanks !!

    Regards,

    Ravichandra.

  • Thanks a lot

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply