DBA Data[Home] [Help]

APPS.AD_CONC_SESSION_LOCKS dependencies on AD_SESSIONS

Line 153: update ad_sessions set

149: get_admin_lock(dummy_number);
150: --
151: --
152: /* Update the process_id and set the STATUS to 'ACTIVE' */
153: update ad_sessions set
154: OS_PROCESS_ID=process_id,
155: STATUS='ACTIVE',
156: LAST_UPDATE_DATE=sysdate,
157: APPL_TOP_PATH=appltop_path,

Line 170: /* Get the ANY_CHANGE_WHILE_INACTIVE_FLAG for this session from ad_sessions */

166: where
167: SESSION_ID=sess_id;
168: --
169: --
170: /* Get the ANY_CHANGE_WHILE_INACTIVE_FLAG for this session from ad_sessions */
171: select nvl(ANY_CHANGE_WHILE_INACTIVE_FLAG,'N')
172: into inactive_flag
173: from ad_sessions
174: where session_id=sess_id;

Line 173: from ad_sessions

169: --
170: /* Get the ANY_CHANGE_WHILE_INACTIVE_FLAG for this session from ad_sessions */
171: select nvl(ANY_CHANGE_WHILE_INACTIVE_FLAG,'N')
172: into inactive_flag
173: from ad_sessions
174: where session_id=sess_id;
175: --
176: --
177: --

Line 216: SELECT count(*) INTO session_exists from ad_sessions

212: end if;
213:
214: --
215: --
216: SELECT count(*) INTO session_exists from ad_sessions
217: where session_id=sess_id;
218: --
219: if session_exists > 1 then
220: -- should not happen but in case the primary key index is dropped

Line 222: 'Fatal error Duplicate session_id in AD_SESSIONS: set_session_info()');

218: --
219: if session_exists > 1 then
220: -- should not happen but in case the primary key index is dropped
221: raise_application_error(-20000,
222: 'Fatal error Duplicate session_id in AD_SESSIONS: set_session_info()');
223: end if;
224:
225:
226: if session_exists = 1 then

Line 231: -- can occur when a row was created in ad_sessions table and failed before

227: -- if a row exists with the same session_id then
228: -- check if it is the same utility, APPL_TOP and start_date
229: -- as the one we are trying to insert
230: -- if they same then need not insert the record again. This situation
231: -- can occur when a row was created in ad_sessions table and failed before
232: -- updating the session_info_file.
233: -- In the restart case we need to just update the STATUS column and
234: -- process_id column for that row in the ad_sessions
235: select

Line 234: -- process_id column for that row in the ad_sessions

230: -- if they same then need not insert the record again. This situation
231: -- can occur when a row was created in ad_sessions table and failed before
232: -- updating the session_info_file.
233: -- In the restart case we need to just update the STATUS column and
234: -- process_id column for that row in the ad_sessions
235: select
236: SESSION_ID,UTILITY_NAME,APPL_TOP_ID,
237: TOPDIR,STATUS,PRIORITY,
238: OS_USER_NAME

Line 243: from ad_sessions

239: into
240: exst_session_id,exst_utility_name,exst_appl_top_id,
241: exst_topdir,exst_status,exst_priority,
242: exst_os_user_name
243: from ad_sessions
244: where
245: session_id=sess_id;
246: --
247: if exst_session_id = sess_id and

Line 254: update AD_SESSIONS set status='ACTIVE'

250: exst_topdir = p_topdir and
251: exst_priority = priority_value and
252: exst_os_user_name = osuser_name then
253: -- if exists then just update the sttus to ACTIVE
254: update AD_SESSIONS set status='ACTIVE'
255: where session_id=sess_id;
256: else
257: raise_application_error(-20000,
258: 'Fatal error Duplicate session_id in AD_SESSIONS: set_session_info()');

Line 258: 'Fatal error Duplicate session_id in AD_SESSIONS: set_session_info()');

254: update AD_SESSIONS set status='ACTIVE'
255: where session_id=sess_id;
256: else
257: raise_application_error(-20000,
258: 'Fatal error Duplicate session_id in AD_SESSIONS: set_session_info()');
259: end if;
260: else
261: -- if here this means that a new row has to be inserted
262: INSERT INTO AD_SESSIONS

Line 262: INSERT INTO AD_SESSIONS

