Monday, 29 August 2016

How to Kill Locked Objects and Session Oracle 11g Database


select * from v$locked_object

1- SELECT sid FROM v$lock WHERE id1=51891
2- SELECT sid, serial# from v$session where sid=155
3- ALTER SYSTEM KILL SESSION '155,1098' ;


Step-1

SELECT object_id FROM dba_objects WHERE object_name='EMP';
 OBJECT_ID
----------
   7401242

Step-2 
If there are no locks present for the table ‘EMP’ this query won’t return any values.
SELECT sid FROM v$lock WHERE id1=7401242
SID
----------
3434

Step-3
SELECT sid, serial# from v$session where sid=3434
SID        SERIAL#
---------- ----------
3434       92193

Step-4
ALTER SYSTEM KILL SESSION '3434,92193' ;*/

Performance Tuning Interview Questions and Answers

performance tuning questions and solutions 1. A tablespace has a table with 30 extents in it. Is this bad? Why or why not? Expected answ...