Solved

Unlocking locked tables

Posted on 1997-09-02
5
1,631 Views
Last Modified: 2008-03-10
How can I unlock tables locked by a program that crashed, without having to restart the database instance?  The tables were locked EXCLUSIVE.
0
Comment
Question by:nesbit
  • 2
  • 2
5 Comments
 

Author Comment

by:nesbit
ID: 1080499
Adjusted points to 50
0
 

Author Comment

by:nesbit
ID: 1080500
Adjusted points to 100
0
 
LVL 1

Accepted Solution

by:
arh earned 100 total points
ID: 1080501
You should kill user session which crashed.
This releases all locks and server resources
hold by that session and does rollback of all
its current transactions.
 You can do it either in SQL*Dba screen mode
(Instance->Kill Session menu item) or in SQL*Plus
by 'alter system kill session' command (you should
have proper privilege, or, in other words,
connected as 'system').
 In SQL*Plus you should first determine 'sid' and
'serial number' of crashed session, usually it can
be found given its user name as
  select sid, serial# from v$session where username='USER_NAME';
Then you substitute these two numbers in alter system command:
  alter system kill session 'SID,SERIAL#';

0
 
LVL 1

Expert Comment

by:rodo
ID: 1080502
Arh is right.
In addition, if you are using Enterprise Manager in Windows 95 then you can also kill the session from the graphical "Top Sessions Manager" right-clicking on the crashed session.
0
 
LVL 1

Expert Comment

by:rodo
ID: 1080503
Arh is right.
In addition, if you are using Enterprise Manager in Windows 95 then you can also kill the session from the graphical tool "Top Sessions Manager" right-clicking on the crashed session.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to recover a database from a user managed backup

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now