Table locked

Naomi Nosonovsky 8,431 Reputation points
2025-05-15T18:02:46.8333333+00:00

Good day,

My colleague was using Import/Export wizard and the package got stuck. He since killed SSMS, but the table got locked somehow. We're unable to truncate it or rename it. What can be done to unlock it?

Thanks in advance.

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
198 questions
0 comments No comments
{count} votes

Accepted answer
  1. Michael Taylor 59,991 Reputation points
    2025-05-15T18:32:26.77+00:00

    Most likely the session that was running the import/export is still connected with an open transaction. Start SSMS, right click the server and select Activity Monitor. It will show you all connections to the databases. Under Processes find any sessions that are related to the import/export and kill them. You can also do this via T-SQL if you want.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.