易截截图软件、单文件、免安装、纯绿色、仅160KB

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
================


相关文档:

oracle 字段注释 数据字典显示

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 另外的表名; ......

LINUX下Oracle库备份脚本

vi /opt/back.sh(oracle用户)
#!/bin/ksh
tim=`date +%Y%m%d`
unset USERNAME
#export DISPLAY=0.0.0.0:0.0
#export ORACLE_BASE=/home/oraprod3
#export ORACLE_HOME=/prod/oracle/prod3db/9.2.0
#export ORACLE_SID=PROD3_db
#export LD_LIBRARY_PATH=/prod/oracle/prod3db/9.2.0/lib
#export ORACLE_TERM=vt100 ......

Oracle 时间操作大全

在系统时间基础上延迟5秒
  sysdate+(5/24/60/60)
  在系统时间基础上延迟5分钟
  sysdate+5/24/60
  在系统时间基础上延迟5小时
  sysdate+5/24
  在系统时间基础上延迟5天
  sysdate+5
  在系统时间基础上延迟5月
  add_months(sysdate,-5)
  在系统时间基础上延迟5年
  add_months ......

oracle exists and not exist


先看下面的例子: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& ......

oracle的逻辑结构和物理结构

1、数据库的逻辑结构和物理结构:
   Oracle logically divides the database into a smaller units to manage ,store,and retreive
data efficently.
  Tablespace\Blocks\Extents\segment\
有四种segment:
data segment、Index segment、Temporay segment、Rollback Segment
temporary segment:
Ar ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号