258: 'Fatal error Duplicate session_id in AD_SESSIONS: set_session_info()');
259: end if;
260: else
261: -- if here this means that a new row has to be inserted
262: INSERT INTO AD_SESSIONS
263: (
264: SESSION_ID,UTILITY_NAME,APPL_TOP_ID,
265: INVOKDIR,STATUS,PRIORITY,
266: OS_PROCESS_ID,OS_USER_NAME,

Line 318: update AD_SESSIONS set

314: --
315: --
316: /* Update the STATUS to 'INACTIVE' */
317: --
318: update AD_SESSIONS set
319: STATUS='INACTIVE',
320: LAST_UPDATE_DATE=SYSDATE
321: where
322: SESSION_ID=sess_id;

Line 532: -- BASE_ERROR + 6 --> Reading ad_sessions failed

528: -- BASE_ERROR + 3 --> No conflicting sessions found for root
529: -- session id.
530: -- BASE_ERROR + 4 --> Invalid Argument
531: -- BASE_ERROR + 5 --> check_compatibility failed
532: -- BASE_ERROR + 6 --> Reading ad_sessions failed
533: -- BASE_ERROR + 7 --> Unhandled exception
534: -- BASE_ERROR + 8 --> Logic error,tree nodes are not proper
535: -- Purpose
536: -- Deadlocks are detected in this procedure. See the various return

Line 681: select priority into child_priority from ad_sessions

677: */
678: if (deadlock_node_index <> 0) then
679: child_node := session_list(deadlock_node_index);
680: begin
681: select priority into child_priority from ad_sessions
682: where session_id = child_node; /* Child node */
683: exception
684: when others then
685: error_code := BASE_ERROR + 6; /* Error, reading ad_sessions */

Line 685: error_code := BASE_ERROR + 6; /* Error, reading ad_sessions */

681: select priority into child_priority from ad_sessions
682: where session_id = child_node; /* Child node */
683: exception
684: when others then
685: error_code := BASE_ERROR + 6; /* Error, reading ad_sessions */
686: raise_application_error(-20000,
687: 'Fatal error in do_deadlock_detection() - '||
688: to_char(error_code) ||
689: substr(sqlerrm, 1, 100));

Line 704: select priority into parent_priority from ad_sessions

700: parent_node := session_list(session_tree(deadlock_node_index));
701: end if;
702:
703: begin
704: select priority into parent_priority from ad_sessions
705: where session_id = parent_node;
706: exception
707: when others then
708: error_code := BASE_ERROR + 6; /* Error, reading ad_sessions */

Line 708: error_code := BASE_ERROR + 6; /* Error, reading ad_sessions */

704: select priority into parent_priority from ad_sessions
705: where session_id = parent_node;
706: exception
707: when others then
708: error_code := BASE_ERROR + 6; /* Error, reading ad_sessions */
709: raise_application_error(-20000,
710: 'Fatal error in do_deadlock_detection() - '||
711: to_char(error_code) ||
712: substr(sqlerrm, 1, 100));

Line 783: -- BASE_ERROR + 7 --> Exception, reading ad_sessions.

779: -- rows have done_flag='Y' and others
780: -- have done_flag='N')
781: -- It shouldn't happen.
782: -- BASE_ERROR + 6 --> Exception,reading ad_planned_res_lock
783: -- BASE_ERROR + 7 --> Exception, reading ad_sessions.
784: -- BASE_ERROR + 8 --> Exception, inserting row in
785: -- ad_working_res_locks.
786: -- BASE_ERROR + 9 --> Exception updating ad_sessions.
787: -- BASE_ERROR + 10 --> Error, do_compatibility check failed

Line 786: -- BASE_ERROR + 9 --> Exception updating ad_sessions.

782: -- BASE_ERROR + 6 --> Exception,reading ad_planned_res_lock
783: -- BASE_ERROR + 7 --> Exception, reading ad_sessions.
784: -- BASE_ERROR + 8 --> Exception, inserting row in
785: -- ad_working_res_locks.
786: -- BASE_ERROR + 9 --> Exception updating ad_sessions.
787: -- BASE_ERROR + 10 --> Error, do_compatibility check failed
788: -- BASE_ERROR + 11 --> Stage_code = 'ACQUIRE_HELD' and
789: -- compatibility check -> incompatibility
790: -- BASE_ERROR + 12 --> Exception, updating ad_sessions,

