Hi @Pds ,
Welcome to Microsoft Q&A!
Msg 50000, Level 16, State 1, Server BIDSSql, Procedure CommandExecute, Line 167
Please see this MS link, which describes the possible scenarios for this error.
Msg 1222, Lock request time out period exceeded
In some cases, a query will fail with the lock request time out period error after waiting for more than 10ms.
So you can use sp_who2 to check for all session that are currently established in the database and check for any with blocking, high CPU usage, high I/O usage, or any with multiple entries for the same SPID. This is a troubleshooting. Maybe you can find the reason for your lock timeout.
If there is no abnormality, you can try the following solution:
- Modify the Transaction use query hints (use RECOMPILE, MAXDOPhints)
- Run big Transaction in smaller transactions.
- Upgrade Hardware if possible.
- To prevent this, make sure every BEGIN TRANSACTION has COMMIT
- If you are running this in SQL Server Management Studio, you can close the query windows and it will automatically close the transaction.
For more information, please see this article.
Here is a similar thread:https://social.msdn.microsoft.com/Forums/sqlserver/en-US/90c91ab6-2f16-4c17-a0d7-ae5802a100c2/index-job-failed-with-this-error-msg-1222-lock-request-time-out-period-exceeded-sqlstate-42000?forum=sqlgetstarted
Best regards,
Seeya
If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.