Archive

Posts Tagged ‘dump’

How to find/list the events set in a session?

July 22nd, 2010 Amin Jaffer No comments

Using “oradebug dump events 1″ one can find/list events set in a session.

For example:
In a session events 10046 and 1410 events are set
SQL> ALTER SESSION SET EVENTS='10046 trace name context forever, level 12';

Session altered.

SQL> ALTER SESSION SET EVENTS='1410 trace name context forever, level 12';

Session altered.

In another session login as an account as sysdba
SQL> oradebug setorapid 12
Unix process pid: 10932, image: oracle@localhost.localdomain (TNS V1-V3)

SQL> oradebug dump events 1
Statement processed.

SQL> oradebug tracefile_name
/u01/oradata/admin/TEST/udump/test_ora_10932.trc

After running the above oradebug will dump the events in the trace file in the above case /u01/oradata/admin/TEST/udump/test_ora_10932.trc shows event 1410 and 10046 events set.

Dump event group for level SESSION
TC Addr Evt#(b10) Action TR Addr Arm Life
974FED50 1410 1 974fede0 0 0
TR Name TR level TR address TR arm TR life TR type
CONTEXT 12 0 -1 2 0
974FEBF8 10046 1 974fec88 0 0
TR Name TR level TR address TR arm TR life TR type
CONTEXT 12 0 -1 2 0
*** 2010-07-15 23:40:05.671
..

Categories: oradebug, trace Tags: , , , ,

How to find shared libraries needed to run a binary?

January 6th, 2009 Amin Jaffer No comments

Depending on the platform different command may be available, below are the commands for AIX and SUN to find the shared libraries needed to run a binary. This may not show all the libraries needed as the application may be referenced in the code and dynamically loading them during different phases of execution of a program.

For AIX
# if the binary is 64bit one can use -X32_64 or -X64
/u01/app/oracle/bin $ dump -X32_64 -H oracle

oracle:

***Loader Section***
Loader Header Information
VERSION# #SYMtableENT #RELOCent LENidSTR
0×00000001 0x0000071e 0×00040902 0x000000e2

#IMPfilID OFFidSTR LENstrTBL OFFstrTBL
0×00000008 0x00413b28 0x000056a5 0x00413c0a

***Import File Strings***
INDEX PATH BASE MEMBER
0 /u01/app/oracle/rdbms/lib/:/u01/app/oracle/lib/:/usr/lib:/lib
1 libc.a shr_64.o
2 libpthreads.a shr_xpg5_64.o
3 libjox10.a shr.o
4 libdl.a shr_64.o
5 libperfstat.a shr_64.o
6 libodm.a shr_64.o
7 libc.a aio_64.o

For SUN (may be AIX depends on version).
$ cd $ORACLE_HOME
$ ldd oracle
oracle needs:
/usr/lib/libc.a(shr_64.o)
/usr/lib/libpthreads.a(shr_xpg5_64.o)
/u01/app/oracle/lib/libjox10.a(shr.o)
/usr/lib/libdl.a(shr_64.o)
/usr/lib/libperfstat.a(shr_64.o)
/usr/lib/libodm.a(shr_64.o)
/usr/lib/libc.a(aio_64.o)
/unix
/usr/lib/libcrypt.a(shr_64.o)
/usr/lib/libcfg.a(shr_64.o)
/usr/lib/liblvm.a(shr_64.o)

Categories: General DBA, Unix Tags: , , , , ,
5 visitors online now
5 guests, 0 members
Max visitors today: 10 at 10:30 pm UTC
This month: 10 at 09-04-2010 10:30 pm UTC
This year: 62 at 07-28-2010 05:49 pm UTC
All time: 62 at 07-28-2010 05:49 pm UTC