3.13 Overview of additional database topics -------------------------------------- - Multi-threaded server configuration. (See Appendix A) - Auditing. - Database locking. Viewing and monitoring locks: CATBLOCK.SQL - to install all locks relatad views UTLLOCKT.SQL - display 'wait for' graph V$LOCK Sid = V$PROCESS.Pid = V$SESSION.Pid Lid1/65536) (high half of 4-byte word)= V$ROLLNAME.Usn (undo segment no) if V$LOCK.Type = 'TX' and V$LOCK.Lmode = 6 DBA_BLOCKERS - all sessions that have someone waiting on lock they hold that are not themselfs waiting on a lock DBA_LOCKS - all locks or latches held in in the database, and all outstanding requests fr a lock or latch. Includes DML and DDL locks. DBA_DDL_LOCKS - all DDL locks held in the database and all outstanding requests for a DML lock DBA_DML_LOCKS - all DML locks held in the database and all outstanding requests for a DML lock DBA_WAITERS - all sessions waiting for locks and the session that holds the locks (Who are waiting for whom) DBL_KGLLOCK DBA_LOCK_INTERNAL - Script for wait-for graph. This script muchmore faster and does not need the temporary table. (See OM 3-4.1996 p.108) >>> Begin of script set echo off termout off verify off pagesize 15000 set Linesize 80 rem *************************************************** rem SQL*Plus script: V_LCKCHK.SQL rem rem Created by: Joe Sparks rem rem Note: This script should be run by an user who rem has SELECT ANY TABLE privilrge rem *************************************************** rem column Username format A15 heading "USER NAME" Word_w column Sid format 9990 heading "SID" column Type format A4 heading "TYPE" column Lmode format A12 heading "HELD" column Request format A12 heading "REQUESTED" Column Id1 format 9999990 heading "ID1" Column Id2 format 9999990 heading "ID2" Break on Id1 dup set termout on spool V_LCKCHK.TXT select SN.Username Username, M.Sid Sid, M.Type Type, decode (M.Lmode, 0, 'None', 1, 'Null', 2, 'Row Share', 3, 'Row Excl.', 4, 'Share', 5, 'S/Row Excl.', 6, 'Exclusive', ltrim (to_char(M.Lmode,'990')) ) Lmode, decode (M.Request, 0, 'None', 1, 'Null', 2, 'Row Share', 3, 'Row Excl.', 4, 'Share', 5, 'S/Row Excl.', 6, 'Exclusive', ltrim (to_char(M.Request,'990')) ) Request, M.Id1 Id1, M.Id2 Id2 from V$SESSION SN, V$LOCK M where ( SN.Sid = M.Sid and M.Request <> 0 ) or ( SN.Sid = M.Sid and M.Request = 0 and M.Request = 0 and M.Lmode <> 4 and (M.Id1, M.Id2) in ( select S.Id1, S.Id2 from V$LOCK S where S.Request <> 0 and S.Id1 = M.Id1 and S.Id2 = M.Id2 ) ) order by M.Id1, M.Id2, M.Request; spool OFF clear breaks >>> End of script - Job queues. - INIT.ORA parameters job_queue_processes = n job_queue_interval = m job_queue_keep_connections= - Data loading. - Distributed capabilities. - Parallel query option. - Parallel server capabilities.