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.
|
|
|
|
| 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 |
Send this thread to your friend |
|
|
|
|
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 Taj | 634 |
| Murtuja Khokhar | 588 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 385 |
| Ramesh Jois | 226 |
| neeraj sharma | 189 |
| snehalatha p | 166 |
| Gitesh Trivedi | 157 |
| Gopu Gopi | 149 |
| Kushal ratnaker | 136 |
|
|