ɱOracle½ø³Ì
alter system kill session '²é³öµÄsid,²é³öµÄserial#';
ͨ過數據×ÖµäV$SESSION與V$LOCK來瞭½âÕýÔڵȴý鎖資Ô´µÄÓÃ戶
select a.username,a.sid,a.serial#,b.id1 from v$session a ,v$lock b
Where a.lockwait = b.kaddr;
瞭½â鎖סÆäËûÓÃ戶µÄÓÃ戶進³Ì£¬·½·¨ÈçÏ£º
select a.username,a.sid,a.serial#,b.id1 from v$session a,v$lock b
Where b.id1 in
(select distinct e.id1 from v$session d,v$lock e where d.lockwait = e.kaddr)
And a.sid = b.sid and b.request =0;
Ïà¹ØÎĵµ£º
À´Ô´£¨http://www.javaeye.com/topic/190221£©
Ò»¡¢ ³£ÓÃÈÕÆÚÊý¾Ý¸ñʽ
1.Y»òYY»òYYY ÄêµÄ×îºóһ룬Á½Î»»òÈýλ
SQL> Select to_char(sysdate,'Y') from dual;
TO_CHAR(SYSDATE,'Y')
--------------------
7
SQL> Select to_char(sysdate,'YY') from dual;
TO_CHAR(SYSDATE,'YY')
---------------------
07 ......
1£ºÒÔÒ»¸öDBAÉí·ÖµÄÓû§µÇ½£¬´ò¿ªÒ»¸öÃüÁî´°¿Ú¡£Ö´ÐÐÃüÁî
SELECT /*+ rule */ s.username,
decode(l.type,'TM','TABLE LOCK',
'TX','ROW LOCK',
NULL) LOCK_LEVEL,
o.owner,o.object_name,o.object_type,
s.sid,s.serial#,s.terminal,s.machine,s.program,s.osuser
from v$session s,v$lock l,dba_objects o
WHERE ......
Éí¾ÓOracle ¹Ø¼üÓ¦ÓõĿª·¢ºÍά»¤ÍŶӣ¬ÄúÒ»¶¨ÉîÖªÑз¢¹ÜÀíµÄÖØÒª¡£ÈçºÎÀûÓÃרҵ»¯Oracle ÍŶӿª·¢½â¾ö·½°¸£¬ÊµÏÖ¸ßЧµÄÍŶӿª·¢¡¢×î¼ÑÓ¦ÓÃÐÔÄܺÍÀíÏëµÄ½»¸¶ÖÊÁ¿£¬ÊÇQuest Software±¾´ÎÓëÄú̽ÌֵĺËÐÄ»°Ìâ¡£
´ÓÊý¾Ý¿âµÄÉè¼Æ¡¢½¨Ä£¡¢±àÂ룬µ½Ó ......
1 spool
spool d:\test\table.dat
select * from table_name;
spool off
2 sqlplus user/password@sid @test.sql > table.dat
test.sql
select * from table_name;
exit; ......