Groups | Blog | Home
all groups > sql server (alternate) > september 2003 >

sql server (alternate) : SqlServer weekend job blocked by a user left open screen


Chaim Fried
9/14/2003 8:22:09 AM

Hello!
We have a maintenance job on MSSQL server scheduled for the weekend.
some times we arrive at the beginning of a week and see that a user left
his screen open on a SQL record and the job is still waiting blocked by
that user. Please give me an idea how to overcome this.
Thanks in advance


*** Sent via Developersdex http://www.developersdex.com ***
Louis
9/14/2003 10:50:41 AM
Kill that user's process(es).

[quoted text, click to view]

Dan Guzman
9/14/2003 11:44:25 AM
If you are running SQL 2000, you can terminate all connections to the
database with:

ALTER DATABASE MyDatabase
SET SINGLE_USER WITH ROLLBACK IMMEDIATE

and resume normal operation with:

ALTER DATABASE MyDatabase
SET MULTI_USER WITH ROLLBACK IMMEDIATE


--
Hope this helps.

Dan Guzman
SQL Server MVP

-----------------------
SQL FAQ links (courtesy Neil Pike):

http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
-----------------------

[quoted text, click to view]

Greg D. Moore (Strider)
9/15/2003 2:14:06 AM

[quoted text, click to view]

I'm going to jump in and say that while Dan's solution certainly works, I
think his reply and the other one missed what I think is the fundamental
problem: The application.

It appears that the application is creating some sort of lock on the DB that
lives as long as the screen is open.

This is inherently non-scalable.

I'd look much into HOW the application was able to hold a lock on the DB
like that and focus on that for the long-term solution.


[quoted text, click to view]

Chaim Fried
9/16/2003 7:32:06 AM


Thanks all for answers

*** Sent via Developersdex http://www.developersdex.com ***
AddThis Social Bookmark Button