Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Unlocking locked tables

Posted on 1997-09-02
5
Medium Priority
?
1,656 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 200 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

810 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