Line 790: -- BASE_ERROR + 12 --> Exception, updating ad_sessions,

786: -- BASE_ERROR + 9 --> Exception updating ad_sessions.
787: -- BASE_ERROR + 10 --> Error, do_compatibility check failed
788: -- BASE_ERROR + 11 --> Stage_code = 'ACQUIRE_HELD' and
789: -- compatibility check -> incompatibility
790: -- BASE_ERROR + 12 --> Exception, updating ad_sessions,
791: -- ad_working_res_locks
792: -- BASE_ERROR + 13 --> Exception, reading ad_sessions
793: -- BASE_ERROR + 14 --> Adctrl says to quit
794: -- BASE_ERROR + 15 --> Exception, updating ad_sessions,

Line 792: -- BASE_ERROR + 13 --> Exception, reading ad_sessions

788: -- BASE_ERROR + 11 --> Stage_code = 'ACQUIRE_HELD' and
789: -- compatibility check -> incompatibility
790: -- BASE_ERROR + 12 --> Exception, updating ad_sessions,
791: -- ad_working_res_locks
792: -- BASE_ERROR + 13 --> Exception, reading ad_sessions
793: -- BASE_ERROR + 14 --> Adctrl says to quit
794: -- BASE_ERROR + 15 --> Exception, updating ad_sessions,
795: -- ad_working_res_locks
796: -- BASE_ERROR + 16 --> Error calling do_deadlock_detection.

Line 794: -- BASE_ERROR + 15 --> Exception, updating ad_sessions,

790: -- BASE_ERROR + 12 --> Exception, updating ad_sessions,
791: -- ad_working_res_locks
792: -- BASE_ERROR + 13 --> Exception, reading ad_sessions
793: -- BASE_ERROR + 14 --> Adctrl says to quit
794: -- BASE_ERROR + 15 --> Exception, updating ad_sessions,
795: -- ad_working_res_locks
796: -- BASE_ERROR + 16 --> Error calling do_deadlock_detection.
797: -- BASE_ERROR + 17 --> Exception, updating ad_sessions.
798: -- BASE_ERROR + 18 --> Exception, updating ad_sessions,

Line 797: -- BASE_ERROR + 17 --> Exception, updating ad_sessions.

793: -- BASE_ERROR + 14 --> Adctrl says to quit
794: -- BASE_ERROR + 15 --> Exception, updating ad_sessions,
795: -- ad_working_res_locks
796: -- BASE_ERROR + 16 --> Error calling do_deadlock_detection.
797: -- BASE_ERROR + 17 --> Exception, updating ad_sessions.
798: -- BASE_ERROR + 18 --> Exception, updating ad_sessions,
799: -- ad_working_res_locks
800: -- BASE_ERROR + 19 --> Exception, updating ad_sessions,
801: -- ad_working_res_locks

Line 798: -- BASE_ERROR + 18 --> Exception, updating ad_sessions,

794: -- BASE_ERROR + 15 --> Exception, updating ad_sessions,
795: -- ad_working_res_locks
796: -- BASE_ERROR + 16 --> Error calling do_deadlock_detection.
797: -- BASE_ERROR + 17 --> Exception, updating ad_sessions.
798: -- BASE_ERROR + 18 --> Exception, updating ad_sessions,
799: -- ad_working_res_locks
800: -- BASE_ERROR + 19 --> Exception, updating ad_sessions,
801: -- ad_working_res_locks
802: -- BASE_ERROR + 20 --> Unhandled exception

Line 800: -- BASE_ERROR + 19 --> Exception, updating ad_sessions,

796: -- BASE_ERROR + 16 --> Error calling do_deadlock_detection.
797: -- BASE_ERROR + 17 --> Exception, updating ad_sessions.
798: -- BASE_ERROR + 18 --> Exception, updating ad_sessions,
799: -- ad_working_res_locks
800: -- BASE_ERROR + 19 --> Exception, updating ad_sessions,
801: -- ad_working_res_locks
802: -- BASE_ERROR + 20 --> Unhandled exception
803: -- BASE_ERROR + 21 --> Error, Current Mode = X and Requested
804: -- mode = S in Promotion

Line 924: /* Read priority and status from ad_sessions table */

