Mass activity running only once for custom parallel object
Hi
I have created custom parallel object EXT_UI and created mass activity for this but the report in triggered only once and not going for second interval .
Can any one help me out in this.
Thanks in advance.
Chetan
Message was edited by: CHETAN N P
Mass activity is running fine for standard object ANLAGE but not for custom one
Please share me steps to be followed in creating custom parallel object.
Regards,
Chetan
Hi Chetan,
I think you need to make changes in the Events which gets triggered by the mass activity.
Can you let me know the mass transaction code for which you have customised the activity,
Thanks,
Amlan
Similar Messages
-
Hi All,
I am trying to execute the below code as provided from one of the blogs. i am able to run the job only once based on a file watcher object(i.e. for very first time) and after that the job is not running at all and if i schedule the job to run automatically based on interval of 10 or more minutes it is executing properly). Please let me know or guide me if i have missed any step or configuration.that is needed.
Version of Oracle 11.2.0.1.0
OS : Windows 7 Prof
Given all the necessary privileges
BEGIN
DBMS_SCHEDULER.CREATE_CREDENTIAL(
credential_name => 'cred',
username => 'XXXX',
password => 'XXXX');
END;
CREATE TABLE ZZZZ (WHEN timestamp, file_name varchar2(100),
file_size number, processed char(1));
CREATE OR REPLACE PROCEDURE YYYY
(payload IN sys.scheduler_filewatcher_result) AS
BEGIN
INSERT INTO ZZZZ VALUES
(payload.file_timestamp,
payload.directory_path || '/' || payload.actual_file_name,
payload.file_size,
'N');
END;
BEGIN
DBMS_SCHEDULER.CREATE_PROGRAM(
program_name => 'prog1',
program_type => 'stored_procedure',
program_action => 'YYYY',
number_of_arguments => 1,
enabled => FALSE);
DBMS_SCHEDULER.DEFINE_METADATA_ARGUMENT(
program_name => 'prog1',
metadata_attribute => 'event_message',
argument_position => 1);
DBMS_SCHEDULER.ENABLE('prog1');
END;
BEGIN
DBMS_SCHEDULER.CREATE_FILE_WATCHER(
file_watcher_name => 'file_watcher1',
directory_path => 'D:\AAAA',
file_name => '*.txt',
credential_name => 'cred',
destination => NULL,
enabled => FALSE);
END;
BEGIN
DBMS_SCHEDULER.CREATE_JOB(
job_name => 'job1',
program_name => 'prog1',
queue_spec => 'file_watcher1',
auto_drop => FALSE,
enabled => FALSE);
DBMS_SCHEDULER.SET_ATTRIBUTE('job1','PARALLEL_INSTANCES',TRUE);
END;
EXEC DBMS_SCHEDULER.ENABLE('file_watcher1,job1');
Regards,
kumar.Please post a copy and paste of a complete run of a test case, similar to what I have shown below.
SCOTT@orcl12c> SELECT banner FROM v$version
2 /
BANNER
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
PL/SQL Release 12.1.0.1.0 - Production
CORE 12.1.0.1.0 Production
TNS for 64-bit Windows: Version 12.1.0.1.0 - Production
NLSRTL Version 12.1.0.1.0 - Production
5 rows selected.
SCOTT@orcl12c> CONN / AS SYSDBA
Connected.
SYS@orcl12c> -- set file watcher interval to one minute:
SYS@orcl12c> BEGIN
2 DBMS_SCHEDULER.SET_ATTRIBUTE
3 ('file_watcher_schedule',
4 'repeat_interval',
5 'freq=minutely; interval=1');
6 END;
7 /
PL/SQL procedure successfully completed.
SYS@orcl12c> CONNECT scott/tiger
Connected.
SCOTT@orcl12c> BEGIN
2 -- create credential using operating system user and password (fill in your own):
3 DBMS_SCHEDULER.CREATE_CREDENTIAL
4 (credential_name => 'cred',
5 username => '...',
6 password => '...');
7 END;
8 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> -- create table to insert results into:
SCOTT@orcl12c> CREATE TABLE ZZZZ
2 (WHEN timestamp,
3 file_name varchar2(100),
4 file_size number,
5 processed char(1))
6 /
Table created.
SCOTT@orcl12c> -- create procedure to insert results:
SCOTT@orcl12c> CREATE OR REPLACE PROCEDURE YYYY
2 (payload IN sys.scheduler_filewatcher_result)
3 AS
4 BEGIN
5 INSERT INTO ZZZZ VALUES
6 (payload.file_timestamp,
7 payload.directory_path || '/' || payload.actual_file_name,
8 payload.file_size,
9 'N');
10 END;
11 /
Procedure created.
SCOTT@orcl12c> -- create program, define metadata, and enable:
SCOTT@orcl12c> BEGIN
2 DBMS_SCHEDULER.CREATE_PROGRAM
3 (program_name => 'prog1',
4 program_type => 'stored_procedure',
5 program_action => 'YYYY',
6 number_of_arguments => 1,
7 enabled => FALSE);
8 DBMS_SCHEDULER.DEFINE_METADATA_ARGUMENT(
9 program_name => 'prog1',
10 metadata_attribute => 'event_message',
11 argument_position => 1);
12 DBMS_SCHEDULER.ENABLE ('prog1');
13 END;
14 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> BEGIN
2 -- create file watcher:
3 DBMS_SCHEDULER.CREATE_FILE_WATCHER
4 (file_watcher_name => 'file_watcher1',
5 directory_path => 'c:\my_oracle_files',
6 file_name => 'f*.txt',
7 credential_name => 'cred',
8 destination => NULL,
9 enabled => FALSE);
10 END;
11 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> BEGIN
2 -- create job:
3 DBMS_SCHEDULER.CREATE_JOB
4 (job_name => 'job1',
5 program_name => 'prog1',
6 queue_spec => 'file_watcher1',
7 auto_drop => FALSE,
8 enabled => FALSE);
9 -- set attributes:
10 DBMS_SCHEDULER.SET_ATTRIBUTE ('job1', 'PARALLEL_INSTANCES', TRUE);
11 END;
12 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> -- enable:
SCOTT@orcl12c> EXEC DBMS_SCHEDULER.enable ('file_watcher1, job1');
PL/SQL procedure successfully completed.
SCOTT@orcl12c> -- write file (file must not exist previously):
SCOTT@orcl12c> CREATE OR REPLACE DIRECTORY upncommon_dir AS 'c:\my_oracle_files'
2 /
Directory created.
SCOTT@orcl12c> declare
2 filtyp utl_file.file_type;
3 begin
4 filtyp := utl_file.fopen ('UPNCOMMON_DIR', 'file1.txt', 'W', NULL);
5 utl_file.put_line (filtyp, 'File has arrived ' || SYSTIMESTAMP, TRUE);
6 utl_file.fclose (filtyp);
7 end;
8 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> -- wait long enough (may take more than one minute) for job to run:
SCOTT@orcl12c> EXEC DBMS_LOCK.SLEEP (100)
PL/SQL procedure successfully completed.
SCOTT@orcl12c> -- check for results:
SCOTT@orcl12c> SELECT * FROM zzzz
2 /
WHEN
FILE_NAME
FILE_SIZE P
22-OCT-13 10.12.28.309000 PM
c:\my_oracle_files/file1.txt
57 N
1 row selected.
SCOTT@orcl12c> declare
2 filtyp utl_file.file_type;
3 begin
4 filtyp := utl_file.fopen ('UPNCOMMON_DIR', 'file2.txt', 'W', NULL);
5 utl_file.put_line (filtyp, 'File has arrived ' || SYSTIMESTAMP, TRUE);
6 utl_file.fclose (filtyp);
7 end;
8 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> -- wait long enough (may take more than one minute) for job to run:
SCOTT@orcl12c> EXEC DBMS_LOCK.SLEEP (100)
PL/SQL procedure successfully completed.
SCOTT@orcl12c> -- check for results:
SCOTT@orcl12c> SELECT * FROM zzzz
2 /
WHEN
FILE_NAME
FILE_SIZE P
22-OCT-13 10.12.28.309000 PM
c:\my_oracle_files/file1.txt
57 N
22-OCT-13 10.14.08.580000 PM
c:\my_oracle_files/file2.txt
57 N
2 rows selected. -
Dbms_scheduler - dbms_aq - dbms_aqadm - event driven job runs only once/sec
hi, i tried here to process events with 2 jobs... surprisingly i had to call dbms_lock.sleep(1) to be able to enqueue events
at inserts in a row ... even more surprisingly the enqueuing doesn't function if the processing (prc_evsched) lasts some seconds...
how must the code be changed to be able to enqueue all events after the inserts without any sleep()?
and how must the code be changed to be able to enqueue all events with a proc (prc_evsched) running longer?
thanx in advance for your help!
--evsched
h4.
--to remove all test-objects
h4.
--test table
h4.
--define the object type to act as the payload for the queue
h4.
--creating the event queue
h4.
--creating the proc for the prog/job
h4.
--creating the proc for the prog/job
h4.
--creating the program
h4.
--creating the first job (for parallel execution)
h4.
--creating the second job (for parallel execution)
h4.
--test block
h4.
--test scenarios/results
h4.
--to remove all test-objects
DECLARE
exc_ora_27475 EXCEPTION; --ora-27475: <job_name> muss job sein
PRAGMA EXCEPTION_INIT (exc_ora_27475, -27475);
exc_ora_27476 EXCEPTION; --ora-27476: <program_name> ist nicht vorhanden
PRAGMA EXCEPTION_INIT (exc_ora_27476, -27476);
exc_ora_24010 EXCEPTION; --ORA-24010: QUEUE SYSGIS.EVENT_QUEUE ist nicht vorhanden
PRAGMA EXCEPTION_INIT (exc_ora_24010, -24010);
exc_ora_24002 EXCEPTION; --ORA-24002: QUEUE_TABLE SYSGIS.EVENT_QUEUE_TAB ist nicht vorhanden
PRAGMA EXCEPTION_INIT (exc_ora_24002, -24002);
exc_ora_4043 EXCEPTION; --ORA-04043: Objekt T_EVENT_QUEUE_PAYLOAD ist nicht vorhanden
PRAGMA EXCEPTION_INIT (exc_ora_4043, -4043);
exc_ora_942 EXCEPTION; --ORA-00942: Tabelle oder View nicht vorhanden
PRAGMA EXCEPTION_INIT (exc_ora_942, -942);
exc_ora_2289 EXCEPTION; --ORA-02289: Sequence ist nicht vorhanden.
PRAGMA EXCEPTION_INIT (exc_ora_2289, -2289);
v_fpos PLS_INTEGER := 1;
BEGIN
v_fpos := 10;
BEGIN
--remove job
SYS.DBMS_SCHEDULER.DROP_JOB(job_name=> 'job_evsched', FORCE=>TRUE);
EXCEPTION WHEN exc_ora_27475 THEN NULL;
END;
v_fpos := 12;
BEGIN
--remove job
SYS.DBMS_SCHEDULER.DROP_JOB(job_name=> 'job_evsched_2', FORCE=>TRUE);
EXCEPTION WHEN exc_ora_27475 THEN NULL;
END;
v_fpos := 20;
BEGIN
--remove program
SYS.DBMS_SCHEDULER.DROP_PROGRAM(program_name=>'prg_evsched',FORCE=>TRUE);
EXCEPTION WHEN exc_ora_27476 THEN NULL;
END;
v_fpos := 30;
BEGIN
-- stop the event queue.
DBMS_AQADM.stop_queue (queue_name => 'evsched_event_queue');
EXCEPTION WHEN exc_ora_24010 THEN NULL;
END;
v_fpos := 40;
BEGIN
-- drop the event queue.
DBMS_AQADM.drop_queue (queue_name => 'evsched_event_queue');
EXCEPTION WHEN exc_ora_24010 THEN NULL;
END;
v_fpos := 50;
BEGIN
-- Remove the queue table.
DBMS_AQADM.drop_queue_table(queue_table => 'tab_evsched_event_queue');
EXCEPTION WHEN exc_ora_24002 THEN NULL;
END;
v_fpos := 60;
BEGIN
-- remove type
EXECUTE IMMEDIATE 'DROP TYPE typ_evsched_payload';
EXCEPTION WHEN exc_ora_4043 THEN NULL;
END;
v_fpos := 70;
BEGIN
-- remove table
EXECUTE IMMEDIATE 'DROP TABLE tab_evsched';
EXCEPTION WHEN exc_ora_942 THEN NULL;
END;
v_fpos := 80;
BEGIN
-- remove sequence
EXECUTE IMMEDIATE 'DROP SEQUENCE seq_evsched';
EXCEPTION WHEN exc_ora_2289 THEN NULL;
END;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('v_fpos='||v_fpos);
END;
h4.
--test table
CREATE TABLE tab_evsched
( id NUMBER
, sys_date DATE
, status VARCHAR2(1)
, processed VARCHAR2(1) DEFAULT 'N'
, processed_by varchar2(128)
GRANT DELETE, INSERT, SELECT, UPDATE ON tab_evsched TO PUBLIC
CREATE SEQUENCE seq_evsched
h4.
--define the object type to act as the payload for the queue
CREATE OR REPLACE TYPE typ_evsched_payload AS OBJECT
( event_name VARCHAR2(30)
, tab_evsched_id NUMBER
, daterf DATE
h4.
--creating the event queue
BEGIN
-- Create a queue table to hold the event queue.
DBMS_AQADM.create_queue_table
( queue_table => 'tab_evsched_event_queue'
, queue_payload_type => 'typ_evsched_payload'
, multiple_consumers => TRUE
, COMMENT => 'Queue Table For Event Messages'
-- Create the event queue.
DBMS_AQADM.create_queue
( queue_name => 'evsched_event_queue'
, queue_table => 'tab_evsched_event_queue'
, queue_type => DBMS_AQADM.NORMAL_QUEUE
, max_retries => 0
, retry_delay => 0
, dependency_tracking => FALSE
, comment => 'Test Object Type Queue'
, auto_commit => FALSE
-- Start the event queue.
DBMS_AQADM.start_queue
( queue_name => 'evsched_event_queue'
END;
h4.
--creating the proc for the prog/job
CREATE OR REPLACE PROCEDURE prc_evsched
( p_message IN typ_evsched_payload
, p_job_name IN VARCHAR2
IS
BEGIN
UPDATE tab_evsched
SET processed = 'J'
, processed_by = p_job_name
, sys_date = p_message.daterf
WHERE 1=1
AND id = p_message.tab_evsched_id
dbms_lock.sleep(5); --#sleep-1#
COMMIT;
END prc_evsched;
h4.
--creating the program
DECLARE
exc_ora_27476 EXCEPTION; --ora-27476: <program_name> ist nicht vorhanden
PRAGMA EXCEPTION_INIT (exc_ora_27476, -27476);
BEGIN
BEGIN
SYS.DBMS_SCHEDULER.DROP_PROGRAM(program_name=>'prg_evsched',FORCE=>TRUE);
EXCEPTION
WHEN exc_ora_27476 THEN
NULL;
END;
SYS.DBMS_SCHEDULER.CREATE_PROGRAM
( program_name => 'prg_evsched'
, program_type => 'STORED_PROCEDURE'
, program_action => '"SYSGIS"."PRC_EVSCHED"'
, number_of_arguments => 2
, enabled => FALSE
, comments => 'Program-Komponent für den Test von DBMS_SCHEDULER'
--event message as the first param to prc_evsched
DBMS_SCHEDULER.DEFINE_METADATA_ARGUMENT
( program_name => 'prg_evsched'
, argument_position => 1
, metadata_attribute => 'EVENT_MESSAGE'
--name of the job as the second param to prc_evsched
SYS.DBMS_SCHEDULER.define_program_argument
( program_name => 'prg_evsched'
, argument_name => 'p_job_name'
, argument_position => 2
, argument_type => 'VARCHAR2'
, default_value => 'dummy'
--enable program
SYS.DBMS_SCHEDULER.ENABLE(NAME=>'prg_evsched');
END;
h4.
--creating the first job (for parallel execution)
DECLARE
exc_ora_27475 EXCEPTION; --ora-27475: <job_name> muss job sein
PRAGMA EXCEPTION_INIT (exc_ora_27475, -27475);
BEGIN
BEGIN
--remove job
SYS.DBMS_SCHEDULER.DROP_JOB(job_name=> 'job_evsched', FORCE=>TRUE);
EXCEPTION WHEN exc_ora_27475 THEN NULL;
END;
DBMS_SCHEDULER.create_job
( job_name => 'job_evsched'
, program_name => 'prg_evsched'
, start_date => SYSTIMESTAMP
, event_condition => 'tab.user_data.event_name = ''MYEVENT'''
, queue_spec => 'evsched_event_queue'
, auto_drop => FALSE
, enabled => FALSE
SYS.DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE
( job_name => 'job_evsched'
, argument_name => 'p_job_name'
, argument_value => 'job_evsched'
SYS.DBMS_SCHEDULER.ENABLE(NAME=>'job_evsched');
END;
h4.
--creating the second job (for parallel execution)
DECLARE
exc_ora_27475 EXCEPTION; --ora-27475: <job_name> muss job sein
PRAGMA EXCEPTION_INIT (exc_ora_27475, -27475);
BEGIN
BEGIN
--remove job
SYS.DBMS_SCHEDULER.DROP_JOB(job_name=> 'job_evsched_2', FORCE=>TRUE);
EXCEPTION WHEN exc_ora_27475 THEN NULL;
END;
DBMS_SCHEDULER.create_job
( job_name => 'job_evsched_2'
, program_name => 'prg_evsched'
, start_date => SYSTIMESTAMP
, event_condition => 'tab.user_data.event_name = ''MYEVENT'''
, queue_spec => 'evsched_event_queue'
, auto_drop => FALSE
, enabled => FALSE
SYS.DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE
( job_name => 'job_evsched_2'
, argument_name => 'p_job_name'
, argument_value => 'job_evsched_2'
SYS.DBMS_SCHEDULER.ENABLE(NAME=>'job_evsched_2');
END;
h4.
--test block
DECLARE
PROCEDURE pr_ins_tab_evsched
( p_id IN NUMBER
, p_status IN VARCHAR2
IS
BEGIN
INSERT INTO tab_evsched(id,status) VALUES (p_id, p_status);
COMMIT;
--enqueue the MYEVENT-event
IF p_status = 'M' THEN
--enqueue works in 1sekunden-taktung.... !?
dbms_lock.sleep(1); --#sleep-2#
DECLARE
v_enqueue_options DBMS_AQ.enqueue_options_t;
v_message_properties DBMS_AQ.message_properties_t;
v_message_handle RAW(16);
v_queue_msg typ_evsched_payload;
BEGIN
v_queue_msg := typ_evsched_payload
( event_name => 'MYEVENT'
, tab_evsched_id => p_id
, daterf => SYSDATE
v_enqueue_options.VISIBILITY := DBMS_AQ.ON_COMMIT;
v_enqueue_options.delivery_mode := DBMS_AQ.PERSISTENT;
v_message_properties.PRIORITY := 1;
v_message_properties.DELAY := DBMS_AQ.NO_DELAY;
v_message_properties.EXPIRATION := DBMS_AQ.NEVER;
v_message_properties.CORRELATION := 'TEST MESSAGE';
DBMS_AQ.enqueue
( queue_name => 'evsched_event_queue'
, enqueue_options => v_enqueue_options
, message_properties => v_message_properties
, payload => v_queue_msg
, msgid => v_message_handle
END;
END IF;
COMMIT;
END pr_ins_tab_evsched;
BEGIN
DELETE tab_evsched;
pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
pr_ins_tab_evsched (seq_evsched.NEXTVAL,'M');
END;
SELECT * FROM tab_evsched ORDER BY id;
SELECT * FROM sysgis.tab_evsched_event_queue;
h4.
--test scenarios/resultsh
h5.
--test results #sleep-1#=5, #sleep-2#=0
--job (job_evsched) runs only once, only the first event is enqued/processed
ID SYS_DATE STATUS PROCESSED PROCESSED_BY
9 22.03.2012 17:00:41 M J job_evsched
10 (Null) M N (Null)
11 (Null) M N (Null)
12 (Null) M N (Null)
13 (Null) M N (Null)
14 (Null) M N (Null)
15 (Null) M N (Null)
16 (Null) M N (Null)
h5.
--test results #sleep-1#=0, #sleep-2#=1
--jobs (job_evsched/job_evsched2) run alternately, every events are enqued/processed
ID SYS_DATE STATUS PROCESSED PROCESSED_BY
25 22.03.2012 17:04:31 M J job_evsched_2
26 22.03.2012 17:04:32 M J job_evsched_2
27 22.03.2012 17:04:33 M J job_evsched
28 22.03.2012 17:04:34 M J job_evsched_2
29 22.03.2012 17:04:35 M J job_evsched_2
30 22.03.2012 17:04:36 M J job_evsched_2
31 22.03.2012 17:04:37 M J job_evsched
32 22.03.2012 17:04:38 M J job_evsched_2
h5.
--test results #sleep-1#=5, #sleep-2#=1
--jobs (job_evsched/job_evsched2) run alternately, only two events are enqued/processed
ID SYS_DATE STATUS PROCESSED PROCESSED_BY
41 22.03.2012 17:07:42 M J job_evsched_2
42 (Null) M N (Null)
43 (Null) M N (Null)
44 (Null) M N (Null)
45 (Null) M N (Null)
46 (Null) M N (Null)
47 22.03.2012 17:07:48 M J job_evsched
48 (Null) M N (Null)
*/hi, thank you for your (fast) answer! that is the solution to my problem!
now i have a follow-up question:
i've got a procedure, that runs between 1 and 2 minutes long. unlimited running lightweight jobs
would freeze the db...
how can the count of the parallel running lightweight-jobs be limited?
according to the documentation it is not possible:
There is no explicit limit to the number of lightweight jobs that can run simultaneously to process multiple instances of the event.
However, limitations may be imposed by available system resources.
could you explain to me, what it (...available system recources...) means?
eventually what i would like to have: max. two parallel running (lightweight) jobs....
thank you in advance, bye, á
ps: can i attach a file to the post anyway?
Edited by: user4786904 on 23.03.2012 07:22 -
Materialized View to run only once in a year...
Hi everybody...
I want to create a materialized view which will run only once in a year and specifically some minutes after 00:00 a.m. on new year's day,
so i created the following:
CREATE MATERIALIZED VIEW <mv_name>
BUILD IMMEDIATE
REFRESH START WITH TO_DATE('01/01/2007 00:15:00','DD/MM/RRRR HH24:MI:SS')
NEXT SYSDATE+366
I have two notes:
1) how to declare the refresh to be done the first new year's day after the day it'll be created , i mean not static date (01/01/2007)
2)some years are leap and some are not , so in order to run every new year's day how should i transform the above..????
3)is there any view which displays the next run of a materialized view..???
the view DBA_MV_REFRESH_TIMES displays the last refresh of mv's...
I use Oracle 10.2.0.1 on XP ...
Thanks , a lot
Simon1).
use the expression that evaluates to next january first.
SQL> select sysdate, add_months(trunc(sysdate, 'yyyy'), 12) from dual ;
SYSDATE ADD_MONTHS(
19-JUN-2006 01-JAN-2007
1 row selected.
SQL>2). for this also use the same expression that will evaluate to the january first of the year after that. -
How do I submit a job to run only once?
I have a stored procedure that submits a job. If this job fails, I don't want it to continue trying to run. Does anyone know how to ensure that it will only run once, no matter what?
I did try something similar to the following:
procedure proc_submitted_as_job(p_job_no number) is
begin
dbms_job.broken(p_job_no, true);
end;
However, I found out that if you change the Broken state while a job is running, then it gets reset when the job completes.
Basically, I'm using the dbms_job utility to run a long-running procedure in the background. If there's another way to obtain this same result, I'd love to hear it.I am still haveing problems so I will try and attach my program and see if you can help a little more that. It will probably be easier for you to look at this way. When you look at the diagram sequence 0 is the one the problem is in. In that sequence you will see a case structure and that is where the finite pulse train vi is. When case 1 is selected the finite pulse train will run again and again until I leave case 1. I need to have the program run the finite pulse train once and then wait and do nothing until the case is changed. The finite pulse train will be in all cases inside the case structure I just haven't done that yet, I am waiting until it works. The pulse train is used to move a stepper motor that is why running only once is im
portant because the stepper motor is used to position something.
Attachments:
AMC_Eagle_Both_Inputs_Working_2.vi 266 KB -
How do I get a case to run only once
I am using an e-series DAQ board to bring a pwm signal, then I use labview to use that signal to pick one of three cases. depending on the case picked a finite pulse stream is sent out. Currently the finite pulse vi keeps repeating because the the program stays in the case. I need a way to get labview to run the finite pulse output only once, and not run again until a new case is picked. I don't have the case in a while loop.
Thanks For The HelpI am still haveing problems so I will try and attach my program and see if you can help a little more that. It will probably be easier for you to look at this way. When you look at the diagram sequence 0 is the one the problem is in. In that sequence you will see a case structure and that is where the finite pulse train vi is. When case 1 is selected the finite pulse train will run again and again until I leave case 1. I need to have the program run the finite pulse train once and then wait and do nothing until the case is changed. The finite pulse train will be in all cases inside the case structure I just haven't done that yet, I am waiting until it works. The pulse train is used to move a stepper motor that is why running only once is im
portant because the stepper motor is used to position something.
Attachments:
AMC_Eagle_Both_Inputs_Working_2.vi 266 KB -
How to get lauchctl daemons/agents to run only once a day
How do you get a daemons/agents to run only once a day regardless of the error code of the .sh you are running?
(not I'm not looking for run once or run on reboot. I want a job to run at 3am every day and it has several bash commands in it. Regardless of the returns by any of the commands in the script, I only want this to run once - NO RESPAWN).Ok still not working.. here is the plist
the .sh file does file processing and then uploads xml files to my server and should run once a day. Here I have it running at 11:45am. It completes and then runs again and again and again.
The plist is placed in LaunchAgents and loaded with $launchctl load com.iclassicnu.crontabtest.plist
ideas?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>label</key>
<string>com.iclassicnu.crontabtest</string>
<key>ProgramArguments</key>
<array>
<string>/Users/dan/Desktop/iClassicNu/Idea/Forexite/ForexUpdate.sh</string>
</array>
<key>WorkingDirectory</key>
<string>/Users/dan/Desktop/iClassicNu/Idea/Forexite</string>
<key>OnDemand</key>
<false/>
<key>Nice</key>
<integer>1</integer>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>11</integer>
<key>Minute</key>
<integer>45</integer>
</dict>
<key>StandardErrorPath</key>
<string>/Users/dan/tmp/icnTest1.err</string>
<key>StandardOutPath</key>
<string>/Users/dan/tmp/icnTest1.out</string>
</dict>
</plist> -
Mass activity run to fill tables FKKMAKO,FKKMAZE,FKKMACTIVITIES
Dear All,
As per help.sap.com, it is mentioned that we need to do mass activity run for filling these Dunning tables(FKKMAKO,FKKMAZE,FKKMACTIVITIES). It is not mentioned the mass activity run names to fill these tables.
Please help me , what are the mass activity run to update these tables.NA
-
Why java allow start() method only once for a thread
Hi ,
Why java allows start method only once for thread . suppose
Thread t = new Thread();
t.start();
say at later stage if again we call t.start() IllegalStateException is thrown , even though isAlive method returns false.
Hence the question , why start() method is allowed only once.If you need start a thread , we need to create a new instance.Really. Why do you think that? Do you have any evidence? It is one of the first things I would think of, personally.Considering that the Thread API doesn't allow you to specify a stack address (only stack size), I think it demonstrates they wanted to remove that capability from their Thread API all together. That missing "capability" makes me believe they want me to believe it's not something I need to worry about when using their API... I think the exact semantics of the Thread class and its methods were driven by how to make it most understandable and usable for their customers. I'm certain this issue was one of many that was given considerable thought during the design and implementation of the JVM and the underlying runtime classes.
Do I have any evidence? No. But if you can point me at some first-hand information on this, I'd love to read it. Most of what I've found is second or third hand accounts. (and I mean that sincerely, not as a smart-ass remark or rebuke of your comments).
On the one hand you seem to think the Java API designers are idiots, on the other hand you think that they should be. I can't make it out.I thought my position was that the Java developers were talented enough to implement platform in whatever way their API called for; hence, the designers made a choice about how they wanted their API to be used by their customers. They decided which capabilities they wanted to include or exclude, and created an API that was consistent with their vision for this technology. While I'm certain technical limitations had an effect on the API design, I certainly don't think the API was dictated by the them.
I think the current design of the Java Thread API was a reflection of their vision to make Threading easier and more accessible to Joe Programmer, not limitations in the implementation. I never said it was wrong or that I could do better... I just said I think they could have done something different if they decided it would have made for a better customer experience. But hey, maybe I'm wrong. -
How to set a payload field value only once for multiple instances selected?
The user needs to set a payload field value and then he can approve the task so the task can continue through the process, that's fine when the user selects one instance and sets the value in the task details section and then clicks the approve button, but how do we achieve the same behavior in a multiple way?, I mean the user can select multiple tasks in the workspace (in this case the details task page is not available and instead the following label appear "Multiple tasks selected") then if the user clicks the Actions drop down -> APPROVE he only gets the message "your request was processed successfully", so how can the user modify the payload field value only once for all the selected tasks so when he clicks APPROVE the value is populated in all the instances selected.
Thanks,
Carlos.In the action which displays the edit page just set the form idx value before displaying the jsp.
-
Need to display records only once for that particular group
Hi,
I have a requirement like displaying repeated records only once for that particular group.
For eg, in the emp table, I need to display repeated deptno only once for the particular group of job.
And for the above requirement I have used the below query,
SELECT empno, DECODE (LAG (job, 1) OVER (ORDER BY job), job, NULL, job),
DECODE (LAG (deptno, 1) OVER (ORDER BY deptno), deptno, NULL, deptno)
FROM emp;
Output:
EMPNO JOB DEPTNO
7782 10
7934 CLERK
7839 PRESIDENT
7876 20
7788
7902 ANALYST
7566 MANAGER
7844 30
7900
7654 SALESMAN
7698
But in the above output you can find that, say deptno 10 is getting displayed only once, whereas I want that deptno 10 to be checked whether it is getting repeated within the group of JOB and than hide the deptno 10 only if it is repeated within that job group. If not, deptno 10 should be displayed again.
Please help me in this.
Regards,
ShivaHi,
Hope the below helps.
SELECT emp_id, job, deptno,
CASE WHEN LAG(deptno, 1) OVER (partition by job order by deptno) = deptno THEN null else deptno end
FROM empRegards
Ameya -
Excuse me, but I don't understand How I can contact a ADOBE expert to ask about my problem? I don't found a mail, or chat or other else...is it possible? Only help for Customer is on the Forum?!?!?
Someone can help me...thanks in advance.
fWhile it is possible you have a faulty unit I'd agree that the menu system took a step backwards with the itunes store centric take 2.0+ software. I think I'm in the minority here though. Apart from the 2.0+ top level interface being butt ugly and confusing to navigate, it simply isn't as responsive as 1.0/1.1 and I think most of this is to do with displaying a combined sync/stream menu. if you sync stuff try setting 'show only synced items' in the AppleTv device tabs in iTunes and see if it makes the issue go away - easy to revert back.
Huge libraries (number of files not actual size of the files) can also be problematic given AppleTV's modest hardware specs but that's more exception than the rule.
With streaming/syncing combined I also think any network deficiencies show up more than they used to. -
Dunning Block for Customer Disputed objects
Dear Colleagues,
I come with what seems to be a simple but interesting requirement from my customer, that I believe can turn out to be an interesting subject for discussion and knowledge exchange.
My customer requires having the possibility of creating several dispute cases, at different times with different partial amounts and different reasons, related to the same invoice. This is possible only through u201Ccustomer disputed amountu201D. With this functionality I can create several disputes linked to the same invoice, with partial amounts and different reasons.
The tricky part comes when the requirement also asks for automatic dunning block for the invoice, for each one of the dispute cases. Here I face with two basic problems:
1) There is only one dunning block at invoice level. (an invoice cannot have several dunning block reasons at the same time.
2) The automatic document changes through dispute cases is not for "customer disputed objects". It only creates and updates the dunning blocks on invoices that belong to a traditional dispute case ("Disputed Objects").
Has anyone faced a similar requirement before? any insights or suggestions regarding this process?
Thank you very much
Best Regards,
Luis AngeliHi Luis,
Customer disputed objects are meant to capture customer disputes prior to the receipt of payment.
They can be used to create many disputes for a single invoice.
However a single invoice can only be disputed once.
Further to this, if different parts of an invoice are disputed, the dunning block should only be removed once all issues against the invoice are resolved.
It could be an idea to create a single dispute against an invoice, and then get different people to resolve the different issues.
You may also want to consider how you are creating your invoices - it could be that you split them down further so there is only a single dispute against an invioce. -
Using an NDS statement for a SQL stament run only once in a proceudure
Hi,
We're using Oracle 11.1.0.7.0.
I'm going through code written by someone else. In this package they're using NDS for every SQL call whether it gets called multiple times or just once. Is that a good thing?
I thought NDS was only reserved for SQL statements that get called over and over again in a procedure with possible varying 'WHERE clause' variables and so on...
Is there ANY benefit to using NDS for SQL queries called only once in a procedure?
ThanksThere is no benefit unless you want to turn PL/SQL into SQL*Plus (parse once, run once)
Procedures exist to make sure : parse at compile time, run many times.
The code is shooting itself in its own foot.
Or the developer must have got hold of Tom Kyte's unpublished one chapter book 'How to write unscalable applications'.
Sybrand Bakker
Senior Oracle DBA -
Running a query only once for a report in Reports 6i in a BEFORE REPORT trigger.
Hello all -
I am using Oracle Reports 6i on Windows NT 4.0 SP 6.0.
The report I am converting from Access to Oracle Reports is
rather complex, and features detail by decile (a rank) within
territory (geographical sales area). Also it features a summary
at the bottom of each territory/decile combination which
summarizes not only the territory information, but goes above
that to higher levels like district, region, and national.
With the help of a consultant, we have managed to get the report
almost finished. However, we are running into a snag with the
summary. While my two main queries need to run in the data
model as normal, I would like to run the summary query _only
once_ during the entire cycle of the report, and have the report
fields populated once for the entire report. This is possible
because for a district, the summary numbers are the same on
every page of the report, only the territory information
changes. So by only having the query run once and fill the
report values once, this would save considerably on the report
runtime.
However, I have tried a few different methods but cannot get the
report to recognize the fields in the query, most likely because
they are out of scope at report creation. Does anyone have any
ideas on how I can accomplish this in Reports? Any help would
be appreciated - I hope my question was clear, if not please let
me know.
Thanks,
-Jennifer PrichardHello!
You can place in the data model editor formula and placeholder
columns outside of any groups. I think you need for each of your
summary-attibutes a placeholder column and one formula column.
Use the formula column to populate the placeholders via PL/SQL.
Afterwords you can reference the placeholders anywhere you want.
Regards,
Hajo Winkler
Maybe you are looking for
-
Status list based on status lists.../ Indicator values always 0
Hi, any help or thoughts would be appreciated. Basically what I'm doing is calculating status list values based on data in excel sheets. This seems to work as expected. I'll call these sub-status lists from now on. The next thing I wanted to do is ha
-
Installing Solaris Express 11 on a USB stick
Hi, I am in the process of building a resilient development/testing lab server using 4 SATA disks in a RAIDZ configuration, I want to boot the host SE 11 o/s off a internal USB stick to manage this server, so my question is how do I go about installi
-
How does update installation work?
Does it overwrite existing files or append the new ones? Will the new 10.5.3 update take the whole 420MB as additional disk space or will it just change existing files? Message was edited by: Mc Apple
-
CSM Redundancy : FT or HSRP +FT .. Which is the better option?
Hi, I would like to know for redundancy between CSMs which is the better option FT or HSRP with FT.. and why ? Regards Kas
-
After entering wrong passcode and I don't have the computer where I sync first time my iphone How can I activate again in other computer? Thank you Have a great day