如果Oracle數據庫hang了
但有的時候
①首先獲得要dump的進程號
ps
oracle
oracle
②調用gdb進行dump
gdb $ORACLE_HOME/bin/oracle
GNU gdb Red Hat Linux (
Copyright
GDB is free software
welcome to change it and/or distribute copies of it under certain conditions
Type
There is absolutely no warranty for GDB
This GDB was configured as
Attaching to program: /u
Reading symbols from /u
Loaded symbols for /u
Reading symbols from /u
Loaded symbols for /u
Reading symbols from /u
Loaded symbols for /u
Reading symbols from /u
Loaded symbols for /u
Reading symbols from /u
Loaded symbols for /u
Reading symbols from /u
Loaded symbols for /u
Reading symbols from /u
Loaded symbols for /u
Reading symbols from /u
Loaded symbols for /u
Reading symbols from /u
Loaded symbols for /u
Reading symbols from /u
Loaded symbols for /u
Reading symbols from /usr/lib/libaio
Loaded symbols for /usr/lib/libaio
Reading symbols from /lib/libdl
Loaded symbols for /lib/libdl
Reading symbols from /lib/tls/libm
Loaded symbols for /lib/tls/libm
Reading symbols from /lib/tls/libpthread
[Thread debugging using libthread_db enabled]
[New Thread
Loaded symbols for /lib/tls/libpthread
Reading symbols from /lib/libnsl
Loaded symbols for /lib/libnsl
Reading symbols from /lib/tls/libc
Loaded symbols for /lib/tls/libc
Reading symbols from /lib/ld
Loaded symbols for /lib/ld
Reading symbols from /lib/libnss_files
Loaded symbols for /lib/libnss_files
(gdb) print ksudss(
[Switching to Thread
$
(gdb) detach
Detaching from program: /u
(gdb) quit
③隨後即可找到有dump結果的trace文件
ls
此時
awk
就可以獲得簡單的等待信息
在LINUX下用gdb
# dbx
Waiting to attach to process
Successfully attached to oracle
Type
reading symbolic information …
stopped in iosl
(dbx) print ksudss(
Segmentation fault in slrac at
(dbx) detach
在HP
除了通過print ksudss(
print ksdhng(
print ksudps(
print curdmp() 相當於oradebug call curdmp(也就是oradebug dump cursordump)
print ksdtrc(
print ksdsel(
print skdxipc() –相當於oradebug ipc
print skdxprst() –相當於oradebug procstat
當然如果能用oradebug
From:http://tw.wingwit.com/Article/program/Oracle/201311/17728.html