473,378 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

SQL Server Rcrd Locks via IIS

I have an Asp.net application that writes data to a SQL Server database. The
database has some stored procedures that are known to be poorly written which
can cause some records to become deadlocked. If I am running in debug mode
when this occurs, the code hangs and never returns. The records remain
deadlocked until the connection is broken (at least I think that is when it
frees).

What I would like to know is how to break that connection from my
development machine and local IIS server? Once the record is locked, I can
not free it until I reboot my computer. I've tried closing the development
environment and stopping IIS. Niether of those things work.

Can anyone make a suggestion of how I can break the lock without rebooting?

--
Jerry J
Jun 22 '07 #1
2 974
Hi Jerry,
Can anyone make a suggestion of how I can break the lock without rebooting?
You could try to set the database to single-user and back to multi-user
again:
ALTER DATABASE <dbnameSET SINGLE_USER WITH ROLLBACK IMMEDIATE;
ALTER DATABASE <dbnameSET SINGLE_USER;

Hope this helps,

Roland

Jun 22 '07 #2
kill your spids. you can write a page to do this.

-- bruce (sqlwork.com)

Jerry J wrote:
I have an Asp.net application that writes data to a SQL Server database. The
database has some stored procedures that are known to be poorly written which
can cause some records to become deadlocked. If I am running in debug mode
when this occurs, the code hangs and never returns. The records remain
deadlocked until the connection is broken (at least I think that is when it
frees).

What I would like to know is how to break that connection from my
development machine and local IIS server? Once the record is locked, I can
not free it until I reboot my computer. I've tried closing the development
environment and stopping IIS. Niether of those things work.

Can anyone make a suggestion of how I can break the lock without rebooting?
Jun 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ritesh | last post by:
Hi All, According to my observation using SP_WHO2 in my database, some INSERT statements are getting blocked by SELECT statements. Though the blocking SELECT statement is having ReadPast hint,...
4
by: Prince Kumar | last post by:
I joined a company recently and they have a java program which hangs (does nothing) after a while. This is no way consistent. It could succeed quite a few times and can fail a few other times....
19
by: Mark C. | last post by:
The company I work for has been running Access 2000 on a Windows NT server with Opportunistic Locking turned off on the server without issue for almost a year. We have just switched to a Windows...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
1
by: rlwaggs | last post by:
Is there a problem with linked tables in Access causing share locks in SQL server if my SQL Server account has read only permissions? The IT group I work with has a negative view of Access. I use...
3
by: David C. Barber | last post by:
How do you lock a record in SQL Server from ASP 2? I need to read the record, allow the user to edit it, and then have them click Save and rewrite it. Obviously I don't want anyone else getting...
6
by: jsacrey | last post by:
Hello everybody, I've got a bit of a situation that I could use some guidance with if possible. I work for an auditing firm where my users audit electronic shipping data for customers to see if...
7
by: Roger | last post by:
This is the vba code Set db = CurrentDb On error goto fErr …. loop strSql = "UPDATE tblInvAnalysisWhse" & _ " SET ltDeviation = " & Sqr(dblError / intPeriods) & _ " WHERE item = '" &...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.