資料庫解鎖 ---011
SELECT * FROM v$session WHERE username IS NOT NULL AND lockwait IS NOT NULL
SELECT * FROM dba_ddl_locks WHERE mode_held='Share'
SELECT * FROM v$locked_object
SELECT * FROM v$session WHERE sid IN('12')
SELECT * FROM v$process WHERE addr IN(
SELECT paddr FROM v$session WHERE sid IN('12'))
select s.sid,s.value/100/60
from v$sesstat s,v$statname n
where s.statistic#=n.statistic# and n.name='CPU used by this session'
and s.value>0
order by 2 desc;
SELECT sql_text FROM v$sqltext_with_newlines WHERE (hash_value,address)
IN (SELECT sql_hash_value,sql_address FROM v$session WHERE sid IN(SELECT ses.sid FROM v$session ses,v$process pro WHERE pro.spid='20066' AND ses.paddr=pro.addr)
) ORDER BY address,piece
SELECT sql_text FROM v$sqltext_with_newlines WHERE (hash_value,address) IN
(SELECT sql_hash_value,sql_address FROM v$session WHERE username='SFIS1')
ORDER BY address,piece;
SELECT * FROM v$sqltext_with_newlines where hash_value='0' and address='00'
select sql_hash_value,sql_address from gv$session where sid='838'
SELECT sid,serial#,terminal,program,sql_text FROM v$sqltext_with_newlines a,v$session b
WHERE a.hash_value=b.sql_hash_value AND a.address=b.sql_address AND b.username='SFIS1' AND TERMINAL='FOXCONN-JACKEN'
ORDER BY address,piece;
sid in(SELECT SESSION_ID FROM v$locked_object)--b.username='SFIS1' --AND TERMINAL='FOXCONN-JACKEN'
ORDER BY address,piece;
ALTER SYSTEM KILL SESSION '271,1616';
SELECT 'ALTER SYSTEM KILL SESSION'||''''||sid||','||SERIAL#||''''||';' FROM gv$session --WHERE username IS NOT NULL AND lockwait IS NOT NULL
where INST_ID=2
and PROGRAM='CtoAppSfc.exe'
SELECT * FROM V$LOCKED_OBJECT A,ALL_OBJECTS B WHERE A.OBJECT_ID=B.OBJECT_ID
select osuser, username, sql_text from v$session a, v$sqltext b
where a.sql_address =b.address order by address, piece;
SELECT * FROM v$process WHERE addr IN(
SELECT addr FROM v$process MINUS SELECT paddr FROM v$session)
KILL -9 spid
SELECT * FROM dba_objects WHERE status='INVALID'
SELECT 'alter '||DECODE(object_type,'PACKAGE BODY','PACKAGE',object_type)||' '||owner||'."'||object_name||'" compile'||DECODE(object_type,'PACKAGE BODY',' BODY','PACKAGE',' PACKAGE','')||';' dd FROM dba_objects WHERE object_type<>'SYNONYM' and status='INVALID'
ALTER PACKAGE SYS.DBMS_AQADM_SYS COMPILE BODY;
ALTER PACKAGE SYS.DBMSOBJG COMPILE PACKAGE;
ALTER PROCEDURE SFIS2.Nb_Tag_Update COMPILE;
ALTER FUNCTION SFIS1.GET_CHECKCODE COMPILE;
gerry.sjt f3408988
select tablespace_name, count(*) chunks , max(bytes/1024/1024) max_chunk from dba_free_space
group by tablespace_name;
select tablespace_name,count(tablespace_name) from dba_free_space group by tablespace_name having count(tablespace_name)>100
SELECT segment_name table_name , COUNT(*) extents
FROM dba_segments WHERE owner NOT IN ('SYS', 'SYSTEM') GROUP BY segment_name
HAVING COUNT(*) = (SELECT MAX( COUNT(*) ) FROM dba_segments GROUP BY segment_name);
alter tablespace I_SFISM4_DATA_01 coalesce;
alter table deallocate unused;
SELECT inst_id , instance_number inst_no, instance_name inst_name, parallel, status, database_status db_status, active_state state, host_name host
FROM gv$instance
ORDER BY inst_id;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25850100/viewspace-703054/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MySQL資料庫-鎖詳解MySql資料庫
- 資料庫篇:mysql鎖詳解資料庫MySql
- 解決Oracle資料庫死鎖Oracle資料庫
- 【資料庫——鎖】資料庫
- 資料庫鎖機制資料庫
- oracle 資料庫的鎖Oracle資料庫
- (資料庫十)資料庫中的鎖機制以及死鎖產生的原因及解決辦法資料庫
- 關於資料庫死鎖問題的解釋資料庫
- 解鎖你的資料庫:JPA和Hibernate的樂觀鎖與悲觀鎖資料庫
- 資料庫中的共享鎖與排他鎖資料庫
- MySQL資料庫鎖介紹MySql資料庫
- 轉載oracle資料庫鎖Oracle資料庫
- 資料庫鎖表與阻塞資料庫
- postgresql資料庫鎖介紹SQL資料庫
- 資料庫是如何使用鎖資料庫
- 資料庫被鎖問題資料庫
- 即刻殺死資料庫鎖資料庫
- 資料庫使用者登入、切換以及解鎖資料庫
- Oracle資料庫資料鎖機制解析(zt)Oracle資料庫
- 資料庫之鎖的實踐資料庫
- 資料庫中的悲觀鎖和樂觀鎖資料庫
- 深入 MyBatis-Plus 外掛:解鎖高階資料庫功能MyBatis資料庫
- 資料庫事物、隔離等級及資料庫鎖機制資料庫
- InnoDB學習(六)之資料庫鎖資料庫
- 資料庫兩大神器【索引和鎖】資料庫索引
- 關於資料庫鎖的總結資料庫
- MySQL資料庫故障分析-鎖等待(一)MySql資料庫
- ORACLE 資料庫中的鎖機制Oracle資料庫
- 解鎖資料庫使用者、檢視登陸幾次才鎖定使用者資料庫
- 011 Rust死靈書之幽靈資料Rust
- 【每日鮮蘑】從資料庫看樂觀鎖、悲觀鎖資料庫
- 面試必備的資料庫悲觀鎖與樂觀鎖面試資料庫
- Mysql加鎖過程詳解(6)-資料庫隔離級別(1)MySql資料庫
- S/4 HANA 中的資料庫鎖策略資料庫
- MySQL(一):MySQL資料庫事務與鎖MySql資料庫
- 資料庫鎖的12連問,抗住!資料庫
- 10.1.0.3資料庫帳號被鎖定資料庫
- AT_agc011_d [AGC011D] Half Reflector 題解GC