DBA Data[Home] [Help]

APPS.FND_DEBUG dependencies on FND_DEBUG

Line 1: package body FND_DEBUG as

1: package body FND_DEBUG as
2: /* $Header: AFCPDWBB.pls 120.2 2005/09/30 10:42:13 rckalyan ship $ */
3:
4: --
5: -- PUBLIC VARIABLES

Line 19: ( enable_routine FND_DEBUG_OPTION_VALUES.enable_routine%TYPE,

15: P_RULES rules_tab_type;
16: RULEC number := 0;
17:
18: TYPE rule_select_rec is record
19: ( enable_routine FND_DEBUG_OPTION_VALUES.enable_routine%TYPE,
20: disable_routine FND_DEBUG_OPTION_VALUES.disable_routine%TYPE,
21: debug_option_name FND_DEBUG_RULE_OPTIONS.debug_option_name%TYPE,
22: debug_option_value FND_DEBUG_RULE_OPTIONS.debug_option_value%TYPE,
23: debug_rule_id FND_DEBUG_RULES.debug_rule_id%TYPE,

Line 20: disable_routine FND_DEBUG_OPTION_VALUES.disable_routine%TYPE,

16: RULEC number := 0;
17:
18: TYPE rule_select_rec is record
19: ( enable_routine FND_DEBUG_OPTION_VALUES.enable_routine%TYPE,
20: disable_routine FND_DEBUG_OPTION_VALUES.disable_routine%TYPE,
21: debug_option_name FND_DEBUG_RULE_OPTIONS.debug_option_name%TYPE,
22: debug_option_value FND_DEBUG_RULE_OPTIONS.debug_option_value%TYPE,
23: debug_rule_id FND_DEBUG_RULES.debug_rule_id%TYPE,
24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,

Line 21: debug_option_name FND_DEBUG_RULE_OPTIONS.debug_option_name%TYPE,

17:
18: TYPE rule_select_rec is record
19: ( enable_routine FND_DEBUG_OPTION_VALUES.enable_routine%TYPE,
20: disable_routine FND_DEBUG_OPTION_VALUES.disable_routine%TYPE,
21: debug_option_name FND_DEBUG_RULE_OPTIONS.debug_option_name%TYPE,
22: debug_option_value FND_DEBUG_RULE_OPTIONS.debug_option_value%TYPE,
23: debug_rule_id FND_DEBUG_RULES.debug_rule_id%TYPE,
24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,
25: start_time FND_DEBUG_RULES.start_time%TYPE,

Line 22: debug_option_value FND_DEBUG_RULE_OPTIONS.debug_option_value%TYPE,

18: TYPE rule_select_rec is record
19: ( enable_routine FND_DEBUG_OPTION_VALUES.enable_routine%TYPE,
20: disable_routine FND_DEBUG_OPTION_VALUES.disable_routine%TYPE,
21: debug_option_name FND_DEBUG_RULE_OPTIONS.debug_option_name%TYPE,
22: debug_option_value FND_DEBUG_RULE_OPTIONS.debug_option_value%TYPE,
23: debug_rule_id FND_DEBUG_RULES.debug_rule_id%TYPE,
24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,
25: start_time FND_DEBUG_RULES.start_time%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,

Line 23: debug_rule_id FND_DEBUG_RULES.debug_rule_id%TYPE,

19: ( enable_routine FND_DEBUG_OPTION_VALUES.enable_routine%TYPE,
20: disable_routine FND_DEBUG_OPTION_VALUES.disable_routine%TYPE,
21: debug_option_name FND_DEBUG_RULE_OPTIONS.debug_option_name%TYPE,
22: debug_option_value FND_DEBUG_RULE_OPTIONS.debug_option_value%TYPE,
23: debug_rule_id FND_DEBUG_RULES.debug_rule_id%TYPE,
24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,
25: start_time FND_DEBUG_RULES.start_time%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,

Line 24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,

20: disable_routine FND_DEBUG_OPTION_VALUES.disable_routine%TYPE,
21: debug_option_name FND_DEBUG_RULE_OPTIONS.debug_option_name%TYPE,
22: debug_option_value FND_DEBUG_RULE_OPTIONS.debug_option_value%TYPE,
23: debug_rule_id FND_DEBUG_RULES.debug_rule_id%TYPE,
24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,
25: start_time FND_DEBUG_RULES.start_time%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,

Line 25: start_time FND_DEBUG_RULES.start_time%TYPE,

21: debug_option_name FND_DEBUG_RULE_OPTIONS.debug_option_name%TYPE,
22: debug_option_value FND_DEBUG_RULE_OPTIONS.debug_option_value%TYPE,
23: debug_rule_id FND_DEBUG_RULES.debug_rule_id%TYPE,
24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,
25: start_time FND_DEBUG_RULES.start_time%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,

Line 26: end_time FND_DEBUG_RULES.end_time%TYPE,

22: debug_option_value FND_DEBUG_RULE_OPTIONS.debug_option_value%TYPE,
23: debug_rule_id FND_DEBUG_RULES.debug_rule_id%TYPE,
24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,
25: start_time FND_DEBUG_RULES.start_time%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,

Line 27: user_id FND_DEBUG_RULES.user_id%TYPE,

23: debug_rule_id FND_DEBUG_RULES.debug_rule_id%TYPE,
24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,
25: start_time FND_DEBUG_RULES.start_time%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,
31: component_name FND_DEBUG_RULES.component_name%TYPE,

Line 28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,

24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,
25: start_time FND_DEBUG_RULES.start_time%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,
31: component_name FND_DEBUG_RULES.component_name%TYPE,
32: component_id FND_DEBUG_RULES.component_id%TYPE,

Line 29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,

25: start_time FND_DEBUG_RULES.start_time%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,
31: component_name FND_DEBUG_RULES.component_name%TYPE,
32: component_id FND_DEBUG_RULES.component_id%TYPE,
33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,

Line 30: component_type FND_DEBUG_RULES.component_type%TYPE,

26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,
31: component_name FND_DEBUG_RULES.component_name%TYPE,
32: component_id FND_DEBUG_RULES.component_id%TYPE,
33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,
34: trace_file_routine FND_DEBUG_OPTION_VALUES.trace_file_routine%TYPE,

Line 31: component_name FND_DEBUG_RULES.component_name%TYPE,

27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,
31: component_name FND_DEBUG_RULES.component_name%TYPE,
32: component_id FND_DEBUG_RULES.component_id%TYPE,
33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,
34: trace_file_routine FND_DEBUG_OPTION_VALUES.trace_file_routine%TYPE,
35: trace_file_node FND_DEBUG_OPTION_VALUES.trace_file_node%TYPE,

Line 32: component_id FND_DEBUG_RULES.component_id%TYPE,

28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,
31: component_name FND_DEBUG_RULES.component_name%TYPE,
32: component_id FND_DEBUG_RULES.component_id%TYPE,
33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,
34: trace_file_routine FND_DEBUG_OPTION_VALUES.trace_file_routine%TYPE,
35: trace_file_node FND_DEBUG_OPTION_VALUES.trace_file_node%TYPE,
36: comments FND_DEBUG_RULES.comments%TYPE,

Line 33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,

29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,
31: component_name FND_DEBUG_RULES.component_name%TYPE,
32: component_id FND_DEBUG_RULES.component_id%TYPE,
33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,
34: trace_file_routine FND_DEBUG_OPTION_VALUES.trace_file_routine%TYPE,
35: trace_file_node FND_DEBUG_OPTION_VALUES.trace_file_node%TYPE,
36: comments FND_DEBUG_RULES.comments%TYPE,
37: reqid FND_DEBUG_RULES.request_id%TYPE

Line 34: trace_file_routine FND_DEBUG_OPTION_VALUES.trace_file_routine%TYPE,

30: component_type FND_DEBUG_RULES.component_type%TYPE,
31: component_name FND_DEBUG_RULES.component_name%TYPE,
32: component_id FND_DEBUG_RULES.component_id%TYPE,
33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,
34: trace_file_routine FND_DEBUG_OPTION_VALUES.trace_file_routine%TYPE,
35: trace_file_node FND_DEBUG_OPTION_VALUES.trace_file_node%TYPE,
36: comments FND_DEBUG_RULES.comments%TYPE,
37: reqid FND_DEBUG_RULES.request_id%TYPE
38: );

Line 35: trace_file_node FND_DEBUG_OPTION_VALUES.trace_file_node%TYPE,

31: component_name FND_DEBUG_RULES.component_name%TYPE,
32: component_id FND_DEBUG_RULES.component_id%TYPE,
33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,
34: trace_file_routine FND_DEBUG_OPTION_VALUES.trace_file_routine%TYPE,
35: trace_file_node FND_DEBUG_OPTION_VALUES.trace_file_node%TYPE,
36: comments FND_DEBUG_RULES.comments%TYPE,
37: reqid FND_DEBUG_RULES.request_id%TYPE
38: );
39:

Line 36: comments FND_DEBUG_RULES.comments%TYPE,

32: component_id FND_DEBUG_RULES.component_id%TYPE,
33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,
34: trace_file_routine FND_DEBUG_OPTION_VALUES.trace_file_routine%TYPE,
35: trace_file_node FND_DEBUG_OPTION_VALUES.trace_file_node%TYPE,
36: comments FND_DEBUG_RULES.comments%TYPE,
37: reqid FND_DEBUG_RULES.request_id%TYPE
38: );
39:
40: -- Exceptions

Line 37: reqid FND_DEBUG_RULES.request_id%TYPE

33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,
34: trace_file_routine FND_DEBUG_OPTION_VALUES.trace_file_routine%TYPE,
35: trace_file_node FND_DEBUG_OPTION_VALUES.trace_file_node%TYPE,
36: comments FND_DEBUG_RULES.comments%TYPE,
37: reqid FND_DEBUG_RULES.request_id%TYPE
38: );
39:
40: -- Exceptions
41:

Line 62: enable_db_rules(FND_DEBUG.FORM, 'FNDRSRUN');

58: -- other wise returns false (if no rule is executed)
59: /*
60: some examples to call this API
61: 1. To execute all rules associated with this component having different debug options
62: enable_db_rules(FND_DEBUG.FORM, 'FNDRSRUN');
63:
64: 2. To execute all rules associated with this component id and component application id
65: having different debug options (one of the component name or comp id and comp appl id is required)
66: enable_db_rules(FND_DEBUG.REPORT, null, 1,2);

Line 66: enable_db_rules(FND_DEBUG.REPORT, null, 1,2);

62: enable_db_rules(FND_DEBUG.FORM, 'FNDRSRUN');
63:
64: 2. To execute all rules associated with this component id and component application id
65: having different debug options (one of the component name or comp id and comp appl id is required)
66: enable_db_rules(FND_DEBUG.REPORT, null, 1,2);
67:
68: 3. To execute rules specific to a request id having different debug options
69: enable_db_rules(FND_DEBUG.REPORT, 'FNDSCURS', null, null, 12345);
70:

Line 69: enable_db_rules(FND_DEBUG.REPORT, 'FNDSCURS', null, null, 12345);

65: having different debug options (one of the component name or comp id and comp appl id is required)
66: enable_db_rules(FND_DEBUG.REPORT, null, 1,2);
67:
68: 3. To execute rules specific to a request id having different debug options
69: enable_db_rules(FND_DEBUG.REPORT, 'FNDSCURS', null, null, 12345);
70:
71: */
72: FUNCTION enable_db_rules (comp_type in varchar2,
73: comp_name in varchar2,

Line 88: from fnd_debug_options DO,

84: DRO.debug_option_value, DR.debug_rule_id, repeation_counter, start_time,
85: end_time, user_id, responsibility_id, resp_appl_id, component_type,
86: component_name, component_id, component_appl_id,
87: trace_file_routine, trace_file_node, comments, nvl(request_id,0) reqid
88: from fnd_debug_options DO,
89: fnd_debug_rules DR,
90: fnd_debug_option_values DOV,
91: fnd_debug_rule_options DRO
92: where ( DR.user_id = userid

Line 89: fnd_debug_rules DR,

85: end_time, user_id, responsibility_id, resp_appl_id, component_type,
86: component_name, component_id, component_appl_id,
87: trace_file_routine, trace_file_node, comments, nvl(request_id,0) reqid
88: from fnd_debug_options DO,
89: fnd_debug_rules DR,
90: fnd_debug_option_values DOV,
91: fnd_debug_rule_options DRO
92: where ( DR.user_id = userid
93: OR (DR.responsibility_id = respid

Line 90: fnd_debug_option_values DOV,

86: component_name, component_id, component_appl_id,
87: trace_file_routine, trace_file_node, comments, nvl(request_id,0) reqid
88: from fnd_debug_options DO,
89: fnd_debug_rules DR,
90: fnd_debug_option_values DOV,
91: fnd_debug_rule_options DRO
92: where ( DR.user_id = userid
93: OR (DR.responsibility_id = respid
94: and DR.Resp_appl_id = respapplid )

Line 91: fnd_debug_rule_options DRO

87: trace_file_routine, trace_file_node, comments, nvl(request_id,0) reqid
88: from fnd_debug_options DO,
89: fnd_debug_rules DR,
90: fnd_debug_option_values DOV,
91: fnd_debug_rule_options DRO
92: where ( DR.user_id = userid
93: OR (DR.responsibility_id = respid
94: and DR.Resp_appl_id = respapplid )
95: OR (DR.user_id is null and DR.Responsibility_ID is null) )

Line 109: AND DR.debug_rule_id=(SELECT min(debug_rule_id) FROM fnd_debug_rules IDR

105: AND DO.type = 'D'
106: AND DO.enabled_flag = 'Y'
107: AND ((DR.request_id is not null AND reqid = DR.request_id) OR (DR.request_id is null) )
108: AND DR.debug_rule_id = DRO.debug_rule_id
109: AND DR.debug_rule_id=(SELECT min(debug_rule_id) FROM fnd_debug_rules IDR
110: WHERE (IDR.user_id = userid
111: OR (IDR.responsibility_id = respid
112: AND IDR.Resp_appl_id = respapplid )
113: OR (IDR.user_id IS NULL AND IDR.Responsibility_ID IS NULL) )

Line 136: from fnd_debug_options DO,

132: DRO.debug_option_value, DR.debug_rule_id, repeation_counter, start_time,
133: end_time, user_id, responsibility_id, resp_appl_id, component_type,
134: component_name, component_id, component_appl_id,
135: trace_file_routine, trace_file_node, comments, nvl(request_id,0) reqid
136: from fnd_debug_options DO,
137: fnd_debug_rules DR,
138: fnd_debug_option_values DOV,
139: fnd_debug_rule_options DRO
140: where ( DR.user_id = userid

Line 137: fnd_debug_rules DR,

133: end_time, user_id, responsibility_id, resp_appl_id, component_type,
134: component_name, component_id, component_appl_id,
135: trace_file_routine, trace_file_node, comments, nvl(request_id,0) reqid
136: from fnd_debug_options DO,
137: fnd_debug_rules DR,
138: fnd_debug_option_values DOV,
139: fnd_debug_rule_options DRO
140: where ( DR.user_id = userid
141: OR (DR.responsibility_id = respid

Line 138: fnd_debug_option_values DOV,

134: component_name, component_id, component_appl_id,
135: trace_file_routine, trace_file_node, comments, nvl(request_id,0) reqid
136: from fnd_debug_options DO,
137: fnd_debug_rules DR,
138: fnd_debug_option_values DOV,
139: fnd_debug_rule_options DRO
140: where ( DR.user_id = userid
141: OR (DR.responsibility_id = respid
142: and DR.Resp_appl_id = respapplid )

Line 139: fnd_debug_rule_options DRO

135: trace_file_routine, trace_file_node, comments, nvl(request_id,0) reqid
136: from fnd_debug_options DO,
137: fnd_debug_rules DR,
138: fnd_debug_option_values DOV,
139: fnd_debug_rule_options DRO
140: where ( DR.user_id = userid
141: OR (DR.responsibility_id = respid
142: and DR.Resp_appl_id = respapplid )
143: OR (DR.user_id is null and DR.Responsibility_ID is null) )

Line 155: AND DR.debug_rule_id=(SELECT min(debug_rule_id) FROM fnd_debug_rules IDR

151: AND DO.type = 'D'
152: AND DO.enabled_flag = 'Y'
153: AND DR.request_id is null
154: AND DR.debug_rule_id = DRO.debug_rule_id
155: AND DR.debug_rule_id=(SELECT min(debug_rule_id) FROM fnd_debug_rules IDR
156: WHERE (IDR.user_id = userid
157: OR (IDR.responsibility_id = respid
158: AND IDR.Resp_appl_id = respapplid )
159: OR (IDR.user_id IS NULL AND IDR.Responsibility_ID IS NULL) )

Line 186: repetition_counter FND_DEBUG_RULES.repeation_counter%TYPE := 0; -- repetition_counter is the number of actual occurances for a rule

182: respapplid number;
183: loginid number;
184: dr_rec rule_select_rec;
185: last_rule_id number;
186: repetition_counter FND_DEBUG_RULES.repeation_counter%TYPE := 0; -- repetition_counter is the number of actual occurances for a rule
187: begin
188:
189: RULEC := 0;
190: P_RULES := empty_drules;

Line 219: -- If fnd_debug_rule has a request_id that means rule is associated

215: end if;
216:
217: -- check if this call to enable_db_rule is request id based
218: -- and also the fetched rule has the same request id
219: -- If fnd_debug_rule has a request_id that means rule is associated
220: -- to a specific request_id. If we find even one request_id based
221: -- rule for the current request then, we will execute that one only.
222: -- Not other non-request_id based rules.
223:

Line 261: -- insert row about execution in fnd_debug_rule_executions

257: sql_str := 'begin ' || dr_rec.enable_routine || '; end;';
258:
259: execute immediate sql_str;
260:
261: -- insert row about execution in fnd_debug_rule_executions
262: trans_id := get_transaction_id(FALSE);
263:
264: log_file := get_ret_value(dr_rec.trace_file_routine);
265:

Line 271: FROM fnd_debug_rule_executions DRO,

267:
268: -- added repetition_counter as a fix for bug 3787995
269: -- repetition_counter is the number of actual occurances for this rule
270: SELECT NVL(MAX(DRO.repeation_counter),0) INTO repetition_counter
271: FROM fnd_debug_rule_executions DRO,
272: fnd_debug_option_values DOV
273: WHERE DRO.debug_option_name=DOV.debug_option_name
274: AND DRO.debug_option_value=DOV.debug_option_value
275: AND DOV.debug_option_name=dr_rec.debug_option_name

Line 272: fnd_debug_option_values DOV

268: -- added repetition_counter as a fix for bug 3787995
269: -- repetition_counter is the number of actual occurances for this rule
270: SELECT NVL(MAX(DRO.repeation_counter),0) INTO repetition_counter
271: FROM fnd_debug_rule_executions DRO,
272: fnd_debug_option_values DOV
273: WHERE DRO.debug_option_name=DOV.debug_option_name
274: AND DRO.debug_option_value=DOV.debug_option_value
275: AND DOV.debug_option_name=dr_rec.debug_option_name
276: AND DOV.debug_option_value=dr_rec.debug_option_value

Line 279: insert into fnd_debug_rule_executions

275: AND DOV.debug_option_name=dr_rec.debug_option_name
276: AND DOV.debug_option_value=dr_rec.debug_option_value
277: AND DRO.rule_id=dr_rec.debug_rule_id;
278:
279: insert into fnd_debug_rule_executions
280: (transaction_id, rule_id, component_type, component_name,
281: component_id, component_appl_id, start_time, end_time,
282: repeation_counter, debug_log_file, log_file_node_name,
283: user_id, responsibility_id, resp_appl_id,

Line 299: -- else delete the row from fnd_debug_rules

295: dr_rec.comments, req_id); --Added for Bug 3788285.For showing request_id
296:
297:
298: -- decrement repeation_counter if there are some more to run
299: -- else delete the row from fnd_debug_rules
300: -- If it is time based then repeation_counter will be null.
301: IF (last_rule_id <> dr_rec.debug_rule_id) THEN
302: BEGIN
303: left_iterations := NVL(dr_rec.repeation_counter, 0) - 1;

Line 305: UPDATE fnd_debug_rules

301: IF (last_rule_id <> dr_rec.debug_rule_id) THEN
302: BEGIN
303: left_iterations := NVL(dr_rec.repeation_counter, 0) - 1;
304: IF ( left_iterations >= 1 ) THEN
305: UPDATE fnd_debug_rules
306: SET repeation_counter = repeation_counter -1,
307: last_update_date = sysdate
308: WHERE debug_rule_id = dr_rec.debug_rule_id;
309: ELSIF (left_iterations = 0 ) THEN

Line 311: UPDATE fnd_debug_rules

307: last_update_date = sysdate
308: WHERE debug_rule_id = dr_rec.debug_rule_id;
309: ELSIF (left_iterations = 0 ) THEN
310: BEGIN
311: UPDATE fnd_debug_rules
312: SET repeation_counter = 0,
313: last_update_date = sysdate
314: WHERE debug_rule_id = dr_rec.debug_rule_id;
315: END;

Line 333: DELETE FROM fnd_debug_rule_options WHERE debug_rule_id IN

329: CLOSE DRC_REQ;
330: end if;
331:
332: -- delete any old rules as a fix for bug 3787995
333: DELETE FROM fnd_debug_rule_options WHERE debug_rule_id IN
334: (SELECT debug_rule_id FROM fnd_debug_rules
335: WHERE (start_time IS NOT NULL AND end_time < sysdate)
336: OR (repeation_counter = 0)
337: );

Line 334: (SELECT debug_rule_id FROM fnd_debug_rules

330: end if;
331:
332: -- delete any old rules as a fix for bug 3787995
333: DELETE FROM fnd_debug_rule_options WHERE debug_rule_id IN
334: (SELECT debug_rule_id FROM fnd_debug_rules
335: WHERE (start_time IS NOT NULL AND end_time < sysdate)
336: OR (repeation_counter = 0)
337: );
338:

Line 339: DELETE FROM fnd_debug_rules

335: WHERE (start_time IS NOT NULL AND end_time < sysdate)
336: OR (repeation_counter = 0)
337: );
338:
339: DELETE FROM fnd_debug_rules
340: WHERE (start_time IS NOT NULL AND end_time < sysdate)
341: OR (repeation_counter = 0);
342:
343: commit;

Line 352: fnd_message.set_token ('ROUTINE', 'FND_DEBUG.ENABLE_DB_RULES', FALSE);

348: when others then
349: fnd_message.set_name ('FND', 'SQL-Generic error');
350: fnd_message.set_token ('ERRNO', sqlcode, FALSE);
351: fnd_message.set_token ('REASON', sqlerrm, FALSE);
352: fnd_message.set_token ('ROUTINE', 'FND_DEBUG.ENABLE_DB_RULES', FALSE);
353: IF (fnd_log.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) THEN
354: fnd_log.message(FND_LOG.LEVEL_EXCEPTION,
355: 'fnd.plsql.FND_DEBUG.ENABLE_DB_RULES.others',
356: FALSE);

Line 355: 'fnd.plsql.FND_DEBUG.ENABLE_DB_RULES.others',

351: fnd_message.set_token ('REASON', sqlerrm, FALSE);
352: fnd_message.set_token ('ROUTINE', 'FND_DEBUG.ENABLE_DB_RULES', FALSE);
353: IF (fnd_log.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) THEN
354: fnd_log.message(FND_LOG.LEVEL_EXCEPTION,
355: 'fnd.plsql.FND_DEBUG.ENABLE_DB_RULES.others',
356: FALSE);
357: END IF;
358: if ( req_id is null ) then
359: CLOSE DRC_NON_REQ;

Line 402: fnd_message.set_token ('ROUTINE', 'FND_DEBUG.DISABLE_DB_RULES', FALSE);

398: when others then
399: fnd_message.set_name ('FND', 'SQL-Generic error');
400: fnd_message.set_token ('ERRNO', sqlcode, FALSE);
401: fnd_message.set_token ('REASON', sqlerrm, FALSE);
402: fnd_message.set_token ('ROUTINE', 'FND_DEBUG.DISABLE_DB_RULES', FALSE);
403: IF (fnd_log.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) THEN
404: fnd_log.message(FND_LOG.LEVEL_EXCEPTION,
405: 'fnd.plsql.FND_DEBUG.DISABLE_DB_RULES.others',
406: FALSE);

Line 405: 'fnd.plsql.FND_DEBUG.DISABLE_DB_RULES.others',

401: fnd_message.set_token ('REASON', sqlerrm, FALSE);
402: fnd_message.set_token ('ROUTINE', 'FND_DEBUG.DISABLE_DB_RULES', FALSE);
403: IF (fnd_log.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) THEN
404: fnd_log.message(FND_LOG.LEVEL_EXCEPTION,
405: 'fnd.plsql.FND_DEBUG.DISABLE_DB_RULES.others',
406: FALSE);
407: END IF;
408: return (FALSE);
409:

Line 427: get_os_rules(FND_DEBUG.REPORT, 'FNDSCURS', null, null, 12345, 0, 20450,1);

423: -- return string containing debug string for matched rule
424: /*
425: some examples to call this API
426: 1. To execute rule associated with this component for a specific user
427: get_os_rules(FND_DEBUG.REPORT, 'FNDSCURS', null, null, 12345, 0, 20450,1);
428:
429:
430: */
431: function get_os_rules ( comp_type in varchar2,

Line 454: from fnd_debug_options DO,

450: end_time, user_id, responsibility_id, resp_appl_id,
451: component_type, component_name, component_id, component_appl_id,
452: trace_file_routine, trace_file_node, comments,
453: nvl(request_id,0) reqid
454: from fnd_debug_options DO,
455: fnd_debug_rules DR,
456: fnd_debug_option_values DOV,
457: fnd_debug_rule_options DRO
458: where ( DR.user_id = uid

Line 455: fnd_debug_rules DR,

451: component_type, component_name, component_id, component_appl_id,
452: trace_file_routine, trace_file_node, comments,
453: nvl(request_id,0) reqid
454: from fnd_debug_options DO,
455: fnd_debug_rules DR,
456: fnd_debug_option_values DOV,
457: fnd_debug_rule_options DRO
458: where ( DR.user_id = uid
459: OR (DR.responsibility_id = respid

Line 456: fnd_debug_option_values DOV,

452: trace_file_routine, trace_file_node, comments,
453: nvl(request_id,0) reqid
454: from fnd_debug_options DO,
455: fnd_debug_rules DR,
456: fnd_debug_option_values DOV,
457: fnd_debug_rule_options DRO
458: where ( DR.user_id = uid
459: OR (DR.responsibility_id = respid
460: and DR.Resp_appl_id = respapplid )

Line 457: fnd_debug_rule_options DRO

453: nvl(request_id,0) reqid
454: from fnd_debug_options DO,
455: fnd_debug_rules DR,
456: fnd_debug_option_values DOV,
457: fnd_debug_rule_options DRO
458: where ( DR.user_id = uid
459: OR (DR.responsibility_id = respid
460: and DR.Resp_appl_id = respapplid )
461: OR (DR.user_id is null and DR.Responsibility_ID is null))

Line 488: repetition_counter FND_DEBUG_RULES.repeation_counter%TYPE := 0;

484: trans_id number;
485: log_file varchar2(250);
486: node_name varchar2(250);
487: db_rule_enabled varchar2(1);
488: repetition_counter FND_DEBUG_RULES.repeation_counter%TYPE := 0;
489:
490: begin
491: debug_str := '';
492: -- find any debug rules available for this component instance.

Line 509: from fnd_debug_option_values

505: -- at option values.
506: begin
507: select debug_option_value
508: into t_ftoken
509: from fnd_debug_option_values
510: where debug_option_name = dr_rec.debug_option_name
511: and is_file_token = 'Y';
512:
513: trace_file := get_ret_value(dr_rec.trace_file_routine);

Line 535: -- insert row about execution in fnd_debug_rule_executions

531:
532: debug_str := debug_str || ' ' || trc_option_nmval ||
533: NVL(dr_rec.separator,' ') || trace_file_str || ' ';
534:
535: -- insert row about execution in fnd_debug_rule_executions
536: trans_id := get_transaction_id(TRUE, comp_type, comp_inst_id,
537: comp_appl_id, user_id, resp_id, resp_appl_id);
538: log_file := trace_file;
539: node_name := get_ret_value(dr_rec.trace_file_node);

Line 544: FROM fnd_debug_rule_executions DRO,

540:
541: -- added repetition_counter as a fix for bug 3787995
542: -- repetition_counter is the number of actual occurances for this rule
543: SELECT NVL(MAX(DRO.repeation_counter),0) INTO repetition_counter
544: FROM fnd_debug_rule_executions DRO,
545: fnd_debug_option_values DOV
546: WHERE DRO.debug_option_name=DOV.debug_option_name
547: AND DRO.debug_option_value=DOV.debug_option_value
548: AND DOV.debug_option_name=dr_rec.debug_option_name

Line 545: fnd_debug_option_values DOV

541: -- added repetition_counter as a fix for bug 3787995
542: -- repetition_counter is the number of actual occurances for this rule
543: SELECT NVL(MAX(DRO.repeation_counter),0) INTO repetition_counter
544: FROM fnd_debug_rule_executions DRO,
545: fnd_debug_option_values DOV
546: WHERE DRO.debug_option_name=DOV.debug_option_name
547: AND DRO.debug_option_value=DOV.debug_option_value
548: AND DOV.debug_option_name=dr_rec.debug_option_name
549: AND DOV.debug_option_value=dr_rec.debug_option_value

Line 552: insert into fnd_debug_rule_executions

548: AND DOV.debug_option_name=dr_rec.debug_option_name
549: AND DOV.debug_option_value=dr_rec.debug_option_value
550: AND DRO.rule_id=dr_rec.debug_rule_id;
551:
552: insert into fnd_debug_rule_executions
553: (transaction_id, rule_id, component_type, component_name,
554: component_id, component_appl_id, start_time, end_time,
555: repeation_counter, debug_log_file, log_file_node_name,
556: user_id, responsibility_id, resp_appl_id,

Line 577: FROM fnd_debug_rule_options DRO,

573: SELECT 'T' INTO db_rule_enabled
574: FROM DUAL
575: WHERE EXISTS(
576: SELECT *
577: FROM fnd_debug_rule_options DRO,
578: fnd_debug_options DO
579: WHERE DRO.debug_option_name=DO.debug_option_name
580: AND DO.type='D'
581: AND dr_rec.debug_rule_id=DRO.debug_rule_id);

Line 578: fnd_debug_options DO

574: FROM DUAL
575: WHERE EXISTS(
576: SELECT *
577: FROM fnd_debug_rule_options DRO,
578: fnd_debug_options DO
579: WHERE DRO.debug_option_name=DO.debug_option_name
580: AND DO.type='D'
581: AND dr_rec.debug_rule_id=DRO.debug_rule_id);
582: EXCEPTION

Line 589: -- else delete the row from fnd_debug_rules

585: END; --check whether any of the db rule is enabled or not
586:
587: -- decrement repeation_counter if no db rules are enabled and
588: -- if there are some more to run
589: -- else delete the row from fnd_debug_rules
590: -- If it is time based then repeation_counter will be null.
591: -- added the check as a fix for bug 3787995
592: IF (db_rule_enabled='F') THEN --if none of db rules are enabled
593: BEGIN

Line 596: UPDATE fnd_debug_rules

592: IF (db_rule_enabled='F') THEN --if none of db rules are enabled
593: BEGIN
594: left_iterations := nvl(dr_rec.repeation_counter,0) - 1;
595: IF ( left_iterations >= 1 ) THEN
596: UPDATE fnd_debug_rules
597: SET repeation_counter = repeation_counter -1,
598: last_update_date = sysdate
599: WHERE debug_rule_id = dr_rec.debug_rule_id;
600: ELSIF (left_iterations = 0 ) THEN

Line 602: UPDATE fnd_debug_rules

598: last_update_date = sysdate
599: WHERE debug_rule_id = dr_rec.debug_rule_id;
600: ELSIF (left_iterations = 0 ) THEN
601: BEGIN
602: UPDATE fnd_debug_rules
603: SET repeation_counter = 0,
604: last_update_date = sysdate
605: WHERE debug_rule_id = dr_rec.debug_rule_id;
606: END;

Line 616: DELETE FROM fnd_debug_rule_options WHERE debug_rule_id IN

612: END LOOP;
613:
614:
615: -- delete any old rules as a fix for bug 3787995
616: DELETE FROM fnd_debug_rule_options WHERE debug_rule_id IN
617: (SELECT debug_rule_id
618: FROM fnd_debug_rules
619: WHERE (start_time IS NOT NULL AND end_time < sysdate)
620: OR (repeation_counter = 0)

Line 618: FROM fnd_debug_rules

614:
615: -- delete any old rules as a fix for bug 3787995
616: DELETE FROM fnd_debug_rule_options WHERE debug_rule_id IN
617: (SELECT debug_rule_id
618: FROM fnd_debug_rules
619: WHERE (start_time IS NOT NULL AND end_time < sysdate)
620: OR (repeation_counter = 0)
621: );
622:

Line 623: DELETE FROM fnd_debug_rules

619: WHERE (start_time IS NOT NULL AND end_time < sysdate)
620: OR (repeation_counter = 0)
621: );
622:
623: DELETE FROM fnd_debug_rules
624: WHERE (start_time IS NOT NULL AND end_time < sysdate)
625: OR (repeation_counter = 0);
626:
627:

Line 639: 'ROUTINE', 'FND_DEBUG.GET_OS_RULES', FALSE);

635: fnd_message.set_name ('FND', 'SQL-Generic error');
636: fnd_message.set_token ('ERRNO', sqlcode, FALSE);
637: fnd_message.set_token ('REASON', sqlerrm, FALSE);
638: fnd_message.set_token (
639: 'ROUTINE', 'FND_DEBUG.GET_OS_RULES', FALSE);
640: IF (fnd_log.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) THEN
641: fnd_log.message(FND_LOG.LEVEL_EXCEPTION,
642: 'fnd.plsql.FND_DEBUG.GET_OS_RULES.others', FALSE);
643: END IF;

Line 642: 'fnd.plsql.FND_DEBUG.GET_OS_RULES.others', FALSE);

638: fnd_message.set_token (
639: 'ROUTINE', 'FND_DEBUG.GET_OS_RULES', FALSE);
640: IF (fnd_log.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) THEN
641: fnd_log.message(FND_LOG.LEVEL_EXCEPTION,
642: 'fnd.plsql.FND_DEBUG.GET_OS_RULES.others', FALSE);
643: END IF;
644: commit;
645: return ltrim(rtrim(debug_str));
646: end;

Line 677: if (comp_type in (FND_DEBUG.SQLPLUS_CP, FND_DEBUG.PLSQL_CP,

673: -- information, otherwise checks context already exitsts or not if
674: -- exists then use that one else create new one.
675: -- force is used in spawned concurrent request case.
676: if ( force ) then
677: if (comp_type in (FND_DEBUG.SQLPLUS_CP, FND_DEBUG.PLSQL_CP,
678: FND_DEBUG.JAVA_CP, FND_DEBUG.REPORTS ) ) then
679: conc_request_id := comp_inst_id;
680: end if;
681:

Line 678: FND_DEBUG.JAVA_CP, FND_DEBUG.REPORTS ) ) then

674: -- exists then use that one else create new one.
675: -- force is used in spawned concurrent request case.
676: if ( force ) then
677: if (comp_type in (FND_DEBUG.SQLPLUS_CP, FND_DEBUG.PLSQL_CP,
678: FND_DEBUG.JAVA_CP, FND_DEBUG.REPORTS ) ) then
679: conc_request_id := comp_inst_id;
680: end if;
681:
682: transaction_id := fnd_log_repository.init_trans_int_with_context

Line 758: update fnd_debug_rule_executions

754: procedure assign_request(transaction_id IN number,
755: request_id IN number) is
756: PRAGMA AUTONOMOUS_TRANSACTION;
757: begin
758: update fnd_debug_rule_executions
759: set log_request_id = assign_request.request_id
760: where transaction_id = assign_request.transaction_id
761: and debug_option_value = 'PLSQL_PROFILER';
762:

Line 771: 'ROUTINE', 'FND_DEBUG.ASSIGN_REQUEST', FALSE);

767: fnd_message.set_name ('FND', 'SQL-Generic error');
768: fnd_message.set_token ('ERRNO', sqlcode, FALSE);
769: fnd_message.set_token ('REASON', sqlerrm, FALSE);
770: fnd_message.set_token (
771: 'ROUTINE', 'FND_DEBUG.ASSIGN_REQUEST', FALSE);
772: IF (fnd_log.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) THEN
773: fnd_log.message(FND_LOG.LEVEL_EXCEPTION,
774: 'fnd.plsql.FND_DEBUG.ASSIGN_REQUEST.others', FALSE);
775: END IF;

Line 774: 'fnd.plsql.FND_DEBUG.ASSIGN_REQUEST.others', FALSE);

770: fnd_message.set_token (
771: 'ROUTINE', 'FND_DEBUG.ASSIGN_REQUEST', FALSE);
772: IF (fnd_log.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) THEN
773: fnd_log.message(FND_LOG.LEVEL_EXCEPTION,
774: 'fnd.plsql.FND_DEBUG.ASSIGN_REQUEST.others', FALSE);
775: END IF;
776: commit;
777:
778:

Line 780: end FND_DEBUG;

776: commit;
777:
778:
779: end;
780: end FND_DEBUG;