Schedule Job Execution problem
Hi All,
The schedule jobs are taking more time.... to complete
We have schdule jobs which will run for every hour,soo to execute the job sometimes it is taking 1hr and sometime 30mins
please help me to have the Job execution total time to be constant to near 30mins.
preethi wrote:
Hi All,
The schedule jobs are taking more time.... to complete
We have schdule jobs which will run for every hour,soo to execute the job sometimes it is taking 1hr and sometime 30mins
please help me to have the Job execution total time to be constant to near 30mins.Thread: HOW TO: Post a SQL statement tuning request - template posting
HOW TO: Post a SQL statement tuning request - template posting
Similar Messages
-
Hi,
I have procedure p1.
I want to execute it through scheduler where interval could be daily.
BEGIN
DBMS_SCHEDULER.create_job
( job_name => 'emp_job',
job_type => 'PLSQL_BLOCK',
job_action => 'begin pack.p1;commit;end;',
repeat_interval => 'FREQ=daily',
enabled => TRUE,
comments => 'Auto Refresh'
END;
it executed successfully but pack.p1 not executed but if i run exec pack.p1 it is working fine ]
Please help me what is missing here.
RegardsCan you please run this below snippet
BEGIN
DBMS_SCHEDULER.create_job (job_name => 'emp_job',
job_type => 'PLSQL_BLOCK',
job_action => 'begin pack.p1;commit;end;',
repeat_interval => 'FREQ=DAILY; BYHOUR=6;',
enabled => TRUE,
comments => 'Auto Refresh');
END;
Check what you see as output with the below query.
select state from dba_scheduler_jobs where job_name = 'EMP_JOB';
If it shows 'Scheduled' then its fine.. All this stuff is beatifully depicted in the link I gave u in my earlier post.
To run the job right away and check, execute the below:
BEGIN
DBMS_SCHEDULER.run_job ('emp_job', FALSE);
END;
Also can you add a proper exception handler in that job_action block.
Cheers,
Manik. -
Problem with variable in scheduled job
I'm trying to get the following scheduled job to run:
switch(config)# scheduler job name backup_job
switch(config-job)# cli var name timestamp $(TIMESTAMP) ; copy running-config bootflash:/$(SWITCHNAME)-cfg.$(timestamp) ; copy bootflash:/$(SWITCHNAME)-cfg.$(timestamp) tftp://1.2.3.4/
switch(config-job)# exit
switch(config)# scheduler schedule name backup_timetable
switch(config-schedule)# job name backup_job
switch(config-schedule)# time daily 1:23
switch(config-schedule)# exit
switch(config)# exit
This job is taken directly from multiple Cisco MDS and Nexus documents. From what I can tell, the purpose of this job is to save the running configuration to a file on bootflash with date & time in the file name and then to copy the file from bootflash to tftp server.
I can create the job and schedule successfully:
switch(config)#show scheduler job name backup_job
Job Name: backup_job
cli var name timestamp $(TIMESTAMP)
copy running-config bootflash:/$(SWITCHNAME)-cfg.$(timestamp)
copy bootflash:/$(SWITCHNAME)-cfg.$(timestamp) tftp://1.2.3.4
==============================================================================
switch(config)#show scheduler schedule name backup_timetable
Schedule Name : backup_timetable
User Name : admin
Schedule Type : Run every day at 10 Hrs 48 Mins
Last Execution Time : Tue Mar 6 10:48:00 2012
Last Completion Time: Tue Mar 6 10:48:00 2012
Execution count : 1
Job Name Last Execution Status
backup_job Success (0)
==============================================================================
The scheduled job runs successfully but the files that are created have the variable $(TIMESTAMP) in the file name instead of the actual date and time e.g. switch-cfg.$(TIMESTAMP)
The logfile contains the following:
Schedule Name : backup_timetable User Name : admin
Completion time: Tue Mar 6 10:59:26 2012
--------------------------------- Job Output ---------------------------------
`cli var name timestamp $(TIMESTAMP)`
`copy running-config bootflash:/PEN-9509-2-cfg.$(TIMESTAMP) `
Copy complete, now saving to disk (please wait)...
`copy bootflash:/PEN-9509-2-cfg.$(TIMESTAMP) tftp://1.2.3.4 `
Trying to connect to tftp server......
Connection to server Established. Copying Started.....
It looks to me that the $(timestamp) variable is being created successfully and is being replaced with the $(TIMESTAMP) variable but this is not being replaced with the actual date and time.
The thing I don't get is that this looks to me that we're trying to nest variables and the same Cisco documents from which I get this configuration also state that nested variables are not allowed.
I have tried this on different hardware - MDS9500, MDS9100, Nexus 5000, Nexus 7000 and different software - SAN-OS 3.3, NX-OS 4.1, NX-OS 5.2 but cannot get it to work. I have also tried to put the commands in a script and run with the run-script command but it still does not work.
There is probably another method to achieve what this configuration is trying to achieve (and I would like to know if there is) but I want to know if this particular configuration will work.
Can anyone tell me if they have got this working or can see what I'm doing wrong or can try running this in a lab please?I managed to get this resolved with a bit of a workaround. If I put the copy commands in a script and pass the variable to the run-script command as part of the scheduled job then it works ok. Trying to create the variable within the script (or as a separate scheduled job command) still doesn’t work.
So, creating a script file (script) as follows:
copy running-config bootflash:/$(SWITCHNAME)-cfg.$(timestamp)
copy bootflash:/$(SWITCHNAME)-cfg.$(timestamp) tftp://1.2.3.4
and creating a scheduled job with the following command:
run-script bootflash:script timestamp=”$(TIMESTAMP)”
achieves the desired result. -
Problem editing scheduled jobs
I just had a problem where 3.1, EA1 and EA2 all failed to edit a scheduled job in sqldev. A coworker was able to make the same edit using the same database ID, except he did it through SQL*Plus - that made me suspect a bug in sqldev.
Here are the symptoms:
In sqldev 3.1 (any flavor) > Scheduler > Jobs > edit an existing job > try to edit the JOB_ACTION field. In 3.1, double-clicking in the field only highlights the current word - it does not give me a cursor, and I cannot edit the contents.
In sqldev 3.0.4, editing the same job works as expected. I can edit the field, and save the changes.
Note that the server that I connect to is remote - it is hosted by Oracle OnDemand.Doesn't work for me either;
Here's the exception dumped in the console when selecting Edit:
oracle.classloader.util.AnnotatedNoClassDefFoundError:
Missing class: antlr.TokenStream
Dependent class: org.antlr.stringtemplate.language.DefaultTemplateLexer
Loader: ide-global:11.1.1.0.0
Code-Source: /C:/Archivos%20de%20programa/sqldeveloper3.1.06.82/sqldeveloper/lib/stringtemplate-3.1b1.jar
Configuration: <classpath> in /file:/C:/Archivos de programa/sqldeveloper3.1.06.82/sqldeveloper/extensions/oracle.sqldeveloper.jar!/META-INF/extension
.xml
The missing class is not available from any code-source or loader in the system.
at oracle.classloader.PolicyClassLoader.defineClass(PolicyClassLoader.java:2387)
at oracle.classloader.PolicyClassLoader.findLocalClass(PolicyClassLoader.java:1546)
at oracle.classloader.SearchPolicy$FindLocal.getClass(SearchPolicy.java:226)
at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119)
at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1728)
at oracle.classloader.PolicyClassLoader.access$000(PolicyClassLoader.java:143)
at oracle.classloader.PolicyClassLoader$LoadClassAction.run(PolicyClassLoader.java:331)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1692)
at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1674)
at org.antlr.stringtemplate.StringTemplateGroup.<clinit>(Unknown Source)
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.initGroupLoader(DBMSSchedulerCodeGenerator.java:321)
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.<init>(DBMSSchedulerCodeGenerator.java:298)
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.getInstance(DBMSSchedulerCodeGenerator.java:309)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2$ListTask.getQuery(NewJobCreateBase2.java:94)
at oracle.dbtools.raptor.backgroundTask.utils.DatabaseQueryTask.<init>(DatabaseQueryTask.java:62)
at oracle.dbtools.raptor.backgroundTask.utils.DatabaseQueryTask.<init>(DatabaseQueryTask.java:48)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2$ListTask.<init>(NewJobCreateBase2.java:86)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2.getListTask(NewJobCreateBase2.java:58)
at oracle.dbtools.scheduler.panels.common.ActionDialogBase.launch(ActionDialogBase.java:29)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2.launch(NewJobCreateBase2.java:81)
at oracle.dbtools.raptor.controls.sqldialog.ObjectActionController.handleEvent(ObjectActionController.java:192)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:884)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:501)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
at java.awt.Component.processMouseEvent(Component.java:6289)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6054)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4652)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:603)
at java.awt.EventQueue$1.run(EventQueue.java:601)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:617)
at java.awt.EventQueue$2.run(EventQueue.java:615)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)And consecutive tries:
java.lang.NoClassDefFoundError: Could not initialize class org.antlr.stringtemplate.StringTemplateGroup
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.initGroupLoader(DBMSSchedulerCodeGenerator.java:321)
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.<init>(DBMSSchedulerCodeGenerator.java:298)
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.getInstance(DBMSSchedulerCodeGenerator.java:309)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2$ListTask.getQuery(NewJobCreateBase2.java:94)
at oracle.dbtools.raptor.backgroundTask.utils.DatabaseQueryTask.<init>(DatabaseQueryTask.java:62)
at oracle.dbtools.raptor.backgroundTask.utils.DatabaseQueryTask.<init>(DatabaseQueryTask.java:48)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2$ListTask.<init>(NewJobCreateBase2.java:86)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2.getListTask(NewJobCreateBase2.java:58)
at oracle.dbtools.scheduler.panels.common.ActionDialogBase.launch(ActionDialogBase.java:29)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2.launch(NewJobCreateBase2.java:81)
at oracle.dbtools.raptor.controls.sqldialog.ObjectActionController.handleEvent(ObjectActionController.java:192)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:884)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:501)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
at java.awt.Component.processMouseEvent(Component.java:6289)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6054)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4652)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:603)
at java.awt.EventQueue$1.run(EventQueue.java:601)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:617)
at java.awt.EventQueue$2.run(EventQueue.java:615)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)Hope that helps for debugging,
K. -
How to get status of last execution of a scheduler job
Hi,
I am trying to write a pl/sql code that can manually the scheduler job (one time type/ not a repetitive) which are in retry scheduled state.
even after execution is successfull job is not dropped even if i set auto_drop to true.
I need some way to capture execution status of dbms_scheduler.run_job('job_name');. based on which i can manually drop the job if it is successfull.
taking the value from dba_scheduler_job_run_details doesn't seem to be good option as there may be multiple logs and we don't what time interval we need to match.
can anybody help me in this.
Thanks in advance.Hi,
I'm a little confused at what is happening. It sounds like the following is the case
- You have created a run-once job and set restartable to TRUE and auto-drop to TRUE. It has failed a few times and is now in the RETRY SCHEDULED STATE .
- Now you have fixed the issue and want to force a rerun and drop the job if it has succeeded.
If this is the case you have several options.
- just wait until the job has retried itself, you can see the next scheduled date in the dba_scheduler_jobs view
- use dbms_scheduler.run_job(use_current_session=>false) . You will have to monitor dba_scheduler_job_run_details to see the status of the job run but you can easily use log_date to figure out which row is your row. Just select the row with log_date > sysdate when you called run_job. If that run succeeds, you will manually need to call drop_job.
- use dbms_scheduler.run_job(use_current_session=>true) . Because this runs the job action in the foreground it will hang until the job action has finished. Any error will be thrown as a foreground PL/SQL error. If there is no error, the action has succeeded and you can go ahead and do a drop_job.
Hope this helps,
Ravi. -
Schedules Error - Job execution failed because the user who scheduled this
Hi
I wonder if anyone can help
I have a report that I can deliver by email through the BI Publsiher front end without issue. However when I call the report to send by email through my oracle 11G Database, as the same BI User I get the following error message
"oracle.apps.xdo.servlet.scheduler.ProcessingException: Job execution failed because the user who scheduled this job has no more permission or priviledge to run the job."
Any suggestions?
Thanks
KevThe scheduler appears to be the culprit here so try the following:
1. Open the [repository_home]/Admin/Scheduler/quartz-config.properties file
2. Add the following entry:
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread=true
3. Restart the environment (xmlpserver)
4. Rerun the report via the scheduler -
Problem in Date info at scheduling jobs....
Hi...
I have defined a materialized view ..
create materialized view mv_ekkrem_vlavon
build immediate
refresh on demand
as
select distinct seq_code_eidos .....I want to create a scheduled job using the DBMS_SCHEDULER which will refresh this materialized view ... doing a full refresh of its contents....
so....i following the following steps...-connected as sys:
begin
dbms_scheduler.drop_job('mv_ekkrem_vlavon_job');
end;
begin
dbms_scheduler.drop_schedule('mv_ekkrem_vlavon');
end;
begin
dbms_scheduler.create_schedule
('mv_ekkrem_vlavon','15/08/2007 17:20:00','FREQ=DAILY;INTERVAL=1');
end;
exec dbms_scheduler.create_job(job_name=>'mv_ekkrem_vlavon_job',schedule_name=>'mv_ekkrem_vlavon',job_type=>'PLSQL_BLOCK',job_action=> 'BEGIN dbms_mview.refresh(''mv_ekkrem_vlavon''); END;');
exec dbms_scheduler.enable('mv_ekkrem_vlavon_job');However , after 17:20:00 local time (db time) the mv refresh did not take place....
Trying to find out what may be the reason... i issued the following command:
SQL> select job_name,schedule_name,start_date,repeat_interval,last_start_date,next_run_date from dba_scheduler_jobs
2 where job_name='MV_EKKREM_VLAVON_JOB';
JOB_NAME SCHEDULE_NAME START_DATE REPEAT_INTERVAL LAST_START_DATE NEXT_RUN_DATE
MV_EKKREM_VLAVON_JOB MV_EKKREM_VLAVON 15/08/20 07:17:20,000000 +03:00 15/08/20 07:17:20,000000 +03:00and issuing the command:
SQL> select to_char(NEXT_RUN_DATE,'dd/mm/rrrr hh24:mi') from dba_scheduler_jobs where job_name='MV_EKKREM_VLAVON_JOB';
TO_CHAR(NEXT_RUN_DATE,'DD/MM/R
15/08/2020 07:17
SQL> Select to_char(START_DATE,'dd/mm/rrrr hh24:mi') from dba_scheduler_jobs where job_name='MV_EKKREM_VLAVON_JOB'
2 /
TO_CHAR(START_DATE,'DD/MM/RRRR
15/08/2020 07:17
Can you find out which is the error in the job definition...????
Needless to write that i use Oracle Db10g.
Many thanks,
SimonHi,
The repeat_interval gets its timezone from the start_date parameter so if you want the job to run every 9am in a particular timezone XXX you would need to do something like
START_DATE => SYSTIMESTAMP at time zone 'XXX',
REPEAT_INTERVAL => 'FREQ=DAILY; BYHOUR=9;byminute=0;bysecond=0',
XXX can be something like -2:00 or a named time zone.
There is a dedicated dbms_scheduler forum at
Scheduler
Hope this helps,
Ravi. -
DBMS scheduler jobs running twice
Hi,
I have 4 DBMS scheduler jobs , which checks for a specific job status in DB and sends an email , when i started the schedule for the first week the jobs executed fine from next week I am getting two emails from each job , when i check the logs USER_SCHEDULER_JOB_RUN_DETAILS I see only one run , which seems weird to me so i disabled one job and left the three jobs in schedule , next time i got two emails from 3 jobs and one from disabled job . After checking logs i see that there is no entry of the disabled job execution . I am not sure where is the problem i can't find any log from where the disabled job executing. Please help me
Job schedule is to run every Saturday
Interval setup :
start_date => trunc(SYSDATE)+ 8.5/24,
repeat_interval => 'TRUNC(LEAST(NEXT_DAY(SYSDATE,''SATURDAY'') )) + 8.5/24'
SureshHi,
I tried to schedule the same jobs using DBMS_JOB but i still get the same problem , I created the procedure with all code in and scheduled it using dbms job , first day it run once second day it run twice ( sending two emails) Inow i am not sure if issue is with my code or scheduler
Procedure
Declare
v_count number;
v_Recipient VARCHAR2(400) := '[email protected]';
v_Subject VARCHAR2(80) := 'TEST_Email';
v_Mail_Host VARCHAR2(30) := 'localhost';
v_Mail_Conn utl_smtp.Connection;
crlf VARCHAR2(2) := chr(13)||chr(10);
BEGIN
select count(*) into v_count from TEC_CODERETURN@RPRD where interface like 'FOR002B' and trunc(rundate) =trunc(sysdate);
if v_count = 0
then
v_Mail_Conn := utl_smtp.Open_Connection(v_Mail_Host, 25);
utl_smtp.Rcpt(v_Mail_Conn, '[email protected]');
UTL_SMTP.OPEN_DATA(v_Mail_Conn);
utl_smtp.WRITE_RAW_DATA(v_Mail_Conn, UTL_RAW.CAST_TO_RAW(
'Date: ' || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || UTL_TCP.CRLF ||
'From: ' || '[email protected]' || UTL_TCP.CRLF ||
'Subject: '|| v_Subject || UTL_TCP.CRLF ||
'To: ' || v_Recipient || UTL_TCP.CRLF ||
'This is a test Alert'|| UTL_TCP.CRLF
UTL_SMTP.CLOSE_DATA(v_mail_conn);
utl_smtp.Quit(v_mail_conn);
end if;
EXCEPTION
WHEN utl_smtp.Transient_Error OR utl_smtp.Permanent_Error then
raise_application_error(-20000, 'Unable to send mail: '||sqlerrm);
END;
DBMS job creation
DECLARE
jobno NUMBER;
BEGIN
DBMS_JOB.submit
(job => jobno,
what => 'TEST_ALERT;',
next_date => trunc(sysdate)+0.1/24,
interval => 'SYSDATE + 1',
no_parse => TRUE );
DBMS_OUTPUT.put_line ('Created Job - the job number is:' || TO_CHAR (jobno));
COMMIT;
END;
Suresh -
DS run longer with scheduled job as compare to manual run
I have scheduled a job through Management Console (MC) to run everyday once at
certain time. After some time, maybe after 15 days of running, the execution
time has increased to double from 17 mins to 67 mins by one time jump. After
that, the job kept running and spent 67 mins to complete.
The nature of the job is to generate around 400 output flat files from a
source db2 table. Under efficient running time, 1 file took around 2 seconds to
generate. But now it became taking 8 seconds to generate one file. The data
volume and nature of the source table didn't change, so that was not the root
cause of increasing time.
I have done several investigations and the results as such:
1) I scheduled again this job at MC to run for testing, it would take 67 mins
to complete. However, if I manually run this job thorough MC, it would take
17 mins efficient time to run.
2) I replicated this job to a second job as a copy. Then I scheduled this
copied job at MC to run, it would take 67 mins to run. But if I manually run
this job through MC, it will take 17 mins to run.
3) I created another test repo and load this job in. I scheduled the job to
run at this new repo, it would take 67 mins to run. If I manually run the job
through MC, it only took 17 mins to run.
4) Finally, I manually executed the job through unix job scripts command,
which is one of the scheduled job entry in the cron file, such as
./DI__4c553b0d_6fe5_4083_8655_11cb0fe230f4_2_r_3_w_n_6_40.sh, the job also would take 17
mins to run to finish.
5) I have recreated the repo to make it clean and reload back the jobs and
recreated again the schedule. Yet it still took 67 mins to run scheduled job.
Therefore, the conclusion is why it takes longer time to run by scheduling
method as compare to manually running method?
Please provide me a way to troubleshoot this problem. Thank you.
OS : HPUX 11.31
DS : BusinessObjects Data Services 12.1.1.0
databasee : DB2 9.1Yesterday we had done another test and indirectly made the problem to go
away. We changed the generated output flat file directory from current directory
of /fdminst/cmbc/fdm_d/bds/gl to /fdminst/cmbc/fdm_d/bds/config directory to
run, to see any difference would make. We changed the directory pointing
inside Substitution Parameter Configurations windows. Surprisingly, job had
started to run fast and completed in 15 minutes and not 67 minutes anymore.
Then we shifted back and pointed the output directory back to original
/fdminst/cmbc/fdm_d/bds/gl and the job has started to run fast ever since and all
completed in 15 minutes. Even we created ad hoc schedule to run and it was
still running fast.
We not sure why it was solved by shifting directory away and shifting back,
and whether this had to do with BODS problem or HP Unix system environment
problem. Nonetheless, the job is started to run normally and fast now as we
test. -
Custom Schedule Job Issue - OIM 11g R2
Hi All,
I deployed a custom schedule task to assign a role to a user and created a schedule job for the same.
The problem is my job is executing twice even though I ran it for one time and getting exception saying Role already assigned..
please tell me how to make execute job only once on one execution
Thanks in advance
Praveen...sorry, for late reply...
I tried restarting servers... no luck....
1)java code
public class TerminateAbscondUsers extends TaskSupport
ODLLogger logger = ODLLogger.getODLLogger("OIMCP.SAPH");
UserManager usrMgr = Platform.getService(UserManager.class);
public HashMap getAttributes()
return null;
public void setAttributes()
public void execute(HashMap hashMap)
logger.info("Entered TerminateAbscondUsers:execute() method");
Long abscondDays = (Long)hashMap.get("AbscondDays");
logger.info("Abscond Days = "+ abscondDays);
List<User> resultUserList = getUserList();
disableUsers(resultUserList,abscondDays);
logger.info("Left TerminateAbscondUsers:execute() method");
public List<User> getUserList()
logger.info("Entered TerminateAbscondUsers:getUserList() method");
HashSet<String> reqAttr = new HashSet<String>();
reqAttr.add("User Login");
reqAttr.add("Status");
//reqAttr.add("EventDate");
reqAttr.add("DateOfAbsconding");
List<User> usrList = new ArrayList<User>();
SearchCriteria usrIDSearchCriteria = new SearchCriteria("Action","AB",SearchCriteria.Operator.EQUAL);
try
usrList = usrMgr.search(usrIDSearchCriteria,reqAttr,null);
logger.info("Absconded userList size ="+ usrList.size());
catch(UserSearchException use)
logger.info("UserSearchExecption = " + use.getMessage());
catch(Exception e)
logger.info("Exception TerminateAbscondUsers:getUserList() = " +Arrays.toString(e.getStackTrace()));
logger.info("Absconded usrList = " + usrList.toString());
logger.info("Left TerminateAbscondUsers:getUserList() method");
return usrList;
public void disableUsers(List<User> resultUserList, Long abscondDays)
logger.info("Entered TerminateAbscondUsers:disableUsers() method");
UserManagerResult localUserManagerResult1;
UserManagerResult localUserManagerResult2;
try
for(int i=0;i<resultUserList.size();i++)
String userLogin = resultUserList.get(i).getLogin();
logger.info("User Login = " + userLogin);
Long userKey = (Long)resultUserList.get(i).getAttribute("usr_key");
String strUsrKey = userKey.toString();
logger.info("User key = " + strUsrKey);
//Date abscondDate = (Date)resultUserList.get(i).getAttribute("EventDate");
Date abscondDate = (Date)resultUserList.get(i).getAttribute("DateOfAbsconding");
Date currentDate = new Date();
Long diffDate = (Long)((currentDate.getTime() - abscondDate.getTime())/(1000*60*60*24));
if( diffDate > abscondDays)
logger.info("diff date = " + diffDate);
User localUser = new User(strUsrKey);
localUser.setAttribute("End Date",(Object)currentDate);
localUser.setAttribute("Action","TE");
localUserManagerResult1 = usrMgr.modify(localUser);
logger.info("Set End Date operation status = " + localUserManagerResult1.getStatus());
localUserManagerResult2 = usrMgr.disable(userLogin,true);
logger.info("Terminate operation status = " + localUserManagerResult2.getStatus());
catch(ValidationFailedException vfe)
logger.info("ValidationFailedException = " + vfe.getMessage());
catch(UserDisableException ude)
logger.info("UserDisableException = " + ude.getMessage());
catch(NoSuchUserException nsue)
logger.info("NoSuchUserException = " + nsue.getMessage());
catch(UserModifyException ume)
logger.info("UserModifyException = " + ume.getMessage());
catch(Exception e)
logger.info("Exception TerminateAbscondUsers:getUserList() = " +Arrays.toString(e.getStackTrace()));
logger.info("Left TerminateAbscondUsers:disableUsers() method");
2) METADATA XML
<scheduledTasks xmlns="http://xmlns.oracle.com/oim/scheduler">
<task>
<name>Terminate Abscond Users</name>
<class>com.hdfclife.oracle.iam.customScheduler.user.TerminateAbscondUsers</class>
<description>Terminate Abscond Users</description>
<retry>5</retry>
<parameters>
<number-param required="true" helpText="No. of days since Absconded">AbscondDays</number-param>
</parameters>
</task>
</scheduledTasks>
Thanks in Advance... -
Scheduling Job every hour in business time
Hi Fiends,
I had a Problem , Id Like to Schedule the execution a Procedure every 'HH24:03' but this job will run only between 08:00AM and 05:00PM
How Can i do This.
Tks
ZanderOff the top of my head
begin
dbms_scheduler.create_schedule
( schedule_name => 'weekday_execution',
start_date=> trunc(sysdate)+8/24,
repeat_interval=> 'FREQ=DAILY; BYDAY=MON,TUE,WED,THU,FRI; BYHOUR=08,09,10,11,12,13,14,15,16,17',
comments => 'Weekday schedule based on MON-FRI 8 to 5');
end;Then create a program and a job.
Best Regards
mseberg -
Hi
I created several KM scheduler jobs.
The problem is that they are running in the context of Guest user, and i could find any way to change this.
Because of that when i try to call new InitialContext () for calling some remote ejbs i get caller not autorized.
So does somebody know how i can change this?
Florinhi,
if you ejb connect to backend, you need to configure an service user who has authorized to call
the rfc functions in R/3.
Kind regards
Ben.J. -
Hi All,
We have Hyperion System 9 9.3.3. We have a Daily job scheduled every morning to check the status of the scheduled jobs that run daily. One of the jobs has a status message as below.
Failure - Internal error.ContainerCache.populate: The object "0000011386a6823b-0000-a99f-0a103a4a" is not found. It either does not exists, or it may be inaccessible.
But when I check the job status in View Job Status > Job Scheduler module, I see the report is still running. It's just that this report is taking longer to run and completes some time after the Daily Job Status check report runs.
In this case, shouldn't the status should say something like the job is still running instead of "Failure" which is misleading?
Thanks in advance.
ZHi,
I have the same problem with Oracle EPM 11.1.2:
com.sqribe.transformer.ObjectNotFoundException: ContainerCache.populate: The object "0000012f0710ca12-0000-a4ad-c0a80003" is not found. It either does not exists, or it may be inaccessible.
Who gives me the right answer?
Thanks in advance, Ron -
Error when scheduling job (JOB_SUBMIT) when execute PC in WAD
Dear BIers,
I execute a Process Chain in commond button of WAD, however, I got the error message:
Job BI_PROCESS_DTP_LOAD could not be scheduled. Termination with returncode 8
Returncode '8' means ' Error when scheduling job (JOB_SUBMIT).
Any suggestions are appreciated.
B.R
GeraldDear Raju,
Have you checked SM21? Maybe you have a problem with your TemSe object. If this is the case a basis guy should know how to handle it.
Greetings,
Stefan -
OIM 11 - Error while running scheduled job "Evaluate User Policies"
Hello,
We are trying to run the OOTB scheduled job " EValuate User Policies" with the default parameters. Job history shows the execution status success but diagnostic logs throw the following error. And the users donot get provisioned to their resources based on the access policies.
We are on OIM 11 BP05.
[2013-01-30T10:11:47.072-05:00] [oim_server1] [NOTIFICATION] [IAM-0080006] [oracle.iam.platform.kernel.impl] [tid: Thread-1033] [userId: oiminternal] [ecid: 3f3dc64898fb7625:-13c8cd5d:13c88a6943c:-8000-0000000000000002,1:26684] [APP: oim#11.1.1.3.0] Orchestration process moved to failed stage, and the corresponding error is - {0}[[
oracle.iam.platform.kernel.EventFailedException: Operation - EVALUATE_POLICIES that is submitted as part of the orchestration is not supported.
at oracle.iam.platform.kernel.impl.EntityDefaultActionHandler.execute(EntityDefaultActionHandler.java:53)
at oracle.iam.platform.kernel.impl.DefaultActionHandler.execute(DefaultActionHandler.java:41)
at sun.reflect.GeneratedMethodAccessor5717.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at oracle.iam.platform.kernel.impl.EventHandlerDynamicProxy.invoke(EventHandlerDynamicProxy.java:30)
at $Proxy254.execute(Unknown Source)
at oracle.iam.platform.kernel.impl.OrchProcessData.runActionEvents(OrchProcessData.java:1036)
at oracle.iam.platform.kernel.impl.OrchProcessData.runEvents(OrchProcessData.java:644)
at oracle.iam.platform.kernel.impl.OrchProcessData.executeEvents(OrchProcessData.java:227)
at oracle.iam.platform.kernel.impl.OrchestrationEngineImpl.resumeProcess(OrchestrationEngineImpl.java:764)
at oracle.iam.platform.kernel.impl.OrchestrationEngineImpl.process(OrchestrationEngineImpl.java:519)
at oracle.iam.platform.kernel.impl.OrchestrationEngineImpl.orchestrate(OrchestrationEngineImpl.java:459)
at oracle.iam.platform.kernel.impl.OrchestrationEngineImpl.orchestrate(OrchestrationEngineImpl.java:378)
at oracle.iam.accesspolicy.impl.AccessPolicyServiceInternalImpl.evaluatePoliciesForUser(AccessPolicyServiceInternalImpl.java:78)
at oracle.iam.accesspolicy.api.AccessPolicyServiceInternalEJB.evaluatePoliciesForUserx(Unknown Source)
at sun.reflect.GeneratedMethodAccessor5730.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy574.evaluatePoliciesForUserx(Unknown Source)
at oracle.iam.accesspolicy.api.AccessPolicyServiceInternalEJB_bgsblp_AccessPolicyServiceInternalRemoteImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
at oracle.iam.accesspolicy.api.AccessPolicyServiceInternalEJB_bgsblp_AccessPolicyServiceInternalRemoteImpl.evaluatePoliciesForUserx(Unknown Source)
at sun.reflect.GeneratedMethodAccessor5727.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
at $Proxy164.evaluatePoliciesForUserx(Unknown Source)
at sun.reflect.GeneratedMethodAccessor5726.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy421.evaluatePoliciesForUserx(Unknown Source)
at oracle.iam.accesspolicy.api.AccessPolicyServiceInternalDelegate.evaluatePoliciesForUser(Unknown Source)
at com.thortech.xl.schedule.tasks.tcTskUsrEvaluatePolicies$PolicyEvalWorker.run(tcTskUsrEvaluatePolicies.java:319)
at java.lang.Thread.run(Thread.java:662)
at com.thortech.xl.scheduler.tasks.SchedulerBaseTask$XLSchedulerThread.run(SchedulerBaseTask.java:157)
[2013-01-30T10:11:47.081-05:00] [oim_server1] [NOTIFICATION] [IAM-0080046] [oracle.iam.platform.kernel.impl] [tid: Thread-1030] [userId: oiminternal] [ecid: 3f3dc64898fb7625:-13c8cd5d:13c88a6943c:-8al.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
at oracle.iam.accesspolicy.api.AccessPolicyServiceInternalEJB_bgsblp_AccessPolicyServiceInternalRemoteImpl.evaluatePoliciesForUserx(Unknown Source)
at sun.reflect.GeneratedMethodAccessor5727.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
at $Proxy164.evaluatePoliciesForUserx(Unknown Source)
at sun.reflect.GeneratedMethodAccessor5726.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy421.evaluatePoliciesForUserx(Unknown Source)
at oracle.iam.accesspolicy.api.AccessPolicyServiceInternalDelegate.evaluatePoliciesForUser(Unknown Source)
at com.thortech.xl.schedule.tasks.tcTskUsrEvaluatePolicies$PolicyEvalWorker.run(tcTskUsrEvaluatePolicies.java:319)
at java.lang.Thread.run(Thread.java:662)
at com.thortech.xl.scheduler.tasks.SchedulerBaseTask$XLSchedulerThread.run(SchedulerBaseTask.java:157)
Any answer is highly appreciated.
Thanks,
MBiswalOk, did you reimported the /metadata/iam-features-accesspolicy/event-definition/EventHandlers.xml from the BundlePatch folder?
Have you followed Addendum to OIM 11.1.1.5.6 Bundle Patch 06 Readme (Doc ID 1543504.1)?
Maybe you are looking for
-
My iphone 3gs crashes once or twice per week.
as i mentioned, my phone comes dead every week, despite wiz full battery life or on charge, it crashes or when i woke up in the morning, i find it off. i have restore it once and updated the software to 3.0.1 but it is still crashing weekly. this is
-
How do I delete duplicate Site Columns in Sharepoint 2013
When I got to save a site as a template I'm told that there are duplicate site columns and the template can not be saved. I found that under all of the e-mail submission site columns they are duplicated site columns for example BCC Multiple lines o
-
Dear PP gurus, Is there any t-code which can show Document log discription. (In Rem Scernarial) I got the document log numbers from MF12. But what is it's meaning I can't understand. Waiting for your valuable help Thanks in advanc
-
Pr 1.2 change log.
Cant see this posted so thought id throw it up dont know if its fact but looks good http://maemoarena.com/2010/03/nokia-n900-pr1-2-changelog-released/#more-211 From what i can see im looking forward to all of the added features but mostly the change
-
Itunes has encountered a problem!!!! please help
Hi, i am having problems with itunes and quicktime, both of them are already installed on my pc, but they wont open at all.... i have a compaq pc windows xp and when i try to open itunes it says "Itunes has encountered a problem and needs to close, s