ORA-16014:ORA-00312

遭遇ORA-16014:ORA-00312:
ERROR [main] (cn.com.jdls.foundation.dao.DAOManager:_$2:1420) - 无法拿到数据库[swzxw]的连接!错误信息[Exception message:数据库[swzxw]连接不上!]
Exception at getConnectionByDatabaseName:数据库[swzxw]连接不上!
java.sql.SQLException: 数据库[swzxw]连接不上!
        at cn.com.jdls.foundation.dao.DAOManager._$6(Unknown Source:253)
        at cn.com.jdls.foundation.dao.DAOManager.getTrueConnectionByDatabaseName(Unknown Source:311)
        at cn.com.jdls.foundation.dao.DAOManager.getConnectionByDatabaseName(Unknown Source:282)
        at cn.com.jdls.foundation.dao.DAOManager._$2(Unknown Source:1413)
        at cn.com.jdls.foundation.dao.DAOManager._$1(Unknown Source:1297)
        at cn.com.jdls.foundation.dao.DAOManager._$1(Unknown Source:2194)
        at cn.com.jdls.foundation.dao.DAOManager.select(Unknown Source:2228)
        at cn.com.jdlssoft.baseserver.service.common.DMManager.getResultByDAO(DMManager.java:292)
        at cn.com.servyou.swzxw.base.basecode.SwzxwBaseCode.saveBaseCode(Unknown Source)
        at cn.com.servyou.swzxw.base.basecode.SwzxwBaseCode.init(Unknown Source)
        at cn.com.servyou.swzxw.base.startup.BaseCodeLoader.load(Unknown Source)
        at cn.com.jdls.foundation.startup.AppMgr.initApp(Unknown Source:185)
        at cn.com.jdls.foundation.startup.AppMgr.initialization(Unknown Source:71)
        at cn.com.jdls.foundation.startup.AppServlet.init(Unknown Source:29)
        at javax.servlet.GenericServlet.init(GenericServlet.java:212)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4420)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4733)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
        at org.apache.catalina.core.StandardService.start(StandardService.java:525)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:592)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
ERROR [main] (cn.com.jdlssoft.baseserver.service.common.DMManager:getResultByDAO:294) - DAO[DM_SSHY_QUERY]不存在,请检查!
ERROR [main] (cn.com.servyou.swzxw.base.basecode.SwzxwBaseCode:saveBaseCode:?) - basecode[DM_SSHY]载入失败,原因是该basecode的结果集为空,可能该basecode的dao-name属性未设置或设置不正确! 

 

  数据库明明启动了,怎么会连不上呢,难道没启动?

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 25 14:48:21 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> show sga

Total System Global Area  612368384 bytes
Fixed Size                  1250428 bytes
Variable Size             188746628 bytes
Database Buffers          415236096 bytes
Redo Buffers                7135232 bytes
SQL> select status from v$instance;

STATUS
------------
MOUNTED

果然在mount状态下,什么也没管,直接open一下看看
SQL> alter database open ;
alter database open
*
ERROR at line 1:
ORA-16014: log 1 sequence# 427 not archived, no available destinations
ORA-00312: online log 1 thread 1: 'E:\ORACLE\ORADATA\SYW\REDO01.LOG'


SQL> alter database clear logfile group 2;
alter database clear logfile group 2
*
ERROR at line 1:
ORA-00350: log 2 of instance syw (thread 1) needs to be archived
ORA-00312: online log 2 thread 1: 'E:\ORACLE\ORADATA\SYW\REDO02.LOG'

 

原来归档空间满了,查看一下默认的2G归档,导致redo无法归档,没办法只好扩一次归档空间了
 
SQL> shutdown immediate
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area  612368384 bytes
Fixed Size                  1250428 bytes
Variable Size             188746628 bytes
Database Buffers          415236096 bytes
Redo Buffers                7135232 bytes
Database mounted.
ORA-16038: log 1 sequence# 427 cannot be archived
ORA-19809: limit exceeded for recovery files
ORA-00312: online log 1 thread 1: 'E:\ORACLE\ORADATA\SYW\REDO01.LOG'

目前的问题依旧很明显了
SQL> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
         1          1        427   52428800          1 NO  INACTIVE
     19396107 25-JUL-11

         3          1        429   52428800          1 NO  CURRENT
     19449187 25-JUL-11

         2          1        428   52428800          1 NO  INACTIVE
     19422571 25-JUL-11

 
SQL> ALTER SYSTEM SET db_recovery_file_dest_size=8g scope=both;

System altered.

SQL> alter database open;

Database altered.

SQL> show sga

Total System Global Area  612368384 bytes
Fixed Size                  1250428 bytes
Variable Size             192940932 bytes
Database Buffers          411041792 bytes
Redo Buffers                7135232 bytes
SQL> select status from v$instance;

STATUS
------------
OPEN

终于open了,做了一个全备以防万一! 

你可能感兴趣的:(thread,oracle,exception,数据库,database,System)