I was making a bulk update, I wanted to make some more changes in my code, so I closed my session.
When I re open the sql plus, still the privious process is running at the background.
1) How do I know,that process is running at background.
2) how do I know what locks are there on that process
3) How do I release locks or kill the process manually/
Some scripts to do these will be highly appreciated
check v$session and v$process
Where can I get the description for each of the fields columns of the v$tables like
Dict table does not even give the brief description for these tables !!
See the descriptions for the columns of v$tables in Oracle 8i documentation under Oracle8i SQL reference.
$ps -ef|grep you have used for Background process.
Ex: $ps -ef|grep If you have used sqlldr for background job.
I guess processes window
V$SQLAREA ( don't remember exact view)
I have scripts for locks identification at my desk. Drop me an e-mail as reminder I will attach and send 'em tomorrow!
You have to kill the session thru which you initiated the job to kill the process manually. Its not going to release the locks even, depending upon the transaction status.
For getting lock details, do the following
select * from v$session
(select sid from v$lock
where id1 in
(select object_id from all_objects
object_name = <"name of the object against the query
This will give the info. about the lock.
ii) Either u can kill the session by connecting as SYS or internal.
iii) Otherwise u can get the process id by using the
ps -ef | grep (for ur process) , then
try to kill the process in the command line.
** Before doing that put a query in oracle between
v$session and v$process to know about the
magnitude of the process.
You can get the details of locking from the following tables.
You can even get the transaction details which has performed the lock.
You can kill the process from Oracle itself using the
SID, SERIAL# details from v$SESSION/v$PROCESS.
If you want to perform a OS level process termination then follow what SREDDY had adivced and terminate the process with the KILL command of the OS (UNIX), KILL -9 for a sure kill.
To kill a particular session pick its sid,serial#.
ALTER SYSTEM KILL SESSION '8,103';
where 8 is the sid and 103 is the serial#.
Answering to the question where can you get the description of the v$tables, do the following
on the sql prompt
SQL> desc v$session
would list all the columns in the V$session view. "desc" means describe.