情况是这样的:
系统:windows server 2008 64位
Oracle版本:Oracle 11g 64位
服务器: IBM 3850 X5 
之前装上11G 运行一切正常,正常了3个月,今天发现Tomcat上的应用程序写入数据很慢,后查找问题,发现从启动tomcat连接数据库时都要3分钟左右,在数据库服务器本机上使用sqlplus登陆仍然需要1分钟才能连接上,使用PL/SQL 查询表 点查询 也需要1分钟的样子(只有不到10条数据的表),重启服务器无效果,但使用Tomcat平台的应用程序做查询 等,却无严重的延迟情况,在线跪求高手解决。PS:此库数据量最大的表 数据量大概在5000万条,和此问题是否有关。

解决方案 »

  1.   

    做awr报告,然后分析哪里出了问题
    看是不是sga分配太多了,系统使用的内存太少
      

  2.   

    1、应该是oracle安装配置有问题,通过监控操作系统的内存和
    cpu使用情况方能找到答案!
      

  3.   

    能不能说的具体点 
    这个问题搞的我好烦啊。
    AWR报告是什么 
      

  4.   

    1、查看本机的资源情况。主要看CPU和内存。方法嘛,任务管理器里、
    2、查看oracle的资源 
    sqlplus /nolog
    conn / as sysdba
    show sga 
      

  5.   

    还能不能在具体一些啊 比如说看到SGA什么情况代表什么 机器是16G内存  8颗CPU 应该不至于 性能不够吧
      

  6.   

    show sga后 情况如下Total System Global Area 1.3696E+10  bytes
    Fixed Size                2140400    bytes
    Variable Size             7985067792 bytes
    Database Buffers          5704253440 bytes
    Redo Buffers              4427776    bytes我用CREATE PFILE='ahfu.ora' FROM SPFILE; 创建了这个文件 内容如下dzjc.__db_cache_size=5704253440
    dzjc.__java_pool_size=268435456
    dzjc.__large_pool_size=67108864
    dzjc.__oracle_base='F:\app\Administrator'#ORACLE_BASE set from environment
    dzjc.__pga_aggregate_target=4764729344
    dzjc.__sga_target=8992587776
    dzjc.__shared_io_pool_size=0
    dzjc.__shared_pool_size=2818572288
    dzjc.__streams_pool_size=0
    *.audit_file_dest='F:\app\Administrator\admin\DZJC\adump'
    *.audit_trail='db'
    *.compatible='11.1.0.0.0'
    *.control_files='F:\app\Administrator\oradata\DZJC\control01.ctl','F:\app\Administrator\oradata\DZJC\control02.ctl','F:\app\Administrator\oradata\DZJC\control03.ctl'
    *.db_block_size=8192
    *.db_domain=''
    *.db_name='DZJC'
    *.db_recovery_file_dest='F:\app\Administrator\flash_recovery_area'
    *.db_recovery_file_dest_size=2147483648
    *.diagnostic_dest='F:\app\Administrator'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=DZJCXDB)'
    *.memory_target=13736345600
    *.open_cursors=300
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.undo_tablespace='UNDOTBS1'
      

  7.   

    把tomcat服务停掉。重启服务器,单独连接数据库,确定是数据库层问题还是应用层错误。查看对应时间OS的状态,看OS层有无明显的错误。。数据库层错误要具体问题具体分析。1、贴出alert日志。
    2、select * from v$session_Wait;贴出对应内容
      

  8.   

    今天试了下 把所有连接数据库的服务器全部停掉了,重启数据库服务器后,单独运行数据库 连接速度变快了,用SQL Development 查询数据 也很快,但是连接应用程序后 登陆 写入 查询等就变的很慢了,不过之前的3个月没有这种情况,应用程序也没有改过
      

  9.   

    另问一下 alert 日志是什么,怎么查看
      

  10.   

    <oracle_home>\admin\orasid\bdump\实在不行,查找alert*.log
      

  11.   

    贴下alert_dzjc.log日志 之前好像一直比较正常 一直到9月20号就开始一直显示连接 关闭 包阅读程序失败什么的Tue Jul 05 23:58:51 2011
    Adjusting the default value of parameter parallel_max_servers
    from 160 to 135 due to the value of parameter processes (150)
    Starting ORACLE instance (normal)
    LICENSE_MAX_SESSION = 0
    LICENSE_SESSIONS_WARNING = 0
    Picked latch-free SCN scheme 3
    Using LOG_ARCHIVE_DEST_10 parameter default value as USE_DB_RECOVERY_FILE_DEST
    Autotune of undo retention is turned on. 
    IMODE=BR
    ILAT =18
    LICENSE_MAX_USERS = 0
    SYS auditing is disabled
    Starting up ORACLE RDBMS Version: 11.1.0.7.0.
    Using parameter settings in client-side pfile F:\APP\ADMINISTRATOR\ADMIN\DZJC\PFILE\INIT.ORA on machine WIN-ZGRIU3LXHTY
    System parameters with non-default values:
      processes                = 150
      memory_target            = 13120M
      control_files            = "F:\APP\ADMINISTRATOR\ORADATA\DZJC\CONTROL01.CTL"
      control_files            = "F:\APP\ADMINISTRATOR\ORADATA\DZJC\CONTROL02.CTL"
      control_files            = "F:\APP\ADMINISTRATOR\ORADATA\DZJC\CONTROL03.CTL"
      db_block_size            = 8192
      compatible               = "11.1.0.0.0"
      db_recovery_file_dest    = "F:\app\Administrator\flash_recovery_area"
      db_recovery_file_dest_size= 2G
      undo_tablespace          = "UNDOTBS1"
      remote_login_passwordfile= "EXCLUSIVE"
      db_domain                = ""
      dispatchers              = "(PROTOCOL=TCP) (SERVICE=DZJCXDB)"
      audit_file_dest          = "F:\APP\ADMINISTRATOR\ADMIN\DZJC\ADUMP"
      audit_trail              = "DB"
      db_name                  = "DZJC"
      open_cursors             = 300
      diagnostic_dest          = "F:\APP\ADMINISTRATOR"
    Tue Jul 05 23:58:56 2011
    PMON started with pid=3, OS id=3204 
    Tue Jul 05 23:58:56 2011
    VKTM started with pid=5, OS id=4780 at elevated priority
    VKTM running at (20)ms precision
    Tue Jul 05 23:58:56 2011
    DIAG started with pid=7, OS id=3528 
    Tue Jul 05 23:58:56 2011
    DBRM started with pid=9, OS id=3972 
    Tue Jul 05 23:58:56 2011
    PSP0 started with pid=11, OS id=2116 
    Tue Jul 05 23:58:56 2011
    DIA0 started with pid=13, OS id=2804 
    Tue Jul 05 23:58:56 2011
    MMAN started with pid=15, OS id=3792 
    Tue Jul 05 23:58:56 2011
    DBW0 started with pid=2, OS id=1636 
    Tue Jul 05 23:58:56 2011
    DBW1 started with pid=17, OS id=3636 
    Tue Jul 05 23:58:56 2011
    LGWR started with pid=19, OS id=4576 
    Tue Jul 05 23:58:56 2011
    CKPT started with pid=21, OS id=2424 
    Tue Jul 05 23:58:56 2011
    SMON started with pid=23, OS id=3744 
    Tue Jul 05 23:58:56 2011
    RECO started with pid=25, OS id=2172 
    Tue Jul 05 23:58:56 2011
    MMON started with pid=27, OS id=4040 
    starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
    Tue Jul 05 23:58:56 2011
    MMNL started with pid=29, OS id=5020 
    starting up 1 shared server(s) ...
    ORACLE_BASE from environment = F:\app\Administrator***********************************************************************Fatal NI connect error 12537, connecting to:
     (LOCAL=NO)  VERSION INFORMATION:
    TNS for 64-bit Windows: Version 11.1.0.7.0 - Production
    Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production
    Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production
      Time: 20-9月 -2011 09:33:13
      Tracing not turned on.
      Tns error struct:
        ns main err code: 12537
        
    TNS-12537: TNS: 连接关闭
        ns secondary err code: 12560
        nt main err code: 0
        nt secondary err code: 0
        nt OS err code: 0
    ORA-609 : opiodr aborting process unknown ospid (2168_8072)
    Tue Sep 20 09:33:23 2011
    ***********************************************************************Fatal NI connect error 12537, connecting to:
     (LOCAL=NO)  VERSION INFORMATION:
    TNS for 64-bit Windows: Version 11.1.0.7.0 - Production
    Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production
    Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production
      Time: 20-9月 -2011 09:33:23
      Tracing not turned on.
      Tns error struct:
        ns main err code: 12537
        
    TNS-12537: TNS: 连接关闭
        ns secondary err code: 12560
        nt main err code: 0
        nt secondary err code: 0
        nt OS err code: 0
    ORA-609 : opiodr aborting process unknown ospid (2168_6696)
    Tue Sep 20 09:34:13 2011
    ***********************************************************************Fatal NI connect error 12570, connecting to:
     (LOCAL=NO)  VERSION INFORMATION:
    TNS for 64-bit Windows: Version 11.1.0.7.0 - Production
    Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production
    Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production
      Time: 20-9月 -2011 09:34:13
      Tracing not turned on.
      Tns error struct:
        ns main err code: 12570
        
    TNS-12570: TNS: 包阅读程序失败
        ns secondary err code: 12560
        nt main err code: 0
        nt secondary err code: 0
        nt OS err code: 0
    ORA-609 : opiodr aborting process unknown ospid (2168_8112)
    Tue Sep 20 09:34:44 2011
    ***********************************************************************Fatal NI connect error 12570, connecting to:
     (LOCAL=NO)  VERSION INFORMATION:
    TNS for 64-bit Windows: Version 11.1.0.7.0 - Production
    Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production
    Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production
      Time: 20-9月 -2011 09:34:44
      Tracing not turned on.
      Tns error struct:
        ns main err code: 12570
        
    TNS-12570: TNS: 包阅读程序失败
        ns secondary err code: 12560
        nt main err code: 0
        nt secondary err code: 0
        nt OS err code: 0
    ORA-609 : opiodr aborting process unknown ospid (2168_7956)
    Tue Sep 20 09:35:24 2011
    ***********************************************************************Fatal NI connect error 12570, connecting to:
     (LOCAL=NO)  VERSION INFORMATION:
    TNS for 64-bit Windows: Version 11.1.0.7.0 - Production
    Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production
    Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production
      Time: 20-9月 -2011 09:35:24
      Tracing not turned on.
      Tns error struct:
        ns main err code: 12570
        
    TNS-12570: TNS: 包阅读程序失败
        ns secondary err code: 12560
        nt main err code: 0
        nt secondary err code: 0
        nt OS err code: 0
    ORA-609 : opiodr aborting process unknown ospid (2168_7816)
    Tue Sep 20 09:35:45 2011
    ***********************************************************************Fatal NI connect error 12570, connecting to:
     (LOCAL=NO)  VERSION INFORMATION:
    TNS for 64-bit Windows: Version 11.1.0.7.0 - Production
    Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production
    Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production
      Time: 20-9月 -2011 09:35:45
      Tracing not turned on.
      Tns error struct:
        ns main err code: 12570
        
    TNS-12570: TNS: 包阅读程序失败
        ns secondary err code: 12560
        nt main err code: 0
        nt secondary err code: 0
        nt OS err code: 0
    ORA-609 : opiodr aborting process unknown ospid (2168_7796)
    Tue Sep 20 09:36:15 2011
    ***********************************************************************Fatal NI connect error 12570, connecting to:
     (LOCAL=NO)  VERSION INFORMATION:
    TNS for 64-bit Windows: Version 11.1.0.7.0 - Production
    Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production
    Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production
      Time: 20-9月 -2011 09:36:15
      Tracing not turned on.
      Tns error struct:
        ns main err code: 12570
        
    TNS-12570: TNS: 包阅读程序失败
        ns secondary err code: 12560
        nt main err code: 0
        nt secondary err code: 0
        nt OS err code: 0
    ORA-609 : opiodr aborting process unknown ospid (2168_7836)
    Tue Sep 20 09:37:06 2011
    ***********************************************************************
      

  12.   

    连接应用程序后,检查cpu和内容使用情况,
    应该是你应用程序出现的问题。
      

  13.   

    应用程序应该没问题啊,之前运行了3个月都好好的,我想问问是不是 ORACLE的最大连接数的问题呢 
      

  14.   

    这个参数设置改大点最好设置成1000
    *.processes=150
    还有你的SGA设置得可能过大具体设多少需要通过sga报告来看
      

  15.   

    这个参数设置改大点最好设置成1000
    *.processes=150
    还有你的SGA设置得可能过大具体设多少需要通过sga报告来看
    下面是你日志里报错的建议,关闭你服务器上的防火墙,杀毒软件,看是不是这个问题引起了监听的不稳定
    TNS-12570 TNS:packet reader failureCause: An error occurred during a data receive. This message is not normally visible to the user.Action: For further details, turn on tracing and re-execute the operation. If the error persists, contact Oracle Support Services.
      

  16.   

      非常感谢大家的热心帮助,问题已经解决,原因为oracle 的listener.log日志 超过了4G 出了问题