920: goto acquire_error;
921: end;
922: end if;
923:
924: /* Read priority and status from ad_sessions table */
925: begin
926: select priority, status into x_priority, x_status
927: from ad_sessions where session_id = x_session_id;
928: exception

Line 927: from ad_sessions where session_id = x_session_id;

923:
924: /* Read priority and status from ad_sessions table */
925: begin
926: select priority, status into x_priority, x_status
927: from ad_sessions where session_id = x_session_id;
928: exception
929: when others then
930: error_message := substr(sqlerrm, 1, 100);
931: error_code := BASE_ERROR + 7; /* Error, reading

Line 932: * ad_sessions */

928: exception
929: when others then
930: error_message := substr(sqlerrm, 1, 100);
931: error_code := BASE_ERROR + 7; /* Error, reading
932: * ad_sessions */
933: goto acquire_error;
934: end;
935:
936: if (acquire_admin_flag = 1) then

Line 1011: update ad_sessions set wait_loop_time = 0

1007: end;
1008:
1009: /* Reset wait loop time */
1010: begin
1011: update ad_sessions set wait_loop_time = 0
1012: where session_id = x_session_id;
1013: commit work;
1014: x_wait_loop_time := 0;
1015: exception

Line 1020: * ad_sessions */

1016: when others then
1017: rollback;
1018: error_message := substr(sqlerrm, 1, 100);
1019: error_code := BASE_ERROR + 9; /* Error, updating
1020: * ad_sessions */
1021: goto acquire_error;
1022: end;
1023: else
1024: begin

Line 1025: select wait_loop_time into x_wait_loop_time from ad_sessions

1021: goto acquire_error;
1022: end;
1023: else
1024: begin
1025: select wait_loop_time into x_wait_loop_time from ad_sessions
1026: where session_id = x_session_id;
1027: exception
1028: when others then
1029: rollback;

Line 1032: * ad_sessions */

1028: when others then
1029: rollback;
1030: error_message := substr(sqlerrm, 1, 100);
1031: error_code := BASE_ERROR + 23; /* Error, reading
1032: * ad_sessions */
1033: goto acquire_error;
1034: end;
1035: end if;
1036:

Line 1070: update ad_sessions set status = 'INACTIVE'

1066: /* Check the stage_code for ACQUIRE_HELD stage */
1067: if (x_stage_code = 'ACQUIRE_HELD') then
1068: /* de-activate session-row in DB */
1069: begin
1070: update ad_sessions set status = 'INACTIVE'
1071: where session_id = x_session_id;
1072: update ad_working_res_locks set session_status = 'INACTIVE'
1073: where session_id = x_session_id;
1074: commit work;

Line 1088: /* Read control_code from ad_sessions */

1084: end;
1085:
1086: /* stage_code <> ACQUIRE_HELD */
1087: else
1088: /* Read control_code from ad_sessions */
1089: begin
1090: select control_code into x_control_code from ad_sessions
1091: where session_id = x_session_id;
1092: exception

Line 1090: select control_code into x_control_code from ad_sessions

1086: /* stage_code <> ACQUIRE_HELD */
1087: else
1088: /* Read control_code from ad_sessions */
1089: begin
1090: select control_code into x_control_code from ad_sessions
1091: where session_id = x_session_id;
1092: exception
1093: when others then
1094: error_message := substr(sqlerrm, 1, 100);

Line 1095: error_code := BASE_ERROR + 13;/* Error,reading ad_sessions*/

1091: where session_id = x_session_id;
1092: exception
1093: when others then
1094: error_message := substr(sqlerrm, 1, 100);
1095: error_code := BASE_ERROR + 13;/* Error,reading ad_sessions*/
1096: goto acquire_error;
1097: end;
1098:
1099: /* Adctrl says to abort -> control_code is 'Q' ? */

Line 1102: /* Wipe out ad_sessions.control_code and

1098:
1099: /* Adctrl says to abort -> control_code is 'Q' ? */
1100: if (x_control_code = 'Q') then
1101:
1102: /* Wipe out ad_sessions.control_code and
1103: * de-activate session-row in DB
1104: */
1105: begin
1106: update ad_sessions set control_code = null,

Line 1106: update ad_sessions set control_code = null,

