Oracle查詢可以有多種方法,下面為您介紹的是如何Oracle查詢被鎖的表及Oracle查詢連接的進程的方法,希望對您能夠有所幫助。
查看被鎖的表
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
查看連接的進程
SELECT sid, serial#, username, osuser FROM v$session;
殺掉進程
alter system kill session 'sid,serial#';
查看當前用戶下表的占用空間
Select Segment_Name, Sum(bytes)/1024/1024 From User_Extents Group By Segment_Name
查詢所有對象占用空間
select owner, segment_name,sum(bytes/1024/1024) from dba_segments
group by owner,segment_name
查詢數據庫中各對象占用空間大小
Select Segment_Name,b.object_type, Sum(bytes)/1024/1024 From User_Extents a,user_objects b
where a.segment_name=b.object_name Group By Segment_Name,b.object_type order by object_type, Segment_Name
Oracle中去除字段中的回車符
update ywj_yxglobj set table_name = replace(table_name,chr(10),'')
where table_name like 'ACCT_INFO%'
以上就是Oracle查詢被鎖的表及進程的方法介紹。