Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: User Administration >> To find locks

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: To find locks
 mani  Posted: Jan 16, 2008 04:10:45 AM

 Total Post: 6
 Joined: Jan, 2008






 How to find locks in a table..?
What are the types of locks?
How to release the locks from that table?

 Babu
Posted: Jan 16, 2008 04:14:06 AM  

 Total Post: 77
 Joined: Oct, 2007






 
select
c.owner,
c.object_name,
c.object_type,
b.sid,
b.serial#,
b.status,
b.osuser,
b.machine
from
v$locked_object a ,
v$session b,
dba_objects c
where
b.sid = a.session_id and a.object_id = c.object_id;
/


 MOH_DBA
Posted: Jan 25, 2008 03:16:48 PM  

 Total Post: 80
 Joined: Nov, 2007






 
lock modes are:

ROW SHARE: Permits concurrent access to the locked table, but prohibits sessions from locking the entire table for exclusive access
ROW EXCLUSIVE: Is the same as ROW SHARE, but also prohibits locking in SHARE mode. The ROW EXCLUSIVE locks are automatically obtained when updating, inserting, or deleting data.
SHARE: Permits concurrent queries but prohibits updates to the locked table. A SHARE lock is required (and automatically requested) to create an index on a table
SHARE ROW EXCLUSIVE: Is used to query a whole table and to allow others to query rows in the table, but prohibits others from locking the table in SHARE mode or updating rows
EXCLUSIVE: Permits queries on the locked table but prohibits any other activity on it. An exclusive lock is required to drop a table

You Can release a lock by issue a commit or rollback first in the session holding the lock, if you cannot reach this session, then issue a kill session command.

alter system kill session 'sid,serial#'

 dbavinod
Posted: Feb 15, 2008 02:23:58 AM  

 Total Post: 81
 Joined: Sep, 2006






 
Read this A Good One
http://www.adp-gmbh.ch/ora/concepts/lock.html

Vinod

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Mohammed Taj634
  Murtuja Khokhar588
  Jayanta Sur479
  Vigyan Kaushik385
  Ramesh Jois226
  neeraj sharma189
  snehalatha p166
  Gitesh Trivedi157
  Gopu Gopi149
  Kushal ratnaker136






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software