scripts

  • can anyone send me the scripts how to remove users from different databases in a server

  • You can use DROP USER to remove database users

    If you can explain a bit more about your problem, someone will be able to help you more.

    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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • If you want to check for the existance first then its:-

    IF EXISTS (SELECT * FROM sys.database_principals WHERE name = N'someuser')

    DROP USER [someuser]

Viewing 3 posts - 1 through 2 (of 2 total)

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