Deletion of SQL Logins

  • Hi,

    I am having windows domain logins created in SQL Server long back. Now I need to delete those logins as the users left the company. I have tried to access the properties of individual login users in the Enterprise Manager and was not successful as it is hanging. I tried to work it out from the Query Analyzer by issuing the following statement:

    exec sp_helpuser 'domain\login'

    exec sp_revokedbaccess 'domain\login'

    For the first statement, i am able to get the login information and for the second statement it is giving error as follows:

    Server: Msg 3906, Level 16, State 1, Procedure sp_revokedbaccess, Line 67

    Could not run BEGIN TRANSACTION in database xx because the database is read-only.

    But the database is not in read-only mode.

    Can anyone out there help me?


    Lucky

  • Hello,

    Are you able to do anything else in the database? Like delete or insert in any table? Are you working on the server or you are connecting from the workstation? How many times did you try? Could it be a manifestation of database locking?

    I don't think that it is your permissions because the message will be like "permission denied" or "User does not have permission to perform this action"

    Yelena

    Regards,Yelena Varsha

  • I suppose that you first deleted the accounts from active directory and then try to delete them from SQL Server?

    If so:

    Try to get hold on to the SUID of these deleted users. The suid is kept in the database.

    To avoid this kind of trouble:

    Make a active directory group, where each account from active directory is a member. This way you never have to delete an active directory account from your SQL Server login list.

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

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