How to solve SQL Server Error 1222 i.e Unlock a SQL Server table

前端 未结 4 1140
不思量自难忘°
不思量自难忘° 2020-12-12 11:16

I am working in a database where I load data in a raw table by a data loader. But today the data loader got stuck for unknown reasons. Then I stopped the data loader from wi

4条回答
  •  無奈伤痛
    2020-12-12 12:04

    To prevent this, make sure every BEGIN TRANSACTION has COMMIT

    The following will say successful but will leave uncommitted transactions:

    BEGIN TRANSACTION
    BEGIN TRANSACTION
    

    Closing query windows with uncommitted transactions will prompt you to commit your transactions. This will generally resolve the Error 1222 message.

提交回复
热议问题