如题,  我新建了一个DB连接,当这个连接没有使用时,就分配给任务(linux下子进程)使用,使用后回收。              若连接被使用,则重新建一个连接给任务使用。当分配时,没问题,当重新连接时就有问题了。另外,我如何查看本机连接了几个DB连接呢?

解决方案 »

  1.   

    在网上查了一下,说是网络问题。  但我遇到的情况是:第一次执行时(程序不退出,while循环)没问题,第二、三次执行时就会出这种问题。应该不是网络的原因吧。
      

  2.   

    ORA-03113 end-of-file on communication channelCause: An unexpected end-of-file was processed on the communication channel. The problem could not be handled by the Net8 two-task software. This message could occur if the shadow two-task process associated with a Net8 connect has terminated abnormally, or if there is a physical failure of the interprocess communication vehicle, that is, the network or server machine went down.In addition, this message could occur when any of the following statements/commands have been issued:ALTER SYSTEM KILL SESSION ... IMMEDIATE
    ALTER SYSTEM DISCONNECT SESSION ... IMMEDIATE
    SHUTDOWN ABORT/IMMEDIATE/TRANSACTIONAL
    Action: If this message occurs during a connection attempt, check the setup files for the appropriate Net8 driver and confirm Net8 software is correctly installed on the server. If the message occurs after a connection is well established, and the error is not due to a physical failure, check if a trace file was generated on the server at failure time. Existence of a trace file may suggest an Oracle internal error that requires the assistance of Oracle Support Services.
      

  3.   

    to dawugui:    情况是这样的:程序启动时,新建了多个DB连接(一直保持,不释放),当出现ORA-03113: end-of-file on communication channel错误时,所有的DB连接全部被DB断开了。   为何会出现这种情况?还请多指教。
      

  4.   

    查看 你的最大session数量   
      

  5.   

    如何查看最大session数量?select count(*) from v$session ?  你的意思是超过了最大session数量,所以DB端给强行断开了?
      

  6.   

    父进程:
    pconn = new Oracleconnection();子进程:
    {pco1 = pconn; 释放pco1;}而父进程没有释放pconn,这样在释放pco1时,会不会也把pconn的连接释放了?