DBA Data[Home] [Help]

APPS.DT_FNDATE dependencies on FND_SESSIONS

Line 12: session date held in fnd_sessions.

8: Name : dt_fndate
9: Author : P.K.Attwood
10: Date Created : 01-OCT-1993
11: Synopsis : This package containes procedures for maintaining the
12: session date held in fnd_sessions.
13: Contents : change_ses_date
14: get_dates
15:
16:

Line 36: fnd_sessions.

32: 30-MAR-1999 P.K.Attwood 110.1 861272 In get_dates corrected setting
33: 115.1 g_sys_date when globals
34: variables have not been set and
35: a row already exists in
36: fnd_sessions.
37: 22-APR-1999 P.K.Attwood 115.2 854170 Rewrote the delete_ses_rows
38: procedure to remove the join
39: between FND_SESSIONS and a v$
40: view.

Line 39: between FND_SESSIONS and a v$

35: a row already exists in
36: fnd_sessions.
37: 22-APR-1999 P.K.Attwood 115.2 854170 Rewrote the delete_ses_rows
38: procedure to remove the join
39: between FND_SESSIONS and a v$
40: view.
41: 13-AUG-1999 P.K.Attwood 115.3 In change_ses_date when no row
42: is found in FND_SESSIONS added
43: raise exception.

Line 42: is found in FND_SESSIONS added

38: procedure to remove the join
39: between FND_SESSIONS and a v$
40: view.
41: 13-AUG-1999 P.K.Attwood 115.3 In change_ses_date when no row
42: is found in FND_SESSIONS added
43: raise exception.
44: 22-JUN-2001 P.K.Attwood 115.4 1841141 To support OPS (Oracle Parallel
45: Server) inside the
46: delete_ses_rows procedure

Line 67: row from fnd_sessions for the current

63: been added which is exact copy of
64: delete_ses_rows. Existing
65: delete_ses_rows has been modified
66: so that all it does is to delete the
67: row from fnd_sessions for the current
68: session. Also the procedure
69: clean_fnd_sessions has been added
70: which does the same thing as
71: delete_old_ses_rows but used by

Line 69: clean_fnd_sessions has been added

65: delete_ses_rows has been modified
66: so that all it does is to delete the
67: row from fnd_sessions for the current
68: session. Also the procedure
69: clean_fnd_sessions has been added
70: which does the same thing as
71: delete_old_ses_rows but used by
72: a concurrent program to do that
73: cleanup periodically.All these

Line 117: from fnd_sessions fs

113: , g_ses_yesterday_date
114: , g_start_of_time
115: , g_end_of_time
116: , g_sys_date
117: from fnd_sessions fs
118: where fs.session_id = userenv('sessionid');
119: exception
120: when no_data_found then
121: --

Line 134: -- Insert row in fnd_sessions as one does not

130: g_start_of_time := to_date('01/01/0001', 'DD/MM/YYYY');
131: g_end_of_time := to_date('31/12/4712', 'DD/MM/YYYY');
132: g_sys_date := g_ses_date;
133: --
134: -- Insert row in fnd_sessions as one does not
135: -- already exist.
136: --
137: insert into fnd_sessions (session_id, effective_date)
138: values (userenv('sessionid'), g_ses_date);

Line 137: insert into fnd_sessions (session_id, effective_date)

133: --
134: -- Insert row in fnd_sessions as one does not
135: -- already exist.
136: --
137: insert into fnd_sessions (session_id, effective_date)
138: values (userenv('sessionid'), g_ses_date);
139: --
140: v_commit := TRUE;
141: end;

Line 171: -- Update row in fnd_sessions

167: no_row_need_to_insert exception;
168: begin
169: begin
170: --
171: -- Update row in fnd_sessions
172: --
173: v_commit := FALSE;
174: --
175: update fnd_sessions

Line 175: update fnd_sessions

171: -- Update row in fnd_sessions
172: --
173: v_commit := FALSE;
174: --
175: update fnd_sessions
176: set effective_date = trunc(p_ses_date)
177: where session_id = userenv('sessionid');
178: --
179: -- When no row is found in FND_SESSIONS

Line 179: -- When no row is found in FND_SESSIONS

175: update fnd_sessions
176: set effective_date = trunc(p_ses_date)
177: where session_id = userenv('sessionid');
178: --
179: -- When no row is found in FND_SESSIONS
180: -- raise an exception to insert a row.
181: --
182: if sql%rowcount = 0 then
183: raise no_row_need_to_insert;

Line 199: -- Insert row in fnd_sessions as one does not

195: g_start_of_time := to_date('01/01/0001', 'DD/MM/YYYY');
196: g_end_of_time := to_date('31/12/4712', 'DD/MM/YYYY');
197: g_sys_date := trunc(sysdate);
198: --
199: -- Insert row in fnd_sessions as one does not
200: -- already exist.
201: --
202: insert into fnd_sessions (session_id, effective_date)
203: values (userenv('sessionid'), g_ses_date);

Line 202: insert into fnd_sessions (session_id, effective_date)

198: --
199: -- Insert row in fnd_sessions as one does not
200: -- already exist.
201: --
202: insert into fnd_sessions (session_id, effective_date)
203: values (userenv('sessionid'), g_ses_date);
204: --
205: v_commit := TRUE;
206: end;

Line 246: delete from fnd_sessions f

242: --
243: -- Declare exceptions to be handled
244: --
245: begin
246: delete from fnd_sessions f
247: where session_id = userenv('sessionid');
248: p_commit := 1;
249: if(SQL%ROWCOUNT = 0) then
250: p_commit := 0 ;

