Contents tagged with Users

  • Finding orphaned database users

    Database users can become orphaned for a few reasons. For example, a database restore to another instance or deleting the corresponding SQL login would have the effect of leaving a database user orphaned. Development/testing SQL servers may also experience this due to the number of ad-hoc updates that may occur over the years. If you are unlucky enough your production servers may even suffer from this.

    SQL provides a procedure that will provide this information on a database level:

    EXEC sp_ …