Solved

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

Posted on 2001-08-07
2
279 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
[X]
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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

738 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