Loading...
我的blog我做主-网站优化篇

网站的优化终于告以段落,对于我这个不懂PHP,CSS,HTML的人来说,这个人来说是比较艰巨的。但是搜索引擎又证明了它的无所不能,在网上漫游了n长时间,找了一堆自己都快理不清的资料后,一个一个的尝试。
最后主要做了一下几件事情:
More…

Popularity: 34% [?]

.htaccess修改

发现网站没有禁用file list,简单修改了一下.htaccess文件
里面的参数选项有很多都不懂,好在现在网上什么工具都有,
找到了一个图形化界面设置.htaccess的网站:http://www.htaccesseditor.com
用它生成了下面这个例子:
More…

Popularity: 40% [?]

WP-Syntax 0.8 支持的语言

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,

More…

Popularity: 23% [?]

Script to Query on Current Transactions and Table Locks

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% [?]

表空间和数据文件管理(SG 9iR2)-3

1.Creating Tablespace

CREATE TABLESPACE tablespace
[DATAFILE clause]
[MINIUM EXTENT integer[K|M]]
[BLOCKSIZE integger [K]]
[LOGGING|NOLOGGING]
[DEFAULT storage_clause]
[ONLINE|OFFLINE]
[PERMANENT|TEMPORARY]

More…

Popularity: 20% [?]

Powered by ExtJS Theme flavored Wordpress.