Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Linked Servers to Oracle-ODBC HANGS How do I kill store procedure?

Posted on 2001-08-07
2
277 Views
Last Modified: 2011-10-03
I have a Linked Server to the Oracle Database and occasionally my SQL7 - Store Procedure HANGS.
It Hangs in the Oracle OLEDB  (also hangs in the ODBC) --- Since this is an automated process...is there a function or codes that I can incorporate in my store procedure to capture this hanging problem/process --- because I need to automatically terminate the store procedure and re-query.

0
Comment
Question by:emailkimchan
2 Comments
 
LVL 18

Accepted Solution

by:
nigelrivett earned 50 total points
ID: 6362866
You can put in a scheduled task which looks at master..sysprocesses for this hanging process - or probably better to have a table

Process
   spid
   starttime
   endtime
   logontime

The oracle process puts it's spid, logontime and starttime and logontime in this table at start and either deletes the entry or updates the endtime on completion (the logontime is so that you can tell if the spid is still the same one and it hasn't crashed before competion).

The scheduled task can then kill the process.
It depends on how this is hanging as to whether a kill will work but is probably the best you can do - could also send an email to tell someone to look at it.
0
 

Author Comment

by:emailkimchan
ID: 6366556
THANK YOU..THANK YOU..
and thank you for the "GREAT" suggestions!!!!!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how the fundamental information of how to create a table.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question