Lock Timeout: Lock timeout mean, one user is accessing data same time if other one user wants to access it, it will lock wait timeout for the second user and after some time it will be time out for the second user. How to resolve them? Setting the SQL Server Lock_Timeout Interval If you don't want to wait forever for a lock to become available, SQL Server offers the lock_timeout interval, which case is set as follows: SET LOCK_TIMEOUT {Millisecond} You specify the timeout interval in milliseconds, i.e. for a 10 second interval use the below code: SET LOCK_TIMEOUT 10000 Setting the SQL Server Lock_Timeout Interval with Query Re-attempt Logic We can use the lock_timeout to check for blocking that exceeds a certain limit and instead of failing the process due to the lock_timeout or waiting indefinitely for the locks to become free, we can set a delay and re-attempt the command again. This could also be helpful for deadlock situations. S...
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers