The following lines contain the word 'select', 'insert', 'update' or 'delete':
select 'Y' into x_session_id from icx_sessions
where session_id = l_session_id;
select 'Y' into x_XSID from icx_sessions
where XSID = l_XSID;
select 'Y' into x_transaction_id from icx_transactions
where transaction_id = l_transaction_id;
select 'Y' into x_transaction_id from icx_transactions
where transaction_id = l_transaction_id
and SESSION_ID = p_session_id
and DISABLED_FLAG <> 'Y';
select 'Y' into x_XTID from icx_transactions
where XTID = l_XTID;
SELECT login_id
from ICX_SESSIONS
where user_id = l_user_id
and session_id <> l_session_id
and disabled_flag = 'N'
and mode_code = '115P'
and user_id <> 6;
SELECT user_name
INTO l_user_name
FROM fnd_user
WHERE user_id=l_user_id;
SELECT substrb(parameters,(instrb(parameters,'=',1)+1))
INTO l_except_ids
FROM wf_event_subscriptions
WHERE guid=p_guid;
UPDATE icx_sessions
SET disabled_flag='Y'
WHERE user_id = l_user_id
AND session_id <> l_session_id
AND mode_code = '115P';
select node_id into l_node_id from fnd_nodes
where server_id = p_server_id;
SELECT user_id
INTO l_guest_user_id
FROM fnd_user
WHERE user_name = l_guest_username;
insert into icx_sessions (
session_id,
user_id,
org_id,
security_group_id,
mode_code,
home_url,
nls_language,
language_code,
pseudo_flag,
limit_time,
limit_connects,
counter,
first_connect,
last_connect,
created_by,
creation_date,
last_updated_by,
last_update_date,
last_update_login,
date_format_mask,
nls_numeric_characters,
nls_date_language,
nls_sort,
nls_territory,
disabled_flag,
node_id,
login_id,
MAC_KEY,
ENC_KEY,
XSID,
TIME_OUT,
GUEST,
DISTRIBUTED,
proxy_user_id)
values (
p_session_id,
p_user_id,
l_org_id,
fnd_session_management.g_security_group_id,
c_mode_code,
p_home_url,
l_language,
l_language_code,
p_pseudo_flag,
l_limit_time,
l_limit_connects,
0,
sysdate,
sysdate,
p_user_id,
sysdate,
p_user_id,
sysdate,
p_user_id,
l_date_format,
l_numeric_characters,
l_date_language,
l_nls_sort,
l_nls_territory,
'N',
l_node_id,
l_login_id, -- mputman added login_id per 2020952
l_mac_key,
l_enc_key,
l_XSID,
l_timeout,
l_guest,
l_dist,
p_proxy_user);
select user_id into l_user_id from fnd_user
where user_id = p_user_id and
(start_date <= sysdate) and
(end_date is null or end_date>sysdate);
select session_id,guest, mode_code, time_out, responsibility_application_id, responsibility_id, login_id
into l_session_id,l_guest, l_mode_code, l_curr_timeout, l_resp_app_id, l_resp_id, l_from_login_id
from icx_sessions
where xsid = p_session_id;
SELECT user_id
INTO l_guest_user_id
FROM fnd_user
WHERE user_name = l_guest_username;
select node_id into l_node_id from fnd_nodes
where server_id = p_server_id;
update icx_sessions set (
user_id,
mode_code,
org_id,
security_group_id,
function_id,
home_url,
nls_language,
language_code,
limit_time,
limit_connects,
counter,
first_connect,
last_connect,
created_by,
creation_date,
last_updated_by,
last_update_date,
last_update_login,
date_format_mask,
nls_numeric_characters,
nls_date_language,
nls_sort,
nls_territory,
disabled_flag,
node_id,
login_id,
mac_key,
enc_key,
TIME_OUT,
GUEST,
xsid)
= ( select
p_user_id,
nvl(p_mode_code,l_mode_code),
l_org_id,
fnd_session_management.g_security_group_id,
NULL,
p_home_url,
l_language,
l_language_code,
l_limit_time,
l_limit_connects,
0,
sysdate,
sysdate,
p_user_id,
sysdate,
p_user_id,
sysdate,
p_user_id,
l_date_format,
l_numeric_characters,
l_date_language,
l_nls_sort,
l_nls_territory,
'N',
l_node_id,
l_login_id,
NVL(l_mac_key, mac_key),
NVL(l_enc_key, enc_key),
l_timeout,
'N',
l_XSID from dual) -- Updating XSID when GUEST session is upgraded to user session
where xsid = p_session_id;
insert into icx_transactions (
TRANSACTION_ID,
SESSION_ID,
RESPONSIBILITY_APPLICATION_ID,
RESPONSIBILITY_ID,
SECURITY_GROUP_ID,
MENU_ID,
FUNCTION_ID,
FUNCTION_TYPE,
PAGE_ID,
LAST_CONNECT,
DISABLED_FLAG,
CREATED_BY,
CREATION_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_DATE,
XTID)
values (
l_transaction_id,
p_session_id,
p_resp_appl_id,
p_responsibility_id,
p_security_group_id,
p_menu_id,
p_function_id,
p_function_type,
p_page_id,
sysdate,
'N',
fnd_session_management.g_user_id,
sysdate,
fnd_session_management.g_user_id,
sysdate,
l_XTID);
update ICX_TRANSACTIONS
set DISABLED_FLAG = 'Y'
where TRANSACTION_ID = p_transaction_id;
select node_id into c_node_id from icx_sessions
where session_id = g_session_id;
select SESSION_ID,
MODE_CODE,
NLS_LANGUAGE,
LANGUAGE_CODE,
DATE_FORMAT_MASK,
NLS_NUMERIC_CHARACTERS,
NLS_DATE_LANGUAGE,
NLS_SORT,
NLS_TERRITORY,
USER_ID,
nvl(p_resp_appl_id,RESPONSIBILITY_APPLICATION_ID),
nvl(p_security_group_id,SECURITY_GROUP_ID),
nvl(p_responsibility_id,RESPONSIBILITY_ID),
nvl(p_function_id,FUNCTION_ID),
FUNCTION_TYPE,
MENU_ID,
PAGE_ID,
MODE_CODE,
LOGIN_ID,
NODE_ID,
MAC_KEY,
ENC_KEY,
nvl(PROXY_USER_ID, -1)
into fnd_session_management.g_session_id,
fnd_session_management.g_session_mode,
fnd_session_management.g_language,
fnd_session_management.g_language_code,
fnd_session_management.g_date_format,
fnd_session_management.g_numeric_characters,
fnd_session_management.g_date_language,
fnd_session_management.g_nls_sort,
fnd_session_management.g_nls_territory,
fnd_session_management.g_user_id,
fnd_session_management.g_resp_appl_id,
fnd_session_management.g_security_group_id,
fnd_session_management.g_responsibility_id,
fnd_session_management.g_function_id,
fnd_session_management.g_function_type,
fnd_session_management.g_menu_id,
fnd_session_management.g_page_id,
fnd_session_management.g_mode_code,
fnd_session_management.g_login_id,
fnd_session_management.g_node_id,
fnd_session_management.g_mac_key,
fnd_session_management.g_enc_key,
fnd_session_management.g_proxy_user_id
from ICX_SESSIONS
where SESSION_ID = p_session_id;
select language_code
into fnd_session_management.g_language_code
from fnd_languages
where nls_language = fnd_session_management.g_language;
select TRANSACTION_ID,
nvl(p_resp_appl_id,RESPONSIBILITY_APPLICATION_ID),
nvl(p_responsibility_id,RESPONSIBILITY_ID),
nvl(p_security_group_id,SECURITY_GROUP_ID),
MENU_ID,
nvl(p_function_id,FUNCTION_ID),
FUNCTION_TYPE,
PAGE_ID
into fnd_session_management.g_transaction_id,
fnd_session_management.g_resp_appl_id,
fnd_session_management.g_responsibility_id,
fnd_session_management.g_security_group_id,
fnd_session_management.g_menu_id,
fnd_session_management.g_function_id,
fnd_session_management.g_function_type,
fnd_session_management.g_page_id
from ICX_TRANSACTIONS
where TRANSACTION_ID = p_transaction_id
and SESSION_ID = p_session_id
and DISABLED_FLAG <> 'Y';
select multi_org_flag
into l_multi_org_flag
from fnd_product_groups
where rownum < 2;
c_update in boolean,
c_responsibility_id in number,
c_function_id in number,
c_resp_appl_id in number,
c_security_group_id in number,
c_validate_mode_on in varchar2,
c_XTID in varchar2,
session_id out NOCOPY number,
transaction_id out NOCOPY number,
user_id out NOCOPY number,
responsibility_id out NOCOPY number,
resp_appl_id out NOCOPY number,
security_group_id out NOCOPY number,
language_code out NOCOPY varchar2,
nls_language out NOCOPY varchar2,
date_format_mask out NOCOPY varchar2,
nls_date_language out NOCOPY varchar2,
nls_numeric_characters out NOCOPY varchar2,
nls_sort out NOCOPY varchar2,
nls_territory out NOCOPY varchar2)
return varchar2 is
l_result varchar2(30);
if (c_update) or (c_commit)
then
validateSession_pragma(p_session_id);
update icx_sessions
set last_connect = sysdate,
counter = counter + 1
where session_id = fnd_session_management.g_session_id;
update icx_sessions
set last_connect = sysdate
where session_id = p_session_id;
update icx_sessions
set last_connect = sysdate
where session_id = p_session_id;
update icx_sessions
set last_connect = sysdate,
counter = counter + 1
where session_id = p_session_id;
procedure Session_update_timeout_pvt(p_session_id number, l_timeout number) is
pragma autonomous_transaction;
update icx_sessions set time_out = l_timeout where session_id = p_session_id;
end Session_update_timeout_pvt;
select LIMIT_CONNECTS, LIMIT_TIME,
FIRST_CONNECT, COUNTER,
nvl(DISABLED_FLAG,'N'),
LAST_CONNECT, user_id,
nvl(p_resp_id,RESPONSIBILITY_ID),
nvl(p_app_resp_id,RESPONSIBILITY_APPLICATION_ID),
TIME_OUT, GUEST, DISTRIBUTED
into n_limit_connects, n_limit_time,
d_first_connect_time,n_counter,
c_disabled_flag,
l_last_connect, l_user_id,
l_resp_id, l_app_resp_id,
l_session_timeout, l_guest, l_dist
from ICX_SESSIONS
where SESSION_ID = p_session_id;
Session_update_timeout_pvt(p_session_id, l_timeout);
Session_update_timeout_pvt(p_session_id, l_timeout);
select b.USER_NAME
into n_id
from icx_sessions a,
fnd_user b
where b.user_id = a.user_id
and a.session_id = p_session_id;
delete ICX_SESSION_ATTRIBUTES
where SESSION_ID = p_session_id
and NAME = l_name;
insert into ICX_SESSION_ATTRIBUTES
(SESSION_ID,NAME,VALUE)
values
(p_session_id,l_name,p_value);
select VALUE
into l_value
from ICX_SESSION_ATTRIBUTES
where SESSION_ID = p_session_id
and NAME = l_name;
delete ICX_SESSION_ATTRIBUTES
where SESSION_ID = p_session_id
and NAME = l_name;
select SESSION_COOKIE_NAME
into l_session_cookie_name
from ICX_PARAMETERS;
procedure updateSessionContext( p_function_name varchar2,
p_function_id number,
p_application_id number,
p_responsibility_id number,
p_security_group_id number,
p_session_id number,
p_transaction_id number)
is
PRAGMA AUTONOMOUS_TRANSACTION; --bug#5030523
select FUNCTION_ID, TYPE
into l_function_id, l_function_type
from FND_FORM_FUNCTIONS
where FUNCTION_NAME = p_function_name;
select FUNCTION_ID, TYPE
into l_function_id, l_function_type
from FND_FORM_FUNCTIONS
where FUNCTION_ID = p_function_id;
select multi_org_flag
into l_multi_org_flag
from fnd_product_groups
where rownum < 2;
Select user_id, time_out
into l_user_id, l_prev_timeout
from icx_sessions
where session_id = p_session_id;
, 'fnd.plsql.FND_SESSION_MANAGEMENT.updateSessionContext.timeout'
, 'Previous timeout : ' || to_char(l_prev_timeout)
|| 'New Timeout ' || to_char (l_new_timeout)
|| ' Resp : ' || to_char(p_responsibility_id)
|| ' Apps id: ' || to_char (p_application_id));
update ICX_SESSIONS
set RESPONSIBILITY_APPLICATION_ID = p_application_id,
RESPONSIBILITY_ID = p_responsibility_id,
SECURITY_GROUP_ID = p_security_group_id,
ORG_ID = l_org_id,
FUNCTION_ID = l_function_id,
FUNCTION_TYPE = l_function_type,
time_out = l_timeout
where SESSION_ID = p_session_id;
update ICX_TRANSACTIONS
set RESPONSIBILITY_APPLICATION_ID = p_application_id,
RESPONSIBILITY_ID = p_responsibility_id,
SECURITY_GROUP_ID = p_security_group_id,
FUNCTION_ID = l_function_id,
FUNCTION_TYPE = l_function_type
where TRANSACTION_ID = p_transaction_id
and SESSION_ID = p_session_id;
end updateSessionContext;
select upper(value)
into requested_val
from v$nls_parameters
where parameter = p_param;
UPDATE icx_sessions
SET
NLS_LANGUAGE=p_language,
DATE_FORMAT_MASK=p_date_format_mask,
LANGUAGE_CODE=p_language_code,
NLS_DATE_LANGUAGE=p_date_language,
NLS_NUMERIC_CHARACTERS=p_numeric_characters,
NLS_SORT=p_sort,
NLS_TERRITORY=p_territory
WHERE session_id = p_session_id;
UPDATE icx_sessions
SET disabled_flag='N',
last_connect=SYSDATE,
counter=0,
first_connect=SYSDATE,
xsid=l_XSID -- Update XSID whenever session is re-established(Session Hijacking)
WHERE session_id = p_session_id;
select fnd_logins_s.nextval
into l_login_id
from sys.dual;
UPDATE icx_sessions
SET disabled_flag='Y'
WHERE
(((SYSDATE-first_connect)*24*60)> threshold);
select login_id into l_login_id
from ICX_SESSIONS
where SESSION_ID = c_session_id;
update icx_sessions
set disabled_flag = 'Y'
where session_id = c_session_id;
update icx_sessions
set disabled_flag = 'Y'
where session_id = c_session_id
and user_id = c_user_id;
select language_code, nls_language
into l_language_code, l_language
from fnd_languages
where installed_flag in ('I', 'B') and
language_code = p_language_code;
select language_code
into l_language_code
from fnd_languages
where nls_language = l_language;
select multi_org_flag
into l_multi_org_flag
from fnd_product_groups
where rownum < 2;
select caching_key into cachingKey
from icx_portlet_customizations
where reference_path = p_reference_path;
select proxy_user_id into user_id from icx_sessions where
session_id = p_session_id;
select user_id, time_out
into l_user_id, l_session_timeout
from icx_sessions
where session_id = p_session_id;
select user_guid into l_user_guid from fnd_user where user_id = l_user_id;
UPDATE icx_sessions
SET last_connect=sysdate-2 -- May need to adjust this value
WHERE mode_code = '115J'
AND session_id <> p_session_id
AND user_id = l_user_id
AND disabled_flag = 'N';