Drop SQL login even while logged in

前端 未结 6 1386
感动是毒
感动是毒 2021-02-05 01:25

When dropping a SQL Server 2008 login as part of integration test execution I sometimes get the following error:

System.Data.SqlClient.SqlException: Cou

6条回答
  •  不知归路
    2021-02-05 01:50

    If you know what database they will be connected to, you could set the database to single user mode, with rollback immediate, that'll drop their sessions.

提交回复
热议问题