Thursday, December 18, 2014

How to kill sessions from backend

SELECT c.owner, c.object_name, c.object_type, b.SID, b.serial#, b.status, b.osuser, b.machine   FROM v$locked_object a, v$session b, dba_objects c
WHERE b.SID = a.session_id
AND a.object_id = c.object_id;  

ALTER SYSTEM KILL SESSION 'sid,serial#';

ALTER SYSTEM KILL SESSION 'SID, SERIAL#';  

ALTER SYSTEM KILL SESSION '1105,389';  

commit;

Friday, December 5, 2014

What are user exits in oracle reports

User exits in oracle reports:
A User Exit is an API, which provides a way to pass control from Reports Builder to a 3GL program that performs some function, and then returns control to Reports Builder.
Using these we can integrate Oracle reports with Oracle apps AOL, and run them as concurrent programs.
Following are the user exits available in Oracle Reports that makes the AOL integration:
FND SRWINIT
FND SRWEXIT
FND FORMAT_CURRENCY
FND FLEXIDVAL
FND FLEXSQL
When the concurrent manager runs an Oracle Report concurrent request, it passes the concurrent request id in the P_CONC_REQUEST_ID parameter. When you call the FND SRWINIT user exit in the report’s Before Report trigger, the user exit uses the passed request id to query the Oracle Applications context that the concurrent request was submitted in (via the FND_CONCURRENT_REQUESTS table) and then log on with that context. 
This allows you to use operating specific views, access profile option values, etc within your report. You should also call the FND SRWEXIT user exit in the After Report trigger.
If you try calling the FND SRWINIT user exit in your report without the P_CONC_REQUEST_ID parameter defined as a user parameter on your report, the user exit will fail.