被oracle搞死的部分語句(持續更新中)

weixin_30588675發表於2020-04-05

時間between:

 to_char(FIRST_INSERT,'yyyy-MM-dd HH:mm:ss')  BETWEEN to_char('2017-10-07 00:00:00') AND to_char('2017-10-16 00:00:00')  

資料庫因為不當操作卡死(死鎖):

SELECT p.spid, a.serial#, c.object_name, b.session_id, b.oracle_username,b.os_user_name
FROM v$process p, v$session a, v$locked_object b, all_objects c
WHERE p.addr = a.paddr
AND a.process = b.process
AND c.object_id = b.object_id
alter system kill session '34,4661';

資料庫連線數查詢:

select count(*) from v$session;
select count(*) from v$process
select value from v$parameter where name = 'processes' 
Select count(*) from v$session where status='ACTIVE' ;

 

轉載於:https://www.cnblogs.com/ShaoXin/p/7678623.html

相關文章