WP-Syntax 0.8
把WP-Syntax更新到最新的0.8版本,这个版本可以说已经非常不错了,支持了n多的语言,
和我的这个模板配合起来使用也非常完美,列出支持的语言列表,供自己查询。
WP-Syntax 0.8 支持的语言列表:
1 2 3 4 5 | abap, actionscript, actionscript3, ada, apache, applescript, asm,z80,asp, autoit, bash, blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp-qt, cpp, csharp, css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gettext, glsl, gml, groovy, haskell,xpp, html4strict, idl, ini, inno, io, java, java5, javascript, kixtart,xml, latex, lisp, lotusformulas, lotusscript, lua, m68k, matlab, mirc, mpasm, mxml, mysql, nsis, objc, ocaml-brief, ocaml, oobas, oracle8, pascal, per, perl, php-brief, php, plsql, python, qbasic, rails, reg, robots, ruby, sas, scala, scheme, sdlbasic, smalltalk, smarty, sql,winbatch,tcl, text, thinbasic, tsql, vb, vbnet, verilog, vhdl, visualfoxpro, |
Popularity: 23% [?]
By Jeff Hunter, ideveleopment.info
Script:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | REM +-----------------------------------------------------------------+ REM | FILE : user_transaction_information.sql | REM | AUTHOR : Jeff Hunter | REM | PURPOSE : List TABLE locking AND user transactions information. | REM +-----------------------------------------------------------------+ SET LINESIZE 145 SET PAGESIZE 66 COLUMN owner FORMAT a5 HEADING 'Owner' COLUMN object_type FORMAT a10 HEADING 'Type' COLUMN object_name FORMAT a25 HEADING 'Name' COLUMN locked_mode FORMAT a9 HEADING 'Locked Mode' COLUMN sid FORMAT 999 HEADING 'SID' COLUMN username FORMAT a15 HEADING 'Database User' COLUMN osuser FORMAT a10 HEADING 'O/S User' COLUMN logon_time HEADING 'Login Time' Prompt +----------------------------------------------------+ Prompt | TABLE Locking Information | Prompt +----------------------------------------------------+ SELECT SUBSTR(b.owner, 1, 8) owner , b.object_type object_type , SUBSTR(b.object_name, 1, 18) object_name , DECODE(a.locked_mode , 0, 'None' , 1, 'Null' , 2, 'Row-S' , 3, 'Row-X' , 4, 'Share' , 5, 'S/Row-X' , 6, 'Exclusive') locked_mode , a.session_id sid ,a.oracle_username username , a.os_user_name osuser , TO_CHAR(c.logon_time,'YYYY/MM/DD HH24:MI:SS') logon_time FROM v$locked_object a , dba_objects b , v$session c WHERE a.object_id = b.object_id AND a.session_id = c.sid ORDER BY b.owner , b.object_type , b.object_name / Prompt +----------------------------------------------------+ Prompt | User Transactions Information | Prompt +----------------------------------------------------+ COLUMN "UserName" format a8 COLUMN "DB Sid" format 999999 COLUMN "Unix Pid" format 99999999 COLUMN "Trnx_start_time" format a19 COLUMN "Current Time" format a19 COLUMN "Elapsed(mins)" format 999999999.99 COLUMN "Undo Name" format a09 COLUMN "Used Undo Blks" format a13 COLUMN "Used Undo Size(Kb)" format a17 COLUMN "Logical I/O(Blks)" format 99999999999999999 COLUMN "Logical I/O(Kb)" format 999999999999999 COLUMN "Physical I/O(Blks)" format 999999999999999999 COLUMN "Physical I/O(Kb)" format 999999999999999999 SELECT a.username "UserName" , a.sid "DB Sid" , e.spid "Unix Pid" , TO_CHAR(TO_DATE(b.start_time,'mm/dd/yy hh24:mi:ss'),'yyyy/mm/dd hh24:mi:ss') "Trnx_start_time" , TO_CHAR(sysdate,'yyyy/mm/dd hh24:mi:ss') "Current Time" , ROUND(60*24*(sysdate-to_date(b.start_time,'mm/dd/yy hh24:mi:ss')),2) "Elapsed(mins)" , c.segment_name "Undo Name" , TO_CHAR(b.used_ublk*d.value/1024) "Used Undo Size(Kb)" , TO_CHAR(b.used_ublk) "Used Undo Blks" , b.log_io "Logical I/O(Blks)" , b.log_io*d.value/1024 "Logical I/O(Kb)" , b.phy_io "Physical I/O(Blks)" , b.phy_io*d.value/1024 "Physical I/O(Kb)" , a.program FROM v$session a , v$transaction b , dba_rollback_segs c , v$parameter d , v$process e WHERE b.ses_addr = a.saddr AND b.xidusn = c.segment_id AND d.name = 'db_block_size' AND e.ADDR = a.PADDR ORDER BY 4 / |
Note:
In addition to an explicit LOCK SQL command run on the table (as Jonathan pointed out), another possibility of having a lock without a transaction is a DML with a long-running query as its prerequisite, such as
INSERT INTO YOURTABLE SELECT COLUMNS FROM SOMEBIGTABLE This immediately creates a TM lock in mode 3 on YOURTABLE, but won’t create a transaction until the query phase is finished.
When you have this problem, check v$sql.sql_text for the locking session and also its entry in v$session_wait.
Popularity: 20% [?]
Loading...