Line 263: -- will insert a row into fnd_sessions. (It is not possible to

259: procedure init_dates is
260: begin
261: --
262: -- Initializes globals to NULL to ensure first call to get_dates
263: -- will insert a row into fnd_sessions. (It is not possible to
264: -- commit here, so don't insert the row into fnd_sessions.)
265: --
266: g_ses_date := NULL;
267: g_ses_yesterday_date := NULL;

Line 264: -- commit here, so don't insert the row into fnd_sessions.)

260: begin
261: --
262: -- Initializes globals to NULL to ensure first call to get_dates
263: -- will insert a row into fnd_sessions. (It is not possible to
264: -- commit here, so don't insert the row into fnd_sessions.)
265: --
266: g_ses_date := NULL;
267: g_ses_yesterday_date := NULL;
268: g_start_of_time := NULL;

Line 281: from fnd_sessions;

277: -- Declare cursors
278: --
279: cursor csr_fnd_ses is
280: select session_id
281: from fnd_sessions;
282: --
283: -- To fix Bug 1841141 the v$ view in the
284: -- following cursor was changed to gv$. Inspite of
285: -- comments in the RDBMS manual it should be safe

Line 303: TYPE sessionId IS TABLE OF fnd_sessions.session_id%TYPE INDEX BY BINARY_INTEGER;

299: --
300: -- Local variables
301: --
302: v_exists varchar2(30);
303: TYPE sessionId IS TABLE OF fnd_sessions.session_id%TYPE INDEX BY BINARY_INTEGER;
304: fndSessionId sessionId;
305: gvSessionId sessionId;
306: delSessionId sessionId;
307: l_session_exists number := 0;

Line 316: -- delete from fnd_sessions f

312: -- Bug 854170: Changed original delete statement as joins
313: -- between delete a v$ view and a standard table are not
314: -- supported by the RDBMS.
315: -- Original like code:
316: -- delete from fnd_sessions f
317: -- where not exists (select null
318: -- from v$session s
319: -- where s.audsid = f.session_id);
320: -- p_commit := 1;

Line 324: -- the FND_SESSIONS delete logic.

320: -- p_commit := 1;
321: --
322: -- Attempt to obtain an exclusive lock on the DateTrack date
323: -- prompts table. This table lock acts as a gatekeeper to
324: -- the FND_SESSIONS delete logic.
325: --
326: -- When this process obtains the table lock then it should go
327: -- on to remove old session rows from FND_SESSIONS. i.e. Where
328: -- there is no corresponding row in GV$SESSION. When this

Line 327: -- on to remove old session rows from FND_SESSIONS. i.e. Where

323: -- prompts table. This table lock acts as a gatekeeper to
324: -- the FND_SESSIONS delete logic.
325: --
326: -- When this process obtains the table lock then it should go
327: -- on to remove old session rows from FND_SESSIONS. i.e. Where
328: -- there is no corresponding row in GV$SESSION. When this
329: -- process does not obtain the table lock it indicates that
330: -- another process must be performing the FND_SESSIONS delete
331: -- logic. So this session does not need to do anything extra.

Line 330: -- another process must be performing the FND_SESSIONS delete

326: -- When this process obtains the table lock then it should go
327: -- on to remove old session rows from FND_SESSIONS. i.e. Where
328: -- there is no corresponding row in GV$SESSION. When this
329: -- process does not obtain the table lock it indicates that
330: -- another process must be performing the FND_SESSIONS delete
331: -- logic. So this session does not need to do anything extra.
332: --
333: begin
334: lock table dt_date_prompts_tl in exclusive mode nowait;

Line 345: -- For each row in FND_SESSIONS see if a corresponding

341: open csr_gv_ses;
342: fetch csr_gv_ses BULK COLLECT INTO gvSessionId;
343: close csr_gv_ses;
344: --
345: -- For each row in FND_SESSIONS see if a corresponding
346: -- row exists in GV$SESSION. When there is no matching
347: -- row delete the FND_SESSIONS row.
348: --
349: open csr_fnd_ses;

Line 347: -- row delete the FND_SESSIONS row.

343: close csr_gv_ses;
344: --
345: -- For each row in FND_SESSIONS see if a corresponding
346: -- row exists in GV$SESSION. When there is no matching
347: -- row delete the FND_SESSIONS row.
348: --
349: open csr_fnd_ses;
350: loop
351: fetch csr_fnd_ses BULK COLLECT INTO fndSessionId limit bulkFetchRowLimit;

Line 371: delete from fnd_sessions where session_id = delSessionId(l);

367: end loop;
368: close csr_fnd_ses;
369: --
370: forall l in 1..delSessionId.count
371: delete from fnd_sessions where session_id = delSessionId(l);
372: --
373: p_commit := 1;
374: exception
375: when Resource_Busy then

Line 380: -- performing the FND_SESSIONS delete logic.

376: --
377: -- If this point is reached then the table lock
378: -- has not been obtained by this process. This
379: -- means another process must be currently
380: -- performing the FND_SESSIONS delete logic.
381: -- So this process does not need to do anything
382: -- with the FND_SESSIONS table.
383: --
384: p_commit := 0;

Line 382: -- with the FND_SESSIONS table.

378: -- has not been obtained by this process. This
379: -- means another process must be currently
380: -- performing the FND_SESSIONS delete logic.
381: -- So this process does not need to do anything
382: -- with the FND_SESSIONS table.
383: --
384: p_commit := 0;
385: end;
386: end delete_old_ses_rows;

Line 390: procedure clean_fnd_sessions ( errbuf out nocopy varchar2,

386: end delete_old_ses_rows;
387: --
388: --
389: --
390: procedure clean_fnd_sessions ( errbuf out nocopy varchar2,
391: retcode out nocopy varchar2 ) is
392: l_commit_flag number;
393: begin
394: delete_old_ses_rows(l_commit_flag);

Line 398: end clean_fnd_sessions;

394: delete_old_ses_rows(l_commit_flag);
395: if l_commit_flag = 1 then
396: commit;
397: end if;
398: end clean_fnd_sessions;
399: --
400: end dt_fndate;