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 111: from fnd_sessions fs

107: , g_ses_yesterday_date
108: , g_start_of_time
109: , g_end_of_time
110: , g_sys_date
111: from fnd_sessions fs
112: where fs.session_id = userenv('sessionid');
113: exception
114: when no_data_found then
115: --

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

124: g_start_of_time := to_date('01/01/0001', 'DD/MM/YYYY');
125: g_end_of_time := to_date('31/12/4712', 'DD/MM/YYYY');
126: g_sys_date := g_ses_date;
127: --
128: -- Insert row in fnd_sessions as one does not
129: -- already exist.
130: --
131: insert into fnd_sessions (session_id, effective_date)
132: values (userenv('sessionid'), g_ses_date);

Line 131: insert into fnd_sessions (session_id, effective_date)

127: --
128: -- Insert row in fnd_sessions as one does not
129: -- already exist.
130: --
131: insert into fnd_sessions (session_id, effective_date)
132: values (userenv('sessionid'), g_ses_date);
133: --
134: v_commit := TRUE;
135: end;

Line 165: -- Update row in fnd_sessions

161: no_row_need_to_insert exception;
162: begin
163: begin
164: --
165: -- Update row in fnd_sessions
166: --
167: v_commit := FALSE;
168: --
169: update fnd_sessions

Line 169: update fnd_sessions

165: -- Update row in fnd_sessions
166: --
167: v_commit := FALSE;
168: --
169: update fnd_sessions
170: set effective_date = trunc(p_ses_date)
171: where session_id = userenv('sessionid');
172: --
173: -- When no row is found in FND_SESSIONS

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

169: update fnd_sessions
170: set effective_date = trunc(p_ses_date)
171: where session_id = userenv('sessionid');
172: --
173: -- When no row is found in FND_SESSIONS
174: -- raise an exception to insert a row.
175: --
176: if sql%rowcount = 0 then
177: raise no_row_need_to_insert;

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

189: g_start_of_time := to_date('01/01/0001', 'DD/MM/YYYY');
190: g_end_of_time := to_date('31/12/4712', 'DD/MM/YYYY');
191: g_sys_date := trunc(sysdate);
192: --
193: -- Insert row in fnd_sessions as one does not
194: -- already exist.
195: --
196: insert into fnd_sessions (session_id, effective_date)
197: values (userenv('sessionid'), g_ses_date);

Line 196: insert into fnd_sessions (session_id, effective_date)

192: --
193: -- Insert row in fnd_sessions as one does not
194: -- already exist.
195: --
196: insert into fnd_sessions (session_id, effective_date)
197: values (userenv('sessionid'), g_ses_date);
198: --
199: v_commit := TRUE;
200: end;

Line 240: delete from fnd_sessions f

236: --
237: -- Declare exceptions to be handled
238: --
239: begin
240: delete from fnd_sessions f
241: where session_id = userenv('sessionid');
242: p_commit := 1;
243: if(SQL%ROWCOUNT = 0) then
244: p_commit := 0 ;

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

