Solved

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

Posted on 2001-08-07
2
278 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
monitoring configuration for SQL server DB 32 46
SCOM to SQL port 14xx failed? 1 30
SQL 2014 missing dll from Bin? 3 31
Split string into 3 separate fields 5 19
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.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

763 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