Hi there,
I have a procedure that contains an if statement. It appears that it evaluates to true only when "add debug information" is selected for the procedure, otherwise it evaluates to false.
Any idea why this might be?
Here is the procedure:
CREATE OR REPLACE PROCEDURE monitor_source_streams is
capture_status varchar2(20);
propagation_status varchar2(1);
/* NOTE */
/* THE FOLLOWING VARIABLES WILL NEED TO BE ALTERED BEFORE DEPLOYING TO NEW ENVIRONMENT. */
email_from varchar2(30) := 'x@x.ca';
email_to varchar2(30) := 'x@x.ca';
subject varchar2(30) := 'STREAMS MONITORING';
/* END NOTE */
begin
/* query the source database to ensure that the capture process is 'ENABLED'. If it is not enabled,
send an email to the administrator advising them so. */
select status into capture_status from dba_capture;
if capture_status != 'ENABLED' then
Send_Streams_Mail(email_from, email_to, subject, 'Capture process is currently NOT enabled');
end if;
/* query the source database to ensure that the propagation process is 'ENABLED'. If it is not enabled,
send an email to the administrator advising them so. */
SELECT
s.SCHEDULE_DISABLED into propagation_status
FROM DBA_QUEUE_SCHEDULES s, DBA_PROPAGATION p
WHERE p.DESTINATION_DBLINK = s.DESTINATION
AND s.SCHEMA = p.SOURCE_QUEUE_OWNER
AND s.QNAME = p.SOURCE_QUEUE_NAME;
dbms_output.put_line(propagation_status);
if propagation_status != 'N' then
dbms_output.put_line(propagation_status);
--Send_Streams_Mail(email_from, email_to, subject, 'Propagate process is NOT enabled');
END IF;
EXCEPTION
WHEN OTHERS THEN NULL;
END monitor_source_streams;
I have a procedure that contains an if statement. It appears that it evaluates to true only when "add debug information" is selected for the procedure, otherwise it evaluates to false.
Any idea why this might be?
Here is the procedure:
CREATE OR REPLACE PROCEDURE monitor_source_streams is
capture_status varchar2(20);
propagation_status varchar2(1);
/* NOTE */
/* THE FOLLOWING VARIABLES WILL NEED TO BE ALTERED BEFORE DEPLOYING TO NEW ENVIRONMENT. */
email_from varchar2(30) := 'x@x.ca';
email_to varchar2(30) := 'x@x.ca';
subject varchar2(30) := 'STREAMS MONITORING';
/* END NOTE */
begin
/* query the source database to ensure that the capture process is 'ENABLED'. If it is not enabled,
send an email to the administrator advising them so. */
select status into capture_status from dba_capture;
if capture_status != 'ENABLED' then
Send_Streams_Mail(email_from, email_to, subject, 'Capture process is currently NOT enabled');
end if;
/* query the source database to ensure that the propagation process is 'ENABLED'. If it is not enabled,
send an email to the administrator advising them so. */
SELECT
s.SCHEDULE_DISABLED into propagation_status
FROM DBA_QUEUE_SCHEDULES s, DBA_PROPAGATION p
WHERE p.DESTINATION_DBLINK = s.DESTINATION
AND s.SCHEMA = p.SOURCE_QUEUE_OWNER
AND s.QNAME = p.SOURCE_QUEUE_NAME;
dbms_output.put_line(propagation_status);
if propagation_status != 'N' then
dbms_output.put_line(propagation_status);
--Send_Streams_Mail(email_from, email_to, subject, 'Propagate process is NOT enabled');
END IF;
EXCEPTION
WHEN OTHERS THEN NULL;
END monitor_source_streams;