---
title: "oracle 查锁解锁"
author: "stvanstar"
date: "2010-02-03T11:37:29Z"
tags: []
categories: ["数据库"]
slug: "oracle"
draft: false
lastmod: "2010-02-03T11:37:29Z"
id: 586382
url: "https://stvanstar.iteye.com/blog/586382"
---

从网上看到的，备查

查锁：

select t2.username||'   '||t2.sid||'   '||t2.serial#||'   '||t2.logon\_time||'   '||t3.sql\_text  
      from v$locked\_object t1,v$session t2,v$sqltext t3  
      where t1.session\_id=t2.sid  
      and t2.sql\_address=t3.address  
      order by t2.logon\_time

 

kill：

alter system kill session 'sid,serial#';