如何解决“ORA-01089: 正在执行立即关闭 - 不允许进行任何操作”?
关于这个问题,我在Google和百度里找过一些文章,但是都是处理如何重新启动数据库的问题,比如:
startup force
然而我的问题是在tomcat重启后不久,在java程序通过JDBC驱动调用oracle时才出现的,没有进程或程序去关闭oracle,但是却出现了下面的错误,以下是程序日志中的片断:
2009-09-03 13:54:46,437 [NotificationMgrThread] ERROR jdbc.ConnectionWrapper _applySessionParams.2980 - SQLException message: ORA-01089: 正在执行立即关闭 - 不允许进行任何操作java.sql.SQLException: ORA-01089: 正在执行立即关闭 - 不允许进行任何操作        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
        at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:742)
        at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:211)
        at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:950)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1252)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3290)
        at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3334)
        at oracle.sysman.util.jdbc.ConnectionWrapper._applySessionParams(ConnectionWrapper.java:2971)
        at oracle.sysman.util.jdbc.ConnectionWrapper.<init>(ConnectionWrapper.java:181)
        at oracle.sysman.emSDK.svc.conn.FGAConnection.<init>(FGAConnection.java:115)
        at oracle.sysman.emSDK.svc.conn.FGAConnectionCache.getFGAConnection(FGAConnectionCache.java:192)
        at oracle.sysman.emSDK.svc.conn.ConnectionService.getSystemConnection(ConnectionService.java:683)
        at oracle.sysman.emdrep.notification.NotificationMgr.getConnection(NotificationMgr.java:252)
        at oracle.sysman.emdrep.notification.NotificationMgr.resetConnection(NotificationMgr.java:298)
        at oracle.sysman.emdrep.notification.NotificationMgr.run(NotificationMgr.java:1190)
出现以上的错误是什么原因呢?怎么来解决这个问题?大家请帮帮忙,谢谢先!

解决方案 »

  1.   

    你是不是在程序中用了多个Connction,而他们其实都是同一个,从而导致一个地方已经关闭而另一个地方还在使用,使用时应该就会产生这个问题~~
      

  2.   

    呵呵,你的问题和另一个人的问题的帖子的内容具然一模一样,
    http://topic.csdn.net/u/20090904/10/47b748a2-4bc1-4493-898b-a8a8ff448730.html
    除了标题不一样,太奇怪了~~
      

  3.   

    我用的hibernate做的,没有你说的这个问题存在吧?
      

  4.   

    不一定什么时候会出现,但是如果重启下tomcat,一切就又正常了
      

  5.   

    <session-factory>
    <property name="connection.username">tyzhuser</property>
    <property name="connection.url">
    jdbc:oracle:thin:@192.168.1.68:1521:cityLocate
    </property>
    <property name="dialect">
    org.hibernate.dialect.Oracle9Dialect
    </property>
    <property name="myeclipse.connection.profile">
    oraclecon68
    </property>
    <property name="connection.password">123</property>
    <property name="connection.driver_class">
    oracle.jdbc.driver.OracleDriver
    </property> <property name="hibernate.show_sql">true</property> <mapping resource="****" />   //该处省略

    </session-factory>
      

  6.   

    目前正在查是不是oracle的问题
      

  7.   

    因为出现问题的时候,直接登录oracle的过程反应很慢
      

  8.   

    问题找到了,从系统日志中发现时每天下午2点,系统就会出此错误。原来是oracle数据库下午两点会进行增量备份。
    问题解决,谢谢大家参与!结贴!!!