To kill a connection (and the thread running it)

As a last resort to deal with potential hanging in the DB (Sybase), I'd like to
find a way to stop the processing. I'm willing to violate some rule, such as calling
Thread.stop. But that doesn't seem to drop the connection. Any suggestion how
I can drop that connection? Thanks. /Bill

Joe, as you know I also posted at Sybase/jdbc. I'm reposting the last post here
for the benefits of anyone else might be interested in the thread.
I tried out cancel and it essentially did the same thing as set timeout, except
the time is more precise since the application controls it. Set timeout is more
economical to operate though. I'll probably take one of these, which do solve
half of the problem, for the time being until something better comes along. Unfortunately,
though, the other half causes more problems because when that happens, other executions
will pile on and get blocked as well.
Joseph Weinstein <[email protected]> wrote:
>
>
Bill wrote:
As a last resort to deal with potential hanging in the DB (Sybase),I'd like to
find a way to stop the processing. I'm willing to violate some rule,such as calling
Thread.stop. But that doesn't seem to drop the connection. Any suggestionhow
I can drop that connection? Thanks. /BillKilling the thread is bad for the server, because it only creates a fixed
number of
execute-threads to do user work... The things you should try are:
1 - Call cancel() on the jdbc statement that is hanging. Call connection.close()
on the connection. This requires having access to those objects from
another
thread.
2 - Find out the spid of the hung DBMS session (either record it ahead
of time or
query the DBMS with another connection) and use T-SQL to kill that DBMS
session.
3 - Try resetting the pool.
Joe