253: procedure init_dates is
254: begin
255: --
256: -- Initializes globals to NULL to ensure first call to get_dates
257: -- will insert a row into fnd_sessions. (It is not possible to
258: -- commit here, so don't insert the row into fnd_sessions.)
259: --
260: g_ses_date := NULL;
261: g_ses_yesterday_date := NULL;

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

254: begin
255: --
256: -- Initializes globals to NULL to ensure first call to get_dates
257: -- will insert a row into fnd_sessions. (It is not possible to
258: -- commit here, so don't insert the row into fnd_sessions.)
259: --
260: g_ses_date := NULL;
261: g_ses_yesterday_date := NULL;
262: g_start_of_time := NULL;

Line 275: from fnd_sessions;

271: -- Declare cursors
272: --
273: cursor csr_fnd_ses is
274: select session_id
275: from fnd_sessions;
276: --
277: -- To fix Bug 1841141 the v$ view in the
278: -- following cursor was changed to gv$. Inspite of
279: -- comments in the RDBMS manual it should be safe

Line 304: -- delete from fnd_sessions f

300: -- Bug 854170: Changed original delete statement as joins
301: -- between delete a v$ view and a standard table are not
302: -- supported by the RDBMS.
303: -- Original like code:
304: -- delete from fnd_sessions f
305: -- where not exists (select null
306: -- from v$session s
307: -- where s.audsid = f.session_id);
308: -- p_commit := 1;

Line 312: -- the FND_SESSIONS delete logic.

308: -- p_commit := 1;
309: --
310: -- Attempt to obtain an exclusive lock on the DateTrack date
311: -- prompts table. This table lock acts as a gatekeeper to
312: -- the FND_SESSIONS delete logic.
313: --
314: -- When this process obtains the table lock then it should go
315: -- on to remove old session rows from FND_SESSIONS. i.e. Where
316: -- there is no corresponding row in GV$SESSION. When this

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

311: -- prompts table. This table lock acts as a gatekeeper to
312: -- the FND_SESSIONS delete logic.
313: --
314: -- When this process obtains the table lock then it should go
315: -- on to remove old session rows from FND_SESSIONS. i.e. Where
316: -- there is no corresponding row in GV$SESSION. When this
317: -- process does not obtain the table lock it indicates that
318: -- another process must be performing the FND_SESSIONS delete
319: -- logic. So this session does not need to do anything extra.

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

314: -- When this process obtains the table lock then it should go
315: -- on to remove old session rows from FND_SESSIONS. i.e. Where
316: -- there is no corresponding row in GV$SESSION. When this
317: -- process does not obtain the table lock it indicates that
318: -- another process must be performing the FND_SESSIONS delete
319: -- logic. So this session does not need to do anything extra.
320: --
321: begin
322: lock table dt_date_prompts_tl in exclusive mode nowait;

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

323: --
324: -- If this point is reached then the table lock
325: -- has been obtained by this process.
326: --
327: -- For each row in FND_SESSIONS see if a corresponding
328: -- row exists in GV$SESSION. When there is no matching
329: -- row delete the FND_SESSIONS row.
330: --
331: for l_fnd_ses in csr_fnd_ses loop

Line 329: -- row delete the FND_SESSIONS row.

325: -- has been obtained by this process.
326: --
327: -- For each row in FND_SESSIONS see if a corresponding
328: -- row exists in GV$SESSION. When there is no matching
329: -- row delete the FND_SESSIONS row.
330: --
331: for l_fnd_ses in csr_fnd_ses loop
332: --
333: open csr_v_ses(l_fnd_ses.session_id);

Line 336: delete from fnd_sessions f

332: --
333: open csr_v_ses(l_fnd_ses.session_id);
334: fetch csr_v_ses into v_exists;
335: if csr_v_ses%notfound then
336: delete from fnd_sessions f
337: where session_id = l_fnd_ses.session_id;
338: end if;
339: close csr_v_ses;
340: --

Line 350: -- performing the FND_SESSIONS delete logic.

346: --
347: -- If this point is reached then the table lock
348: -- has not been obtained by this process. This
349: -- means another process must be currently
350: -- performing the FND_SESSIONS delete logic.
351: -- So this process does not need to do anything
352: -- with the FND_SESSIONS table.
353: --
354: p_commit := 0;

Line 352: -- with the FND_SESSIONS table.

348: -- has not been obtained by this process. This
349: -- means another process must be currently
350: -- performing the FND_SESSIONS delete logic.
351: -- So this process does not need to do anything
352: -- with the FND_SESSIONS table.
353: --
354: p_commit := 0;
355: end;
356: end delete_old_ses_rows;

Line 360: procedure clean_fnd_sessions ( errbuf out nocopy varchar2,

356: end delete_old_ses_rows;
357: --
358: --
359: --
360: procedure clean_fnd_sessions ( errbuf out nocopy varchar2,
361: retcode out nocopy varchar2 ) is
362: l_commit_flag number;
363: begin
364: delete_old_ses_rows(l_commit_flag);

Line 368: end clean_fnd_sessions;

364: delete_old_ses_rows(l_commit_flag);
365: if l_commit_flag = 1 then
366: commit;
367: end if;
368: end clean_fnd_sessions;
369: --
370: end dt_fndate;