Hi everyone,
We are currently having a problem with our SQL server. What seems to have
happened is a lock has been put on a row and then hasnt been removed, so now
we can't update because the lock is still there.
I'm wondering what we can do about this. Is there anyway you can delete or
remove locks in SQL Server?
At the moment, using SQL Sever, I can see a list of locks on the database
and table in question. What happens if I delete them? Each lock is
associated with a process - what happens if I kill the process?
Thanks to anyone who can offer any advice on this
kindest regards
SimonHi,
Before killing the process, try to identify the issue.
I feel that u are not commiting the transaction. after a Begin TRAN.
Thanks
Hari
MCDBA
"Simon Harvey" <simon.harvey@.the-web-works.co.uk> wrote in message
news:uXeVMVsAEHA.3400@.tk2msftngp13.phx.gbl...
> Hi everyone,
> We are currently having a problem with our SQL server. What seems to have
> happened is a lock has been put on a row and then hasnt been removed, so
now
> we can't update because the lock is still there.
> I'm wondering what we can do about this. Is there anyway you can delete or
> remove locks in SQL Server?
> At the moment, using SQL Sever, I can see a list of locks on the database
> and table in question. What happens if I delete them? Each lock is
> associated with a process - what happens if I kill the process?
> Thanks to anyone who can offer any advice on this
> kindest regards
> Simon
>|||Killing the process that holds the locks will rollback the transaction of th
at process, thereby releasing all of its locks. However, to save yourself t
his kind of trouble in the future, you should invest some time into troubles
hooting the problem. There are probably a couple of options, but all of the
m come down to why a transaction has not committed.
See if224453 INF: Understanding and Resolving SQL Server 7.0 or 2000 Blockin
g Problems
(http://support.microsoft.com/?id=224453) helps you out any. 171224 INF: Understanding
How the Transact-SQL KILL Command Works ([url]http://support.microsoft.com/?id=171224[
/url]) might also be interesting for you.
Thanks,
Ryan Stonecipher
Microsoft SQL Server Storage Engine
"Simon Harvey" <simon.harvey@.the-web-works.co.uk> wrote in message news:uXeV
MVsAEHA.3400@.tk2msftngp13.phx.gbl...
Hi everyone,
We are currently having a problem with our SQL server. What seems to have
happened is a lock has been put on a row and then hasnt been removed, so now
we can't update because the lock is still there.
I'm wondering what we can do about this. Is there anyway you can delete or
remove locks in SQL Server?
At the moment, using SQL Sever, I can see a list of locks on the database
and table in question. What happens if I delete them? Each lock is
associated with a process - what happens if I kill the process?
Thanks to anyone who can offer any advice on this
kindest regards
Simon
No comments:
Post a Comment