Similar Messages

  • Getting all the threads running in one JVM from another JVM ...

    I want to get all the threads running in one JVM from another JVM.
    Is it possible ?
    namanc

    I am going to write a java application that prints all the java application running at the background. And this application has a control over all the threads. means killing the threads, restart the thread etc
    namanc

  • Macbook pro 15" mid 2010 i spilled water on keyboard now it wont power on if the battery is connected and the keys on keyboard doesnt work it works fine with no battery and external keyboard if i order a battery and new keyboard will every else work again

    macbook pro 15" mid 2010 i spilled water on keyboard now it wont power on if the battery is connected and the keys on keyboard doesnt work it works fine with no battery and external keyboard if i order a battery and new keyboard will every else work again lik it did before

    If you have records that show that you've taken your MacBook Pro in for a year to fix the machine, I would escalate the problem to Apple Customer Relations - unfortunately I don't have a number for Spain.
    It would only seem logical to me that if you've been trying to have the machine repaired during the time that the 'recall' was in effect that you should be eligible for a new logic board. But only customer relations will be able to make that call.
    Good luck - take the issue as high up the food chain as you can and see what happens.
    Clinton

  • I have HDMI connection to the receiver and on to the TV - but no audio from my new Apple TV.  I have checked all connections and the video is xlnt.  Have also toggled thru every possible Dolby/Audio combination in settings.  Help!  Any suggestions?

    I have an HDMI connection to the receiver and on to the TV - but there is non audio from my Apple TV.  Not for movies, music, YouTube etc.   I have checked all of the connections and the video is xlnt.  Have also toggled thru all possible Dolby/Audio combinations in settings.  Help!  Any suggestions?

    Hello again Parker -
    The basic setup is Digital Cable Box, DVD Player, Denon Receiver/Amp and TV Monitor.  To that I added the Apple TV.  The Receiver only has two HDMI IN slots (one for cable and one for the DVD) and one out to the Monitor. 
    [I bought a switcher to toggle the DVD and the AppleTV back and forth but just disconnected the DVD to simplify when I ran in to trouble.]
    So now I have:
         HDMI from the Cable Box to the Receiver
         HDMI from the Apple TV to the Receiver (in the old DVD slot which always worked well)
         HDMI from the Receiver to the Monitor
         RCA's from the Receiver to the Subwoofer and the other speakers
    In addition I have some backup connections:
         S-Video, Optical Audio and L/R RCA's from the Cable Box to the Receiver
         S-Video from the Receiver to the Monitor
    Wait - JUST FOUND IT! 
    By going thru the excercise to track all of the connections per your suggestion, I found an anomaly when I switched Receiver sockets for the HDMI links.  The video moved but the audio didn't.  Turns out the monitor was using the optical audio feed from the receiver.  So I disconnected the optical audio and the monitor automatically switched to the HDMI audio feed!   Looked promising...
    So I first connected an optical audio feed from the ATV to the receiver - Audio!  Then I pulled it, but the audio didn't switch to the HDMI feed.  It stopped.  Would be OK if all I was going to use is the ATV, but I need the DVD player too and I can't use a switcher to toggle between them if I have to unplug the optical audio each time.
    This is becoming a career!  Any suggestions?
    Will

  • How do i fix my wifi if it connects and the bars are blue but no check sign appears next to the wifi name and does not connect to the internet???

    How do i fix my wifi if it connects and the bars are blue but no check sign appears next to the wifi name and does not connect to the internet???

    Did you already try to reset the iPod by holding the sleep and home button for about 10sec, until the Apple logo comes back again? You will not lose data.
    If this does not work, try to reset the network settings in Settings/General/Reset. After that you'll have to put in the passwords for all known networks again.
    More troubleshooting can be found here:
    iOS: Troubleshooting Wi-Fi networks and connections

  • I have a new Epson wireless printer connected and the iPad recognizes it but it won't print. What is AirPrint and how do I connect it?

    I have a new Epson wireless printer connected and the iPad recognizes it but it still won't print.  What is AirPrint &amp; how do I connect to it?

    Patti-
    Is your Epson printer on Apple's list of AirPrint capable printers?  See <http://support.apple.com/kb/ht4356>.
    If it is an AirPrint printer, then your WiFi router may not correctly handle Bonjour data required by AirPrint.  Contact the router's manufacturer to see if there is a change to its setup or a firmware update, that will make it work.
    One other possibility is that there could be a print job stuck in the iPad's print queue.  Double click the iPad's Home button and a row of recent Apps will appear along the bottom of the screen.  Scroll across and see if the Print Center is there.
    Fred

  • The Mac Book Pro is not charging. The led is green with the connection and the computer is not charging. Thank you for the help

    The Mac Book pro is not charging. The led is green with the connection and the computer is not charging. Thank you for the help

        Reset SMC.     http://support.apple.com/kb/HT3964
        Choose the method for:
        "Resetting SMC on portables with a battery you should not remove on your own".
    If this does not help, contact Apple.
    Best.

  • Ever since I installed MAVERICK, nothing now works, Flash Player won't run, printer works but scanner will not and the computer runs so slow.  Any help anywhere?

    Ever since I installed MAVERICK, nothing now works, Flash Player won't run, printer works but scanner will not and the computer runs so slow.  Any help anywhere?

    wqn02h, first thing I would do is use Disk utility to repair permissions. Once this is done. Make sure you have the latest versions of the software you use. Also, check the manufacter of your printer/scanner for updated software. If they don't have updated software there are 3rd party alternatives that will work.
    Paul

  • When i go to install creavtive cloud it says check the connection, try again but however my connection is fine and i've tried my friends connection and the same thing keeps happening  HELP!!!

    when i go to install creavtive cloud it says check the connection, try again but however my connection is fine and i've tried my friends connection and the same thing keeps happening  HELP!!!

    Sign in, activation, or connection errors | CS5.5 and later
    Mylenium

  • What's the go with this latest update. Half my apps don't work and the iPad runs slower? How do I go back to the old operating system?

    What's the go with this latest update. Half my apps don't work and the iPad runs slower? How do I go back to the old operating system?

    Make sure your apps are updated.  You might try Settings > iTunes & App Store > Automatic Downloads - Updates = "On".
    You cannot go back to an old operating system.

  • HT204368 I have a motorola H17 bluetoothit is paired to iphone 4s. the icon is shows that it is connected.  when making a call i tap the speaker icon and the bluetooth icon is not there.  The motorola H17 tells me i am connected and the battery life when

    I have a motorola H17 bluetooth it is paired to iphone 4s. The icon shows that it is connected.  When making a call i tap the speaker icon and the bluetooth icon is not there.  The motorola H17 tells me i am connected and the battery life when turned on. Any advice?  Thank you in advance

    here is an interesting thing: take the iphone and set lock screen to never. Now make an email with siri--be sure to activate her with call button. get to the body and get some text in there. then just stop talking. LOCK SCREEN APPEARS!!!!!! and of course you draft is gone.
    There does seem to be a work around for some--maybe all these issues. Don't use the call button--use the buttons on the phone.
    Siri seems to behave properly with scenerio above---sans call button. She does not go to lock.

  • I have an iPad 2 connected to airport express so that I can play and change music whilst I am teaching ballet class. Recently, I keep losing connection and the airport express gets quite hot. I have alway used Archos but changed to Apple for reliability!

    I have an ipad 2 with airport express that I use to play and change music whilst teaching ballet class. Recently, I keep losing connection and the airport express appears to be getting quite hot. I did use Archos but changed to Apple for reliabilty! Can anyone help or should I just buy a new airport express.

    I agree that it's probably interference. Only other possibility, since you mentioned it, it overheating. Is the express situated so that it is well ventilated? That is to say, not buried under other equipment and laying on its side? What does the status light do when you lose connection?
    CB

  • After installing Lion , my computer crashes and the fan runs constantly on high

    After installing Lion , my computer crashes and the fan runs constantly on high. How is Apple resolving this problem?

    Try to reset your SMC, it fixed the same problem for me ;o)
    http://support.apple.com/kb/ht3964

  • Hi, My Lightroom CC is showing waiting for connection and the mobile sync is not working. I have tried deleteing lrsync data, disabling firewall, checked host file etc. Still no luck.

    Hi, My Lightroom CC is showing waiting for connection and the mobile sync is not working. I have tried deleteing lrsync data, disabling firewall, checked host file etc. Still no luck.

    I had the same problem. It fixed itself when I opened Internet Explorer (I don't normally use it). I was opening Support Portal to get some support help, but I'm not sure if it was the page or simply opening IE that did the trick.

  • Regarding the thread running more than 24 hours

    The below is the query executed from oracle side and is running more than 24 hours and not yet over. And multiple threads are running.
    SELECT COUNT(*)
    FROM snurk_cmms_csht009_rfs,
    snurk_cmms_csht008_rfs,
    snurk_cmms_csht001_rfs
    WHERE snurk_cmms_csht001_rfs.cd_plant = snurk_cmms_csht008_rfs.cd_plant (+)
    AND snurk_cmms_csht001_rfs.no_rfs = snurk_cmms_csht008_rfs.no_rfs (+)
    AND snurk_cmms_csht008_rfs.cd_plant = snurk_cmms_csht009_rfs.cd_plant (+)
    AND snurk_cmms_csht008_rfs.no_rfs = snurk_cmms_csht009_rfs.no_rfs (+)
    AND snurk_cmms_csht008_rfs.ct_misc_item = snurk_cmms_csht009_rfs.ct_misc_item (+)
    AND (snurk_cmms_csht009_rfs.ct_misc_item_page = 1
    OR snurk_cmms_csht009_rfs.ct_misc_item_page IS NULL);
    snurk_cmms_csht009_rfs,snurk_cmms_csht008_rfs,snurk_cmms_csht001_rfs are synonyms for views that are pointing to DB2 tables with the help of dblink.
    The dba saying that the where clause in the above select is not sent to the db2 side so creating a cartesian product and asking us to add something in the where clause.
    Thread detail
    ENCLAVE DETAIL INFORMATION
    PLAN
    Thread: Plan=DISTSERV Connid=SERVER Corrid=G422001E Authid=CPPRXPS
    Dist : Type=DATABASE ACCESS, Luwid=H36A45B9.A712.C8ADB744CDC6=132705
    Location : 19.106.69.185
    enc
    ENCLAVE TOKEN: F0001B77B8 Enclave Type: Original Indep
    Owning System: SYB1 Owning Job: DB27DIST
    WLM Mode: Goal Enclave CPU Time 01:26:00.935
    THREAD DETAIL
    PLAN
    Thread: Plan=DISTSERV Connid=SERVER Corrid=G422001E Authid=CPPRXPS
    Dist : Type=DATABASE ACCESS, Luwid=H36A45B9.A712.C8ADB744CDC6=132705
    Location : 19.106.69.185
    act
    Thread Activity User Defined Functions
    DB2 Status = WAIT-REMREQ TCB Time (SQL) = 00:00:00.000
    MVS Status = Wait for TCB Time = 00:00:00.000
    Total Elapsed Time = 01-17:00 Elapsed Time = 00:00:00.000
    CP CPU Utilization = 00.7% Elapsed Time (SQL) = 00:00:00.000
    Total CP CPU Time = N/A SQL Events = 0
    IIP CPU Time = 00:00:00.000
    Total Parallel Tasks = 0
    Current Parallel Tasks= 0
    SQL CALL BEING EXECUTED
    PLAN
    Thread: Plan=DISTSERV Connid=SERVER Corrid=G422001E Authid=CPPRXPS
    Dist : Type=DATABASE ACCESS, Luwid=H36A45B9.A712.C8ADB744CDC6=132705
    Location : 19.106.69.185
    call
    SQL call is active, call information is as follows :
    Thread Status = WAIT-REMREQ SQL Request Type = DYNAMIC
    Total SQL Reqs = 3589969 SQL Call Type = FETCH
    SQL DBRM Name = GDRDA11 SQL Statement Number = 00000
    Collection ID = SDCSDRDA
    SELECT A1."CD_PLANT", A1."NO_RFS", A2."CD_PLANT", A2."NO_RFS", A2."CD_PL
    ANT", A2."NO_RFS", A2."CT_MISC_ITEM" FROM "MMDBDP7"."CSHT001_RFS" A1, "M
    MDBDP7"."CSHT008_RFS_MISC" A2
    Please suggest on what to be added in the where clause.
    thanks,
    Vinodh

    We cannot create a view in db2 side because of security reasons. I tried to run the query as below.
    SELECT count(a),count(b),count(c) FROM
    (Select cd_plant,no_rfs,ct_misc_item, ct_misc_item_page from snurk_cmms_csht009_rfs) a,
    (Select cd_plant,no_rfs,ct_misc_item from snurk_cmms_csht008_rfs) b,
    (Select cd_plant,no_rfs from snurk_cmms_csht001_rfs ) c
    Where c.cd_plant = b.cd_plant (+)
    AND c.no_rfs = b.no_rfs (+)
    AND b.cd_plant = a.cd_plant (+)
    AND b.no_rfs = a.no_rfs (+)
    AND b.ct_misc_item = a.ct_misc_item (+)
    AND (a.ct_misc_item_page = 1
    OR a.ct_misc_item_page IS NULL)
    I am getting the error as below:
    ERROR at line 4:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from FAST_SNURK_CMMS
    How to troubleshoot this.
    thanks,
    Vinodh

Maybe you are looking for

  • When i click on the itunes icon, it wont open up, i get a authorization message from apple

    i have windows for my laptop, i cant get itunes to open up. please help

  • What Touch Screen with Mac Mini?

    I need to set up a Mini with a Touch Screen to create a kiosk environment. It will have a card reader attached as well -- for student check-ins. Aspect ratio doesn't matter nor does resolution. Size can be anything from 17" to 20". Mini has DVI port,

  • How do I add jpg file extension?

    I recently exported some photos from iPhoto. Some of the photo thumbnail's have normal thumbnails and some only show up as white squares. I searched for these files and they look the same way in the iPhoto Original folder. The files that don't have a

  • Extracting image variants for web index from MDM via Java API

    Hi There, we are currently using an open source search engine to crawl the MDM database and build indexes for our webstores nightly. In this process, we have an image extraction method using the MDM java API's. Can someone please tell me how to call

  • Rman backup for oracle11g database

    Hi, I want to take the rman backup of 11.2.0.1.0 database, but my catalog database is 10.2.0.1. So Is it possible to take it. Please suggest me. My target database : 11.2.0.1.0 OS: windows 2003 R2 server My catalog database: 10.2.0.1 OS: windows 2003