oracle kill process and buffer_cache

-----------------oracle kill process----------------------------start------------------------
select * from v$session;
select sid,serial# from v$session;


--kill那个进程
alter system kill session 'sid,serial#';


--如果某应用线上有6台,每台最大连接数有10个,则machine对应一台机器应该有10条记录
--kill那个sql(先查询 sql_id,sql_hash_value)
alter system kill session 'sid,serial#';


-- oracle数据库登录名/密码:sys/oracle ---


--sysdba清数据库缓存:
alter system flush buffer_cache;


-----------------oracle kill process----------------------------start------------------------




-----------------oracle lock -----------------------------end------------------------
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;


   
-----------------oracle lock 情况----------------------------end------------------------



你可能感兴趣的:(oracle kill process and buffer_cache)