Oracle Hang Analysis
Author: rainnyzhong
Date:2010-1-15
1. 症状描述:
FALB12从EXCEL IMPORT DATA到DB,预计事务会运行1个多小时,在开始操作后40分钟左右,ORACLE挂死,任何用户都不可以再登陆了。
2. 分析
(1) 下面是挂死时OS的资源状况:
09:37:54 up 73 days, 23:31, 1 user, load average: 0.11, 0.24, 0.18
194 processes: 191 sleeping, 3 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 6.7% 0.0% 0.3% 0.3% 0.0% 1.9% 90.4%
Mem: 2186616k av, 2168780k used, 17836k free, 0k shrd, 154716k buff
1633584k actv, 498176k in_d, 64108k in_c
Swap: 2040244k av, 18624k used, 2021620k free 2283068k cached
从top命令的输出中,我们可以看出,MEMORY使用几乎已经达到100%。
(2) 下面是ORACLE报警日志的内容:
Thu Jan 14 16:22:44 2010
Errors in file /opt/oracle9i/admin/ORA16G/udump/ora16g_ora_29758.trc:
ORA-00604: error occurred at recursive SQL level 4
ORA-04021: timeout occurred while waiting to lock object
ORA-00604: error occurred at recursive SQL level 4
ORA-04021: timeout occurred while waiting to lock object
ORA-00604: error occurred at recursive SQL level 3
ORA-04021: timeout occurred while waiting to lock object
Thu Jan 14 16:26:06 2010
可以看出,在解析递归SQL时出问题了,在等待某种锁时延时了。
(3) 下面是跟踪文件ora16g_ora_29758.trc的部分内容
*** 2010-01-14 16:22:44.412
================
相关文档:
索引组织表(IOT)有一种类B树的存储组织方法。普通的堆组织表是以一种无序的集合存储。而IOT中的数据是按主键有序的存储在B树索引结构中。与一般B树索引不同的的是,在IOT中每个叶结点即有每行的主键列值,又有那些非主键列值。
在IOT所对应的B树结构中,每个索引项包 ......
select lower( column_name) ||','||'--'||comments
from user_col_comments c
where c.table_name = upper('acc_fundcap')
SELECT * from USER_TAB_COMMENTS WHERE TABLE_NAME='T_META';
INSERT INTO 表名(字段名1, 字段名2) SELECT 字段名1, 字段名2 from 另外的表名; ......
先看下面的例子:oracle中两个系统表.emp,dept.
example:
1:not exists(not in)
not exists:
这条语句返回select * from scott.dept d where e.deptno=d.deptno and d.deptno=10条件满足的结果集.也就是说,
返回的结果集中不存在d.deptno=10结果集的记录,即emp表中没有dept表中d.deptno=10的记录.
SQL& ......
数据库的内存结构:
Memory structures are allocated to the Oracle instance when the instance is started.
The two major memory structures are known as the System Global Area(Also called the shared
Global Area)and the Program Global Area(also called the Private Global Area or the ......
关于安装:
安装Oracle10g时,所输入的全局的SID名称为test(即数据库名,不能作为用户名来登录),密码为test(该密码对应的用户为system,sys等)。
装完后,若从网页上登录oracle,则输入url:http://localhost:1158/em
若无法显 ......