Tuesday, September 28, 2010

Named SQLs

Here are my useful - named SQLs for TOAD..

DBA objects

select * from dba_objects d
where 1=1
and D.OBJECT_NAME like '%%'
--and D.OBJECT_TYPE='TABLE';

Locked session

select * from v$session where lockwait is not null;

alter system kill session 'SID,SERIAL';

R12 security

exec MO_GLOBAL.SET_POLICY_CONTEXT('S',101);

Set schema

alter session set current_schema=APPS;

User Responsibilities

select user_name, responsibility_key
from apps.fnd_user fu , apps.fnd_user_resp_groups_direct rs, apps.fnd_responsibility rsp
where fu.user_id=rs.user_id
and rs.responsibility_id=rsp.responsibility_id
and user_name like '%'

User initialize

begin
apps.fnd_global.apps_initialize(user_id=>1092,resp_id=>50732,resp_appl_id=>20003);
end;

No comments:

Post a Comment