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'
Suresh

Hi,
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

Similar Messages

  • Schedule to run twice a day at different times.

    Hi
    I am trying to write a schedule to run twice a day, 7 days a week at 11.30am and 0.01am (i.e one minute after midnight).
    I have tried setting the repeat_interval = 'FREQ=DAILY;BYDAY=MON,TUE,WED,THU,FRI,SAT,SUN;BYHOUR = 11,0;BYMINUTE=30,1';
    However, this causes the job to run at 11:01; 11:30, 00:01 and 00:30. Can some please show me how to get it to run only at 11:30 and 00:01?
    Thanks.
    jov

    Hi Joe
    Thanks for your reply.
    Unfortunately, your suggestion still causes the app to run 4 times a day, 11:01; 11:30, 00:01 and 00:30. I am trying to avoid writing two schedules but it looks like I'm going to have to.
    jov

  • DBMS SCHEDULER: Job of type 'Chain' is failing

    Hi,
    I am using Oracle 10gR2 version. The job created on top of chain is failing for some reason. I couldn't trace the exact error. Please help me in debugging this as I am new to using dbms scheduler.
    --Script I have used to create a chain
    BEGIN
    DBMS_SCHEDULER.create_chain (
    chain_name => 'DAILY_JOB_CHAIN',
    rule_set_name => NULL,
    evaluation_interval => interval '5' minute ,
    comments => 'Chain to run the daily jobs');
    END;
    --Script used to create a job and start it immediately.
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'daily_job_rerun',
    job_type => 'CHAIN',
    job_action => 'daily_job_chain',
    start_date => SYSTIMESTAMP,
    auto_drop => true,
    enabled => TRUE);
    END;
    Soon after I ran the create_job procedure, the job has started immediately but is failing immediately without starting the chain. I have checked the USER_SCHEDULER_JOB_LOG table for errors. This is what is stored in the table.
    LOG_ID JOB_NAME OPERATION STATUS ADDITIONAL_INFO
    144835 DAILY_JOB_RERUN CHAIN_RUN FAILED CHAIN_LOG_ID="144834"
    144834 DAILY_JOB_RERUN CHAIN_START RUNNING
    Please help.
    Edited by: user10626493 on Oct 22, 2009 11:45 PM

    Chain rule for one of the chain steps has been changed and hence the job failed. After correcting the chain rule, the job has started fine.

  • Prevent Jobs Running Twice at the same time

    Hi all, I would like to know if they are any ways to prevent a release job to run twice at the same time. For exemple, if  I create a job to run every 5 minutes and the job did not finish after 5 minutes, the scheduler will start the same job agains.  This situation causing us bad issues.
    I double check the job start conditions in sm37 but I found nothing special.
    Thanks for help

    Hi Marc,
    We use a workaround. We have asked our abap developpers to write a small utility report which checks if the job it is part of is already running and aborts the job if it is the case.
    When we need a job which must absolutely run only once at the same time, we just add this utility as first step.
    Regards,
    Olivier

  • Enable Oracle dbms scheduled jobs

    Hi Gurus,
    I need to enable a set of dbms jobs which got transferred as a result of exporting a 9i database and importing to 11g database.
    They were running as scheduled jobs in old legacy database.
    I can see them in SQL Developer under DBMS jobs but don't know how to enable them
    Please help. My current Oracle version is 11g.
    Thanks
    Amitava.

    amitavachatterjee1975 wrote:
    Hi Gurus,
    I need to enable a set of dbms jobs which got transferred as a result of exporting a 9i database and importing to 11g database.
    They were running as scheduled jobs in old legacy database.
    I can see them in SQL Developer under DBMS jobs but don't know how to enable them
    Please help. My current Oracle version is 11g.
    Thanks
    Amitava.
    post SQL & results which show any of the jobs actually got transferred.
    post SQL & results that show they are not scheduled or running now.

  • Scheduled Tasks Run Twice After Upgrade To MX7

    I've recently upgraded to CFMX7 and now my scheduled tasks
    are running twice. I've recreated all of the tasks, rebooted the
    server, and made sure that I'm on V 7.0.2 but nothing seems to
    help. Is there a solution for this out there?

    I've got a couple ideas. I haven't seen this before but this
    should be some stuff to try. There's a file in the ColdFusion lib
    directory called neo-cron.xml ... this contains an entry for each
    scheduled task.
    I'd be very careful about making any changes to this file
    directly but take a look at it. Are your scheduled tasks
    duplicated? If so you can either remove the duplicates manually if
    you're feeling brave, or try deleting the scheduled tasks in the cf
    admin and then recreate them. Perhaps that would get rid of the
    duplicates. If you don't see dupliactes in this file then somehow
    ColdFusion's process that runs the scheduled tasks is probably
    running once for the old install and once for the new one.
    Sorry I don't have any more definitive info but hope this
    helps point you in the right direction.
    -Matt MacDougall

  • CRS 2008 Scheduled Report Runs Twice

    All,
    I have been using CRS 2008 for about 6 months now and have had scheduled reports running since the beginning. Last month I created new schedules for each report and deleted the old schedule. However, although the old schedule no longer shows in the History tab, it appears to still be running. As of right now, I have only one schedule per report, however, each report gets processed and saved out twice. This did not start happening until I created new schedules and deleted the old ones.
    Is there something else I have to do (or can do) in order to completely remove the old schedules or fix the new ones if that happens to be the issue?
    Thanks,
    Tom

    Fritz,
    Each report (of which there are 9 at this point), is set up in the following manner:
    1. Scheduled to run once a day (times staggered by 5 minutes for each starting at 12:15am)
    2. 6 are delivered to a folder on the network, 3 are delivered via email
    3. All have the same naming structure: InstanceTitle_DateTime.FileExt
    4. Each are formated as PDF
    Originally, the six that are delievered to a network folder were also delivered via email as well. This issue only started happening after I deleted those email deliveries. Also, the 3 that are still delivered via email and have never been modified after first being set up are now being run twice as well.
    After looking in the network folder this morning, it appears that only four of the six were run twice last night, while all six were run twice for the two nights before that.
    This is very frustrating since I have already deleted and started from scratch and still have this issue. Any help would be greatly appreciated. Thanks.

  • DBMS SCHEDULER JOB failed

    Hi,
    I have created a dbms job as shown below for export backup, It was running fine on 10g. Recently I upgraded my database to 11g. since then that job is failing. Below is the error i am receiving while executing the job via toad as it is not getting triggered on time. If any 1 faced such issue kidly suggest.
    BEGIN
      SYS.DBMS_SCHEDULER.RUN_JOB
        (job_name             => 'SYS.EXPORT_DATAPUMP_JOB1'
        ,use_current_session  => TRUE);
    END;
    Error at line 2
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    ORA-06512: at "SYS.DBMS_ISCHED", line 185
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 486
    ORA-06512: at line 2

    Hi,
    Please find the output
    SQL> SELECT additional_info FROM DBA_SCHEDULER_JOB_RUN_DETAILS WHERE job_name='EXPORT
    ADDITIONAL_INFO
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ADDITIONAL_INFO
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    ADDITIONAL_INFO
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    ADDITIONAL_INFO
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ADDITIONAL_INFO
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ADDITIONAL_INFO
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    ADDITIONAL_INFO
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    ADDITIONAL_INFO
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ADDITIONAL_INFO
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ADDITIONAL_INFO
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    ADDITIONAL_INFO
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    ADDITIONAL_INFO
    STANDARD_ERROR="'expdp' is not recognized as an internal or external command,
    operable program or batch file."

  • Do Not See My Scheduled Jobs Running

    Hello,
    I think I have a situation, I have an Oracle 10g EE running in production and I have only one job there cheduled for executing at every 15 minutes. Yesterday its last date was 02-02-2012 07:45:57, and report that is running for 367875 seconds now. I killed the session that runs the job, the session status is killed but it is still there. The count from dba_scheduler_running_jobs and dba_jobs_running is 1, the max jobs parameter is 10 and MAX_JOB_SLAVE_PROCESSES is null (default).
    It happened before and I had nothing else to do but restarting the server. But because it is production I would prefer restart just the scheduler service/process if it is possible or anything buut restart whole db server. Oralce server is running on SLES 10 sp1.
    I created a new job to execute the same procedure, but the new job has not been run even once, so something is fishy with the job manager. For the moment I execute manually the procedure time to time, hoping that we can find a way to investigate this further.
    Do you have any sugestion what can I look for ?
    Best regards,
    Iulian Ghinea

    Hello
    If you are referring to your 2 orders each for $25.00 credit these were canceled due to issue processing payment and your funds will be returned to you.
    You were sent an explanatory email which you haven't yet read.
    TIME ZONE - US EASTERN. LOCATION - PHILADELPHIA, PA, USA.
    I recommend that you always run the latest Skype version: Windows & Mac
    If my advice helped to fix your issue please mark it as a solution to help others.
    Please note that I generally don't respond to unsolicited Private Messages. Thank you.

  • DPM 2010 Scheduled Jobs Disappear rather than Run

    I have a situation where I have a DPM server that appears to be functioning fine, but none of the scheduled jobs run.  No errors are given, there are no Alerts, and there is nothing in the Event log (Application and System) which indicates a failure. 
    All my Protection Groups show a green tick to indicate that they are fine, but the last successful backup for all of them is Friday the 8th of February.
    If I go to Monitoring and Jobs I see the jobs scheduled, but when the time comes for the job to run, it does not go into the "All jobs in progress", it just merely disappears, like thus:
    And a few minutes later,
    As you can see, the jobs disappear from the queue, and the total number of jobs decreases accordingly.  These jobs do not go into any of the other 3 Statusses (Completed, Failed or In Progress), they just disappear without a trace.
    There is some unallocated space, albeit not much (Used space: 21 155,05 GB Unallocated space: 469,16 GB). If space was an issue I would expect to see errors to indicate this.
    DPM 2010 running version 3.0.8193.0 (hotfix rollup package 6) using remote instance of SQL 2008 which is functioning fine.  I have tried stopping/starting the services, and even rebooted the server twice.  The remote instance of SQL server is using
    a domain account as its service account.  There are no pending Windows updates, i.e. it is fully up-to-date.
    The System Center Data Protection Manager 2010 Troubleshooting Guide (July 2010) does not show how to troubleshoot this particular probelm.
    Does anybody know how to resolve this issue or which logs might help me troubleshoot it?

    OK,
    Did you change the SQL Agent user account ?
    If so, DPM enters the SQL Agent account name into the registry and later we check that account each time the DPM engine launches.  The internal interfaces to DPM are secured using this account so the account name needs to match the account the SQL Agent
    is using. 
    Step 1
    In the registry HKLM\Software\Microsoft\Microsoft Data Protection Manager\Setup alter  both
    SqlAgentAccountName and SchedulerJobOwnerName keys to reflect the SQL Agent user account being used.
    Step 2
    Update DCOM launch and access permissions to match what was granted to the Microsoft$DPM$Acct account.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT]
    This posting is provided "AS IS" with no warranties, and confers no rights.

  • Is it possible to run scheduled job

    Is it possible to run scheduled job (custom developed java application), for doing some periodic database operstions in portal.
    I'm using portal database (maxdb) with my portal application.I must do some periodic calculations and store them into database table.Therefore i must use scheduled job running on ortal server.
    Is it possible? If possible, how?
    Thanks.

    Hi,
    Yes it is possible with SAP NetWeaver Scheduler for Java.
    You can check below link for more information:
    http://help.sap.com/saphelp_nwce71/helpdata/en/44/03d66015ee10b3e10000000a11466f/content.htm
    http://help.sap.com/saphelp_nwce71/helpdata/en/45/45d287e620507be10000000a1553f6/content.htm
    Thanks
    Sunny

  • 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.

  • INSERT in PLSQL loop  in Oracle 9i  scheduled job has poor performance

    Hi,
    I have a scheduled job running in Oracle 9i. But everytime it executes the following piece of code, the INSERT process slows down drastically.
    -------------------------------typical piece of code having problem-----------------------------------
    LOOP
    FOR increbkgs IN bookings_cur (in_chr_fiscal_period_id,
    allrec.cust_name_string
    LOOP
    l_num_rec_count := l_num_rec_count + 1;
    INSERT INTO SA_PORTAL_CDW_BOOKINGS_INCTEMP
    (product_id, territory_code,
    global_target_id, service_type,
    equipment_deployment, created_date, updated_date,
    fiscal_period_id, customer_id,
    ship_to_country,
    bookings_amount, sams_alliance_id
    VALUES (increbkgs.product_id, increbkgs.territory_code,
    increbkgs.global_target_id, increbkgs.service_type,
    increbkgs.equipment_deployment, SYSDATE, SYSDATE,
    increbkgs.fiscal_period_id, increbkgs.customer_id,
    increbkgs.ship_to_country,
    increbkgs.bookings_amount, allrec.sams_alliance_id
    IF (l_num_rec_count = 500)
    THEN
    l_num_rec_count := 0;
    COMMIT;
    END IF;
    END LOOP;
    END LOOP;
    All the tablespaces are auto-extend. But we have still tried to increase the tablespace manually from 2% to 30% by adding datafiles. Still the INSERT is slowing down for some reason.
    (The same process in Oracle 8i is much faster)
    Any hint or guidance is greatly appreciated.
    Thanks and regards,
    Ambili

    commits in loops are great for slowing down things. Actually commits in loops are just about the best way of stalling any 'process' in Oracle.
    A much better way is to resize your undo tablespace to permit one single commit at the end of the whole thing. Yes it could be big, but that's the way Oracle works.
    If you want more info about this, buy Thomas Kyte's book found at http://apress.com/book/bookDisplay.html?bID=10008

  • Stop queue from scheduled job

    Hi everybody,
    I'm working on a Oracle 11g and I have a Scheduled Job running every 5 minutes.
    When it lasts more then 5 minutes, it starts the next execution right after the previous.
    Is there a way to prevent this behaviour? For example, if the 9.25 run ends at 9.32, the next run should be at 9.35.
    Thanks,
    best regards

    Thanks to all of you for your replies.
    I think there is a misunderstanding, my needs are to avoid the slippage, so if a run lasts more then 5 minutes, it has to end naturally without being aborted, and the next will be skipped.
    If your solutions already answer my question, please forgive me and my bad reading.
    I add the code of my scheduled job:
    BEGIN
    SYS.DBMS_SCHEDULER.CREATE_JOB
    job_name => 'OWNER.JOBNAME'
    ,start_date => TO_TIMESTAMP_TZ('2012/04/10 07:00:00.000000 +01:00','yyyy/mm/dd hh24:mi:ss.ff tzh:tzm')
    ,repeat_interval => 'FREQ=MINUTELY; BYDAY=MON,TUE,WED,THU,FRI,SAT,SUN; BYHOUR=6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22; BYMINUTE=0,5,10,15,20,25,30,35,40,45,50,55 ;'
    ,end_date => NULL
    ,job_class => 'DEFAULT_JOB_CLASS'
    ,job_type => 'PLSQL_BLOCK'
    ,job_action => ' --CODE OF PLSQL BLOCK'
    ,comments => NULL
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
    ( name => 'OWNER.JOBNAME'
    ,attribute => 'RESTARTABLE'
    ,value => FALSE);
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
    ( name => 'OWNER.JOBNAME'
    ,attribute => 'LOGGING_LEVEL'
    ,value => SYS.DBMS_SCHEDULER.LOGGING_OFF);
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
    ( name => 'OWNER.JOBNAME'
    ,attribute => 'MAX_FAILURES');
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
    ( name => 'OWNER.JOBNAME'
    ,attribute => 'MAX_RUNS');
    BEGIN
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
    ( name => 'OWNER.JOBNAME'
    ,attribute => 'STOP_ON_WINDOW_CLOSE'
    ,value => FALSE);
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
    ( name => 'OWNER.JOBNAME'
    ,attribute => 'JOB_PRIORITY'
    ,value => 3);
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
    ( name => 'OWNER.JOBNAME'
    ,attribute => 'SCHEDULE_LIMIT');
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
    ( name => 'OWNER.JOBNAME'
    ,attribute => 'AUTO_DROP'
    ,value => FALSE);
    SYS.DBMS_SCHEDULER.ENABLE
    (name => 'OWNER.JOBNAME');
    END;
    Thanks again.

  • Dbms scheduler shell script security

    We are trying to setup database accounts to run external jobs using dbms_scheduler. With each user only having access to certain directories through mapped database directories.
    Example:
    DB User1 -> /home/user1/...
    DB User2 -> /home/user2/..
    The problem is, the User1 seems to be able create jobs that run scripts under user2 directories and visa versa. Worst yet, both db users can create jobs that run scripts in the Oracle home directory. Huge security hole. Is there a way to lock this down? I believe all scheduled jobs run as Oracle.
    Thanks.

    Hi,
    In 10g there is no way to do this using dbms_scheduler. In 10g all users running external jobs (who must have the CREATE EXTERNAL JOB privilege) have their jobs run as the same OS user (what user the jobs run as is configurable). The only exception is jobs in the SYS schema which always run as the oracle user.
    In 11g, you can use credential objects to have different database users run jobs as different OS users.
    For more information see this post
    Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files
    Hope this helps,
    Ravi.

Maybe you are looking for

  • Touch Screen Not Working on IdeaTab 2109A-F - Any ideas on how to fix?

    I have an IdeaTab 2109A-F tablet. The touch screen has stopped responding.  The unit boots up just fine, but nothing on the screen responds to touch. I have tried the power drain, charge fully, then turn on. This made no difference. I can turn the ta

  • Creating a folder based on registation info?

    I'm creating a user and want to add a feature where when their account is created, automatically a subfolder with their username is created and they are assigned that folder (for viewing images), any ideas on how I would do this in ADDT? I know how t

  • How to change moving average price with movement type 501

    Hi Gurus,                      Our client procures stock item with P-Card and use the movement type 501 to receive into the stock. The value of these items are updated with the moving average price, most of the time the current purchase price is diff

  • Iphone will not appear in itunes at all

    Recently, I partook in a method to finally get my iPhone 6 to appear in Windows Explorer so that I could import my photos on it to my laptop. When I did that, I set it to automatically open Windows to my phone's folder. But now, it won't appear in it

  • Error in Creating BSP SICF Node

    Hi Everybody, I m getting the following error when i create a new BSP Program. " Could not create the associated SICF node automatically" . Plz Help me with this.........................