Databases Reference
In-Depth Information
the database, but if you want to continuously monitor everything that is
happening you will have to continuously poll these tables, sometimes at a
high frequency, which can affect the performance of the database. Polling is
needed because you cannot set triggers or other types of mechanisms on
these tables and tables that show you the actual SQL generated in the con-
text of these sessions.
The second option does not need to poll the database; it is based on
intercepting communication streams and extracting information from the
packets as they come into the database. All of the information mentioned
previously is readily available in these streams (e.g., in the TCP/IP commu-
nications)—and actually much more. For example, the following packet
captures for Oracle, SQL Server, and Sybase highlight information such as
the source program, sign-on name, client machine, and much more (refer
to Chapter 10 for more information on how you can generate these dumps
yourself ).
Naturally, each such packet also has a TCP/IP header where the
client IP resides, providing you with more than enough information to
accomplish your task. (Some of the packet contents have been omitted
because they do not contribute to this topic).
Oracle:
0000 00 10 db 46 3e 74 00 0d 56 b2 05 34 08 00 45 00 ...F>t.. V..4..E.
0010 03 52 4b 45 40 00 80 06 27 54 c0 a8 01 a8 c0 a8 .RKE@... 'T......
0020 02 14 11 9b 05 f1 ab cf 67 39 9c 94 04 30 50 18 ........ g9...0P.
0030 f8 1d 05 c9 00 00 03 2a 00 00 06 00 00 00 00 00 .......* ........
0040 03 73 03 a4 a1 e1 00 06 00 00 00 01 01 00 00 1c .s...... ........
0050 e3 12 00 07 00 00 00 d4 df 12 00 60 e5 12 00 06 ........ ...`....
0060 73 79 73 74 65 6d 0d 00 00 00 0d 41 55 54 48 5f
.. ...AUTH_
0070 50 41 53 53 57 4f 52 44 20 00 00 00 20 43 46 39 PASSWORD ... CF9
0080 32 39 43 30 43 42 38 30 34 35 33 33 37 31 43 46 29C0CB80 453371CF
0090 44 32 30 31 46 45 37 34 44 31 44 45 38 00 00 00 D201FE74 D1DE8...
00a0 00 0d 00 00 00 0d 41 55 54 48 5f 54 45 52 4d 49 ......AU TH_TERMI
00b0 4e 41 4c 0f 00 00 00 0f 52 4f 4e 2d 53 4e 59 48 NAL.....
system
RON-SNYH
00c0 52 38 35 47 39 44 4a 00 00 00 00 0f 00 00 00 0f
. ........
00d0 41 55 54 48 5f 50 52 4f 47 52 41 4d 5f 4e 4d 0c AUTH_PRO GRAM_NM.
00e0 00 00 00 0c 73 71 6c 70 6c 75 73 77 2e 65 78 65 ....
R85G9DJ
sqlp lusw.exe
00f0 00 00 00 00 0c 00 00 00 0c 41 55 54 48 5f 4d 41 ........ .AUTH_MA
0100 43 48 49 4e 45 1a 00 00 00 1a 57 4f 52 4b 47 52 CHINE... ..
WORKGR
0110 4f 55 50 5c 52 4f 4e 2d 53 4e 59 48 52 38 35 47
OUP\RON- SNYHR85G
0120 39 44 4a 00 00 00 00 00 08 00 00 00 08 41 55 54
..... .....AUT
0130 48 5f 50 49 44 09 00 00 00 09 37 33 32 30 3a 36 H_PID... ..7320:6
0140 32 34 34 00 00 00 00 08 00 00 00 08 41 55 54 48 244..... ....AUTH
0200 41 43 54 45 52 53 3d 20 27 2e 2c 27 20 4e 4c 53 ACTERS= '.,' NLS
0210 5f 43 41 4c 45 4e 44 41 52 3d 20 27 47 52 45 47 _CALENDA R= 'GREG
0220 4f 52 49 41 4e 27 20 4e 4c 53 5f 44 41 54 45 5f ORIAN' N LS_DATE_
0230 46 4f 52 4d 41 54 3d 20 27 44 44 2d 4d 4f 4e 2d FORMAT= 'DD-MON-
0240 52 52 27 20 4e 4c 53 5f 44 41 54 45 5f 4c 41 4e RR' NLS_ DATE_LAN
0250 47 55 41 47 45 3d 20 27 41 4d 45 52 49 43 41 4e GUAGE= ' AMERICAN
0260 27 20 20 4e 4c 53 5f 53 4f 52 54 3d 20 27 42 49 ' NLS_S ORT= 'BI
0270 4e 41 52 59 27 20 54 49 4d 45 5f 5a 4f dd 4e 45 NARY'
9DJ
TI ME_ZO.NE
0280 3d 20 27 2d 30 34 3a 30 30 27 20 4e 4c 53 5f 44
NLS_D
0290 55 41 4c 5f 43 55 52 52 45 4e 43 59 20 3d 20 27 UAL_CURR ENCY = '
02a0 24 27 20 4e 4c 53 5f 54 49 4d 45 5f 46 4f 52 4d $' NLS_T IME_FORM
= '-04:0 0'
Search WWH ::




Custom Search