dcsimg
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: Closing Unused Connections in Oracle

  1. #1
    Join Date
    Jul 2005
    Posts
    3

    Closing Unused Connections in Oracle

    Hi. I''ve searched the forums the best I could but couldn't find an answer, probably because it is an extremely newbe question:

    I used:

    select to_char(logon_time, 'YYYY-MM-DD HH24:MI')
    from v$session
    where machine = 'jdbcclient'

    and there are many opened but unused connections on my Oracle server. Some of them are 3 months old. How can I close them? I really don't have a clue.

    Thanks a lot for your help!

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Why do you think they need to be closed? Maybe they are middle tier processes?
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  3. #3
    Join Date
    Jul 2000
    Posts
    521
    You can kill those sessions as a one time solution.

    Before doing that, check how long have they been idle or when was the last time they did some activity. Check there wait event as well. I guess it will be something like "SQL*Net more data from client". If these sessions are idle for months, you should be able to kill them without causing any problems.

    Better thing is find out what is causing this to happen. Are there apps that are just opening connections and not closing them ?

    Are you using Dedicated Server mode or Multithreaded ?
    svk

  4. #4
    Join Date
    Jul 2005
    Posts
    3
    Yeah. Those connections are very old and they for sure come from programs that have opened connections without closing them. And more than that: all applications running are the server are all Java Servlets and close all their connections as soon as the requests are done.

    To be true, I don't know if I'm running dedicated or multithreaded. I'm not the DBA and he is on vacation. But he asked me to close those connections without telling me how.

    So, how do I kill them?

  5. #5
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  6. #6
    Join Date
    Jul 2005
    Posts
    3
    Thanks a lot! That's exactly what I needed!

  7. #7
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    are you sure they are not connection in application serverīs connection pool?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width