重现Oracle数据库Hang住的情况

摘要:
重新连接到数据库[oracle@resoft~]$sqlplus

What is the Oracle Diagnostic Methodology (ODM)? [ID 312789.1]

ODM TEST:

查询语句:

select to_number(addr,'xxxxxxxxxxxxxxxx') from v$latch_parent where name='process allocation';
select name from v$latch_parent where name like '%library%';
select name from v$latch_children where name like '%library%';
select name from v$latch_parent where name like '%process%';

session A:

[oracle@resoft ~]$ sqlplus  / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Apr 12 22:52:42 2013

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

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select to_number(addr,'xxxxxxxxxxxxxxxx') from v$latch_parent where name='process allocation';

TO_NUMBER(ADDR,'XXXXXXXXXXXXXXXX')
----------------------------------
                         536896888

SQL> select pid,program from v$process;

       PID PROGRAM
---------- ------------------------------------------------
         1 PSEUDO
         2 oracle@resoft (PMON)
         3 oracle@resoft (PSP0)
         4 oracle@resoft (VKTM)
         5 oracle@resoft (GEN0)
         6 oracle@resoft (DIAG)
         7 oracle@resoft (DBRM)
         8 oracle@resoft (DIA0)
         9 oracle@resoft (MMAN)
        10 oracle@resoft (DBW0)
        11 oracle@resoft (LGWR)

       PID PROGRAM
---------- ------------------------------------------------
        12 oracle@resoft (CKPT)
        13 oracle@resoft (SMON)
        14 oracle@resoft (RECO)
        15 oracle@resoft (MMON)
        16 oracle@resoft (MMNL)
        17 oracle@resoft (D000)
        18 oracle@resoft (S000)
        19 oracle@resoft (TNS V1-V3)
        20 oracle@resoft (QMNC)
        21 oracle@resoft (Q000)
        22 oracle@resoft (Q001)

       PID PROGRAM
---------- ------------------------------------------------
        23 oracle@resoft (SMCO)
        24 oracle@resoft (VKRM)
        25 oracle@resoft (CJQ0)
        26 oracle@resoft (W000)
        27 oracle@resoft (TNS V1-V3)
        28 oracle@resoft (W001)

SQL> oradebug setorapid 2;
Oracle pid: 2, Unix process pid: 2770, image: oracle@resoft (PMON)

SQL> oradebug suspend;
Statement processed.

此时仍可以登录成功

[oracle@resoft ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Apr 12 23:01:31 2013

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

session A:
SQL> oradebug call kslgetl 536896888 1;
Function returned 1

此时,已经不能使用任何用户登录。

[oracle@resoft ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Apr 12 23:03:37 2013

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

释放的方法:

重新连接一个session B:

[oracle@resoft ~]$ sqlplus -prelim / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Apr 12 23:14:39 2013

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

[oracle@resoft ~]$ sqlplus -prelim / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Apr 12 23:19:47 2013

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

SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
ORA-01012: not logged on
Process ID: 0
Session ID: 0 Serial number: 0


关闭所有session,包括连接的shell ,关闭shell终端连接或者命令窗口即可。

重新连接到数据库

[oracle@resoft ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Apr 12 23:23:45 2013

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  845348864 bytes
Fixed Size                  1348216 bytes
Variable Size             595594632 bytes
Database Buffers          243269632 bytes
Redo Buffers                5136384 bytes
Database mounted.
Database opened.

数据库hang住时信息收集:

[oracle@resoft ~]$ sqlplus -prelim / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Apr 12 23:29:27 2013

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

SQL> oradebug setmypid;
Statement processed.
SQL> oradebug dump systemstate 266;
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/diag/rdbms/orcl/ORCL/trace/ORCL_ora_4889.trc
接下来的事情就是分析,折腾数据库了…

免责声明:文章转载自《重现Oracle数据库Hang住的情况》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇Android Error:You must supply a layout_width attribute……带权区间调度问题,软件的期中复习下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

python测试开发django(8)--django连接mysql

前言 Django对各种数据库提供了很好的支持,包括:PostgreSQL、MySQL、SQLite、Oracle。本篇以mysql为例简单介绍django连接mysql进行数据操作 Django连mysql需要安装驱动mysqlclient mysqlclient安装 先要安装数据库驱动mysqlclient,使用pip安装就行 pip install...

oralce 菜鸟总结

1、Oracle 中默认的日期格式:DD-Mon-RR 2、SELECT  (SYSDATE-to_date('2010-01-01','yyyy-mm-dd'))/7 AS WEEKS from dual; 3、如果只是计算两个日期的月份的话为double行结果: select months_between(sysdate,to_date('2010-0...

liunx安装mysql(mariadb)

liunx安装mysql(mariadb) 1.配置mariadb的yum源,新建一个Mariadb.repo仓库文件#编辑创建mariadb.repo仓库文件  vi /etc/yum.repos.d/MariaDB.repo 2.修改mariadb.repo仓库文件,写入以下内容  vi /etc/yum.repos.d/MariaDB.repo   ...

OGG 进程清除、重建

背景描述:有时候OGG进程同步出现问题,症状某些进程起不来,而且问题一时半会儿解决不了。最简单的办法是:用数据泵初始化数据,OGG进程重建。 1.查看源端、目的端的进程状态。 (作者OGG进程是正常的,假设进程是 abend ) 源端:GGSCI (11g) 1> info all Program Status Group Lag at Chkpt...

Oracle 12c 分片(Sharding)技术

Sharding特点 Oracle12c Sharding技术实现了跨数据库级别的数据分片,实现了分布式IO大数据扩展的云数据库架构体系,可满足大数据海量存储、分布式数据读写以及满足Scale Out/ScaleUp扩展性需求。Sharding的主要特点: 线性伸缩性(Scale out):Sharding技术减少性能瓶颈,同时可以通过添加Shard节点...

mysql常用语句、命令(增删改查功能)

修改数据库的字符集mysql>use mydbmysql>alter database mydb character set utf8;创建数据库指定数据库的字符集mysql>create database mydb character set utf8; 查看database的字符集! show variables like 'coll...