473,378 Members | 1,375 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.

SqlServer weekend job blocked by a user left open screen


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 ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #1
4 3180
Kill that user's process(es).

"Chaim Fried" <mo****@pwd.gov.il> wrote in message
news:3f***********************@news.frii.net...

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 ***
Don't just participate in USENET...get rewarded for it!

Jul 20 '05 #2
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....partmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
-----------------------

"Chaim Fried" <mo****@pwd.gov.il> wrote in message
news:3f***********************@news.frii.net...

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 ***
Don't just participate in USENET...get rewarded for it!

Jul 20 '05 #3

"Dan Guzman" <da*******@nospam-earthlink.net> wrote in message
news:tw*****************@newsread1.news.atl.earthl ink.net...
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.
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.


Dan Guzman
SQL Server MVP

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

http://www.ntfaq.com/Articles/Index....partmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
-----------------------

"Chaim Fried" <mo****@pwd.gov.il> wrote in message
news:3f***********************@news.frii.net...

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 ***
Don't just participate in USENET...get rewarded for it!


Jul 20 '05 #4


Thanks all for answers

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #5

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

Similar topics

5
by: Steve | last post by:
Hi; I went to the microsoft site to try to find a guide to the error messages that the jdbc drivers give ( for sqlserver 2000 ). I had no luck. Does anyone know if there is such a guide? ...
8
by: Jay Vinton | last post by:
I recently posted my first .aspx effort and am getting calls from users saying the page is being blocked and they can't view it. They got a hyperlink in an e-mail (see below). Most have been...
14
by: Roy Gourgi | last post by:
Hi, I need to store and retrieve information from a database. It looks as though there is a lot more support for SQLServer than there is for Access, correct me if I am wrong. What do I have...
11
by: Patrick | last post by:
I have an ASP.NET application that connects to a SQL Server database. The SQL Server resides on a seperate development server from the IIS5.1 on Windows XP SP2 on development PCs which host the...
1
by: Darsin | last post by:
Hi, I have three tables with there fields given in brackets: User: (PK), Divisions: (PK), DivisionsOfUsers: , the "DivisionsOfUsers" tables has many-to-many relationships between userid...
5
by: Bhaiyyah | last post by:
I am repetitively failing to login with any user name for XHTML Chat. Here is some info I copied from view source: Link: http://www.shiachat.com/forum/chat.html ...
4
by: dd | last post by:
I have a scenario where my popups are being blocked by IE6+ and Firefox. The problem is that although the popup is a direct result of the user clicking on the link (meaning that they WANT the...
1
by: Andy Bates | last post by:
Hi - Can't see another newsgroup to post this in; so thought I'd post here. I have a C# application that relies on multicast UDP to detect how many PCs the application is executing on...
1
by: dzaf | last post by:
Hello, My question is simple and I have not seen an answer so far having surfed the web endlessly. I run a Kids Flash Games Website: http://www.doron-zur.com Some of the games require Full...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.