Tuesday, August 16, 2011

To Create a Oracle Form based in View.

Step#1 – Create Data block based on the view.
Step#2 – Create On-Update /On –Insert Trigger to update/insert data of base tables (on which view has constructed). In case you are not interested in writing Form based triggers you can write database In-Stead of trigger on View.
Step#3 – Create ON – Lock Trigger on View based block and Enter following code in that BeginNULL;End;
Step #4 – There is no Step #4 – You are ready to go.

Unlock a table

List of Objects which are locked :-
select a.object_name, b.oracle_username, b.os_user_name,c.sid, c.serial#,c.terminal, d.sql_textfrom sys.dba_objects a,v$locked_object b,v$session c,v$sqltext dwhere a.object_id = b.object_idand c.sid = b.session_idand c.sql_hash_value = d.hash_value

To kill a particular session
alter system kill session 'c.sid, c.serial#'