Oracle查詢被鎖的表及進程的方法

來源:互聯網
上載者:User

標籤:

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查詢被鎖的表及進程的方法

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.