1102: /* Wipe out ad_sessions.control_code and
1103: * de-activate session-row in DB
1104: */
1105: begin
1106: update ad_sessions set control_code = null,
1107: status = 'INACTIVE'
1108: where session_id = x_session_id;
1109: update ad_working_res_locks set session_status = 'INACTIVE'
1110: where session_id = x_session_id;

Line 1119: * ad_sessions, ad_working_res_locks */

1115: when others then
1116: rollback;
1117: error_message := substr(sqlerrm, 1, 100);
1118: error_code := BASE_ERROR + 15; /* Error, updating
1119: * ad_sessions, ad_working_res_locks */
1120: goto acquire_error;
1121: end;
1122:
1123: /* control_code is not set to 'Q' */

Line 1140: update ad_sessions set status = 'INACTIVE'

1136: */
1137: if (error_code = 1) then
1138: /* De-activate session-row in DB */
1139: begin
1140: update ad_sessions set status = 'INACTIVE'
1141: where session_id = x_session_id;
1142: update ad_working_res_locks set session_status = 'INACTIVE'
1143: where session_id = x_session_id;
1144: commit work;

Line 1152: * ad_sessions, ad_working_res_locks */

1148: when others then
1149: rollback;
1150: error_message := substr(sqlerrm, 1, 100);
1151: error_code := BASE_ERROR + 17; /* Error, updating
1152: * ad_sessions, ad_working_res_locks */
1153: goto acquire_error;
1154: end;
1155: end if;
1156:

Line 1179: update ad_sessions set wait_loop_time = x_wait_loop_time

1175:
1176: /* Increment wait loop time */
1177: x_wait_loop_time := x_wait_loop_time + sleep_duration;
1178: begin
1179: update ad_sessions set wait_loop_time = x_wait_loop_time
1180: where session_id = x_session_id;
1181: commit work;
1182: exception
1183: when others then

Line 1186: * ad_sessions */

1182: exception
1183: when others then
1184: error_message := substr(sqlerrm, 1, 100);
1185: error_code := BASE_ERROR + 18; /* Error, updating
1186: * ad_sessions */
1187: goto acquire_error;
1188: end;
1189: end if;
1190: end if;

Line 1201: update ad_sessions

1197: where session_id = x_session_id and
1198: lock_mode = 'X';
1199:
1200: if (x_mode_count > 0) then
1201: update ad_sessions
1202: set any_change_while_inactive_flag = 'Y',
1203: locks_overridden_by = x_session_id
1204: where
1205: nvl(any_change_while_inactive_flag,'N') <> 'Y' and

Line 1326: update ad_sessions set wait_loop_time = 0

1322:
1323: update ad_planned_res_locks set done_flag = 'N' where
1324: session_id = x_session_id and stage_code = x_stage_code;
1325:
1326: update ad_sessions set wait_loop_time = 0
1327: where session_id = x_session_id;
1328:
1329: commit work;
1330: exception

Line 1646: INSERT INTO AD_SESSIONS_HISTORY

1642: --
1643: --
1644: p_error_code := 0;
1645:
1646: INSERT INTO AD_SESSIONS_HISTORY
1647: ( SESSION_ID, UTILITY_NAME, APPL_TOP_PATH,
1648: RUN_ON_NODE, INVOKDIR, STATUS, PRIORITY,
1649: CONTEXT_INFO, ANY_CHANGE_WHILE_INACTIVE_FLAG, LOCKS_OVERRIDDEN_BY,
1650: JS_TOTAL_JOBS, JS_COMPLETED_JOBS, JS_REMAINING_JOBS,

Line 1662: AD_SESSIONS

1658: JS_TOTAL_JOBS, JS_COMPLETED_JOBS,JS_REMAINING_JOBS,
1659: p_complete_status,
1660: START_DATE,SYSDATE, CREATION_DATE, LAST_UPDATE_DATE, TOPDIR
1661: FROM
1662: AD_SESSIONS
1663: WHERE
1664: SESSION_ID=p_sess_id;
1665:
1666: row_count := sql%rowcount;

Line 1672: DELETE FROM AD_SESSIONS

1668: p_error_code := 1;
1669: end if;
1670: --
1671: --
1672: DELETE FROM AD_SESSIONS
1673: WHERE session_id = p_sess_id;
1674: --
1675: --
1676: INSERT INTO AD_SESSION_TASKS_HISTORY