Job Execution after database startup

I have around 15 materialized views. Each one has different execution time during the day. For example: some of them are reloaded at 9:00 PM, others at 7:00 AM.
If i would have to re-start my database, or the database instance, the server gets so slowly and overloaded.
When I start the instance, are the MV jobs executed?
Is there any parameter to start the database and ignore the jobs which are late due period that the database was out?
My database version is Oracle9i Release 9.2.0.4.0.

setting job_queue_process=0 you affect all jobs for your database, u can make this editing the pfile, if the database closed.
when database opened you can modify the parameter with alter system command.
placing the job in broken state the database must be open and this option don't affected all jobs, only jobs that you want.

Similar Messages

  • Start a job upon database startup

    Hi,
    I have created a job which I would like to run on database startup. What is the best way to do this. I tried using "after startup on database" but could not get it to work.
    What is the best way to make sure a job gets scheduled as soon as the database startsup.
    thanks for the help

    Hi,
    There is no documented way of using the Scheduler to do this and the "after startup on database" trigger sounds like the right thing to do. Why doesn't it work ?
    One thing which might work is creating a one-time job in the trigger to run immediately (if you use dbms_scheduler.create_job it must be in an autonomous transaction) . Or having the job exist but calling run_job from the trigger (with use_current_session=>false) - this would also have to be in an autonomous txn.
    If you are having trouble getting the trigger to work you might need to post on the general database forum.
    Hope this helps,
    Ravi.

  • Job cancelled after system exception ERROR_MESSAGE in DB13

    Hello All,
    When i opened the t-code DB13 i saw that this job "Mark tables requiring statistics update" is cancelled.
    JOB LOG:
    12.02.2011  22:00:16  Job started
    12.02.2011  22:00:16  Step 001 started (program RSDBAJOB, variant &0000000000085, user ID 80000415)
    12.02.2011  22:00:18  Job finished
    12.02.2011  22:00:18  Job started
    12.02.2011  22:00:18  Step 001 started (program RSADAUP2, variant &0000000000081, user ID 80000415)
    12.02.2011  22:01:26  Error when performing the action
    12.02.2011  22:01:26  Job cancelled after system exception ERROR_MESSAGE
    When check for the BGD Job in SM37 for this job i found the same error in the job log with the status cancelled.
    Job log overview for job:    DBA!PREPUPDSTAT_____@220000/6007 / 22001700
    12.02.2011 22:00:18 Job started
    12.02.2011 22:00:18 Step 001 started (program RSADAUP2, variant &0000000000081, user ID 80000415)
    12.02.2011 22:01:26 Error when performing the action
    12.02.2011 22:01:26 Job cancelled after system exception ERROR_MESSAGE
    I couldn't find any logs in SM21 of that time also no dumps in ST22.
    Possible reason for this error:
    I have scheduled the job Check database structure (only tables) at some other time and deleted the earlier job which was scheduled during the bussiness hours which caused performance problem.
    So to avoid performance issue i scheduled this job in the mid night by cancelling the old job which was scheduled during the bussiness hours.
    And from the next day i could see this error in DB13.
    Rest all the backups are running fine but the only job getting cancelled is for "Mark tables requiring statistics update"
    Could anyone tell me what should i do to get rid of this error?
    Can i schedule this "Mark tables requiring statistics update" again by deleting the old one?
    Thanks.
    Regards.
    Mudassir Imtiaz

    Hello Adrian,
    Thanks for your response.
    Every alternate day we used to have performance issue at 19:00hrs.
    Then when i checked what is causing this problem, i discovered that there was a backup "Check Database Structure (tables only)" scheduled at this time and it was mentioned that this backup may cause performance issue.
    Then i changed "Check Database Structure (tables only)" the time of this backup to 03:00hrs.
    The next day when i checked DB13 i found that one of the backups failed.
    i.e. "Mark Tables Requiring Statistics Update"
    Then i checked the log which i posted earlier with the error: "Job cancelled after system exception ERROR_MESSAGE"
    I posted this error here and then i tried to delete the jobs scheduled i.e. "Mark Tables Requiring Statistics Update" and then re-schedule it at the same time and interval.
    And then it started working fine.
    So i just got curious to know the cause of the failure of that job.
    Thanks.
    Regards,
    Mudassir.Imtiaz
    P.S There is one more thing which i would like to say which is not related to the above issue, and m sorry to discuss this in this thread.
    I found a few Bottlenecks in ST04 with Medium and High priority.
    Medium: Selects and fetches selectivity 0.53%: 122569 selects and fetches, 413376906 rows read, 2194738 rows qualified.
    High: 108771 primary key range accesses, selectivity 0.19%: 402696322 rows read, 763935 rows qualified.
    There are a lot these.
    I would really appreciate if you tell me what is the cause for these Bottlenecks and how to resolve.
    Thanks a lot.

  • Error when executing APD-Job cancelled after system exception ERROR_MESSAGE

    Hi,
    We have a process chain which executes a APD using an ABAP program RSAN_PROCESS_EXECUTE.
    It was executing successfully until few days back but now a days frequently once in 3 days roughly it is getting cancelled during execution of ABAP Program with the message 'Job cancelled after system exception ERROR_MESSAGE'
    checked st22 and sm21 but didn't get any clue.But if we execute the same process chain manually(Immediate load) it is working fine all the times.
    What may be the reason for the cancellation of the chain sometimes and the same chain working fine some other time and working very much fine when ran manually.
    Regards,
    Vishnu

    Hi Vishnu,
    Can you check if there are any other process which is triggering the abap program RSAN_PROCESS_EXECUTE at the same time as the execution of this process in the chain.  You can check in which other chains this process is being used.  You can compare the time when this failed in the chain you mentioned with the same being run in other chains at the same time.
    Sasi

  • LMS 3.2 Inventory collection - Job timeouts after ~5h, all devices "Not attempted"

    Hello All,
    We have a strange problem with LMS 3.2 regarding Inventory Collection.
    This problem started immediatelly after the LMS installation/upgrade (LMS 3.2 was installed on a new server, and LMS 2.6 database migrated to it).
    All Jobs finish as failed, with all devices "not attempted".
    Job hangs for a five and a half hours and then reports failed status.
    The symptoms are the same for scheduled jobs and manually created jobs.
    I also have opened a TAC case, but it seems that nothing relevant can be found in the IC_Server.log.
    Also, according to a packet capture, it seems that LMS does collect SNMP data from devices after a job is started...
    We tried to upgrade RME 4.3.0 to 4.3.1.
    One Job immediately after the upgrade was succesful (Inventory was collected for manually selected device), but the next day all Inventory Jobs were failing again with the same symptoms...
    Does anyone have a sugestion where to look for a problem trace?
    Thanks in advance!
    Ragards,
    Jasmina

    Hi Jasmina ,
    Please chech the Existing MDF pacakge :
    go to common service > software center > device update >>> check the checkbox for Cisco works common service   and click on check for updates
    --if there is an Update , please upgarde the MDF version..
    --Similarly look for any Available Device Pacakges update for RME , if there are Upgarde all the Device Pacakages ....
    --After all of the above Task is done , Now re-run the Job and it still fails then share the IC_server.log  again..
    Thanks--
    Afroj

  • Pending message redelivery wait period after server startup

    Hi, I have seen an strange behaviour in the way pending JMS messages are
              redelivered to MDBs at server startup.
              In my unit test I have seen that, killing Weblogic during an MDB code
              execution as expected makes the container to redelivery unconfirmed message
              at server startup. I have also seen that it's redelivered about 4 minutes
              after server is started (more info of this in thread: "Problem with
              persistent messages and MDBs" 25 October 2002)
              After a recent crash we have had on the system in wich there were a lot of
              messages pending to deliver to an MDB we saw that they were being
              redelivered just after the MDBs were deployed while system was starting. Of
              course due to the fact that some components needed by the MDB were not
              deployed by that time, a lot of exceptions were raised making messages to be
              queued again and promptly delivered wich caused more exceptions. Just a big
              mess!
              I'm tring to figure a good work-around about this, what I wanted to know is
              how is implemented the "delay" to send messages after server startup. Is it
              done by comparing timestamp of message (when did it enter the queue and
              thereby persisted on the store) with current system time?. That approach of
              course will fail if any of the messages were sent before that "delay" time.
              If this is the case and there isn't a fix for it this is what I have in
              mind:
              Each MDB will have a private attribute wich will be used to detect when
              system has completely started. By default it will be false and after a
              message is sent to the MDB the first line of the onMessage method will test
              wether system has started or not (by checking weblogic connection port i.e.
              7001. Btw. is there any better way of checking server has finished start-up)
              if not, a runtime exception will be launched that will force message to be
              redelivered (without trying to execute any MDB code), I think setting a
              proper redelivery delay i.e. 30-60 secs. will allow server to startup with
              less problems (in the situation I described above JVM crashed with an 11
              system signal)
              Any other ideas to deal with this?
              Thanks in advance.
              Regards.
              Ignacio.
              

    Hi Ignacio,
              I think you can usually control the order in which ejb's are booted,
              through a combination of console settings and
              meta file entries. I suggest posting to the ejb newsgroup
              to find out how.
              The four minute delay you see is normal for resolving
              interrupted transactions, but I believe that an enhancement
              was put into a 7.0 SP to reduce or eliminate this interval,
              and that 8.1 has no interval. Post to the transaction
              newsgroup for more info, or contact customer support.
              Given that you referenced earlier posts on this issue, you
              probably already know how to tune the interval down to one
              minute even without the enhancements.
              There is no other delay for sending messages at system startup,
              as soon as the MDB is booted it attaches to JMS, and JMS
              starts delivering messages whose transactional state is known.
              Tom
              P.S. I suppose one way to detect end-of-boot is to
              place a startup class last in the boot order.
              P.P.S. For MDBs one alternative is to code a "sleep" in the onMessage if
              an unavailable resource is detected - this
              is hokey, but works as long as you have made sure that
              max-beans-in-free-pool totals do not come near or exceed
              available thread pool size.
              Ignacio G. Dupont wrote:
              > Hi, I have seen an strange behaviour in the way pending JMS messages are
              > redelivered to MDBs at server startup.
              >
              > In my unit test I have seen that, killing Weblogic during an MDB code
              > execution as expected makes the container to redelivery unconfirmed message
              > at server startup. I have also seen that it's redelivered about 4 minutes
              > after server is started (more info of this in thread: "Problem with
              > persistent messages and MDBs" 25 October 2002)
              >
              > After a recent crash we have had on the system in wich there were a lot of
              > messages pending to deliver to an MDB we saw that they were being
              > redelivered just after the MDBs were deployed while system was starting. Of
              > course due to the fact that some components needed by the MDB were not
              > deployed by that time, a lot of exceptions were raised making messages to be
              > queued again and promptly delivered wich caused more exceptions. Just a big
              > mess!
              >
              > I'm tring to figure a good work-around about this, what I wanted to know is
              > how is implemented the "delay" to send messages after server startup. Is it
              > done by comparing timestamp of message (when did it enter the queue and
              > thereby persisted on the store) with current system time?. That approach of
              > course will fail if any of the messages were sent before that "delay" time.
              >
              > If this is the case and there isn't a fix for it this is what I have in
              > mind:
              >
              > Each MDB will have a private attribute wich will be used to detect when
              > system has completely started. By default it will be false and after a
              > message is sent to the MDB the first line of the onMessage method will test
              > wether system has started or not (by checking weblogic connection port i.e.
              > 7001. Btw. is there any better way of checking server has finished start-up)
              > if not, a runtime exception will be launched that will force message to be
              > redelivered (without trying to execute any MDB code), I think setting a
              > proper redelivery delay i.e. 30-60 secs. will allow server to startup with
              > less problems (in the situation I described above JVM crashed with an 11
              > system signal)
              >
              > Any other ideas to deal with this?
              >
              > Thanks in advance.
              >
              > Regards.
              >
              > Ignacio.
              >
              >
              

  • Sql Server Agent Job Execution

    Hi All,
    I want to run a sql agent job (one job is execution one package) in such a way that as soon as job1 completes , it should be run again (without any time loss)
    I am folowing Below approach:
    Job 1 has 2 steps , in both the steps I am calling same package to execute . After that on Success/Failure action. I am selecting the same step.it is running in an infinite loop and continue fetching data.
    is there any dis-advantages on the above approach?
    Is there any other approach to achive the Same?
    Thanks in Advance....

    Hello,
    The two-step recursive (on success) technique should be fine.  I would just recommend the introduction of short-circuit”techniques that stops a runaway job in the event of logical issues (the “on failure” action will still catch the general error issues).
    Other patterns that are sometimes used for continual-execution requirements:
    Service Broker (for example, continually watch the queue and act on new messages)
    T-SQL home-grown job that runs in a loop and then executes the job based on some condition – and would require you to check job execution state
    For a continuously running package watching for new files in a folder, one example is detailed in the following blog post:
    Continuously watching files with WMI Event Watcher Task
    Best Regards, Joe Sack, MVP, SQL MCM | SackHQ.com

  • Enable server group in BPC job execution

    Dear Experts
    [Note 1476057 - Enable server group in BPC job execution|https://websmp130.sap-ag.de/sap/bc/bsp/spn/sapnotes/index2.htm?numm=0001476057&nlang=E]
    After upgrade, the server group logic will be :
    1, Create a correct server group with server assigned,
        job will be executed in specified server group;
    2, Create a server group without server assigned,
         job will be successfully submitted to BW,
         but will not be executed until server is assigned to the server group;
    3, Incorrectly specify a server group in web admin,
         client will get error message when run package.
    As I understand the group server is defined in BW Server. Where should I specify this group server in BPC. I could not find the parameter in BPC Web Admin - Appset Parameters or BPC Server (.Net Server) - Server Options.
    Appreciate if somebody can help ?
    Thanks
    Ashish
    Edited by: Ashish Narway on Oct 14, 2010 2:55 PM

    HI John,
    The group settings in WGM SL and Leopard are different.
    Yes, they are. I booted to my eval copy of SL Server and ran through the settings in WGM, Server Admin and Server Preferences; as you pointed out, all the mail list admin tools I could find are in the Mail service in Server Admin.
    The only thing that may be of interest that I could find is that for the group mail list, the email address for the group is group_shortname@ServerDNSname, not groupshortname@yourdomain (this is in the Mail Services Admin Guide for 10.6). This might explain why your email to the group may have been rejected?
    -Doug

  • JOB execution fails due to Access failure to procedures and views using certificates (encryption)

    Job execution fails using SQLServerAgent account but runs successfully under another windows personal account.
    Both have same security access on server and DB.
    The Windows account is mapped to dbo on the database .
    The package uses procedures and views which are using encryption by certificates.
    Please advice on how to provide security so that job runs from the agent

    Hi Prady26,
    If the SQL Server Agent Service account and the proxy account generated based on a Windows user account have the same permissions on both the SQL Server database and the File System of the server, it may be related to the protection level of the package.
    If the package is set to encrypt with UserKey, the job will fail unless it runs under the security context of the Windows user that designs the package in BIDS/SSDT. You can check the
    ProtectionLevel of the package in the BIDS/SSDT to see if it is EncryptSensitiveWithUserKey or EncryptAllWithUserKey, if it is, re-deploy/reinstall the package and set the package protection
    level to “Relay on server storage for encryption”.
    If the issue persists, post the error message in the job history for further analysis.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Background Job execution enabled via pro-active monitoring

    Hi community,
    We're interested in CPS Redwood to help us in proactive monitoring of background jobs (Ad Hoc and Periodic) and impacts in system performance.
    The idea would be to have somehow a tool that monitor the number of available working process and system performance. When the system workload reaches a certain level, ex: 95%, this tool would intercept new jobs execution. After this, when the system workload goes down and the resources are free, the system would release all jobs to normal run again.
    Is it possible via CPS Redwood?
    Is there any other way to have something automatic like this?
    Thanks,
    Jose Antonio.

    Hi Jose,
    This is possible indeed using CPS. CPS can monitor various load metrics of your system, then adapt the scheduling logic if thresholds are exceeded.
    In your scenario, you would basically always intercept all jobs, but normally not enforce any limits so effectively that means all jobs still run immediately. If the load is too high, CPS would enforce a limit, so then jobs will be delayed until the load is lower again.
    Regards,
    Anton.

  • How to Execute a stored procedure automatically after DB startup?

    Is it possible to run a stored procedure automatically just after the database startup? And how can I know whether the procedure is running?
    Thanks.

    You would have to do something similar to this for the procedure to run every time the database is startedCREATE OR REPLACE TRIGGER <trigger_name> AFTER STARTUP ON DATABASE
    BEGIN
    <run_your_procedure_here>
    END;
    /

  • Database startup trigger on a RAC

    I cant seem to find a definitive answer to this question in the doc anywhere, and I haven't got a RAC to test it on, but can anyone confirm that a trigger defined as 'AFTER STARTUP ON DATABASE' will fire just once immediately after database open. It will not fire for every node of the RAC - or will it? :-)
    In my understanding, in a rac, there are multiple instances, but just one database. It seems logical therefore that the above trigger will fire just once.
    However, why then would there be a System-Defined Event Attribute "ora_instance_num" available to the database startup trigger? See:
    [See Tables 9-4 and 9-5 here|http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/triggers.htm#g1722284]
    This seems to contradict my assumption.

    On my test RAC database the trigger was fired on each instance startup.
    So when the database is bounced the trigger is executed twice (once per instance for my 2 node RAC).

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

    The 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

  • AQ Subscriber not reciving notification after database restart

    Hi All,
    I am currently working on moving some code from two synchronous processes to be asynchronous (not part of critical code path), to do this I have been using one Advanced Queue with two PLSQL registered subscribers.
    when we first moved the code into test it was working fine and the data would be processed from the queue quite quickly.
    however we then had to restart the database for another reason and after that I noticed that queue was slowly building up with nothing moving from the "READY" state.
    having a look at aq$<queue_table>s the two subscribers are still shown and it appears like the user id still has the correct grants and priviledges. I have also checked to make sure that the aqtm_processes is still > 0 and that the QMNC and EMN0 backgroud processes are in v$bgprocess.
    Can anybody else suggest what i might have missed? I do not want to have to drop and recreate the queue and subscribers whenever the database needs to come down.
    Also I know if the subscriber was down and then bought back up it would not process the backlog but is there anyway of getting it to do this?
    almost forgot to mention we are running:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit
    Cheers,
    Chris

    Hi,
    I had not set the paramater the DBA had set it and i think their reasoning was:
    [http://download.oracle.com/docs/cd/B19306_01/server.102/b14257/componet.htm#sthref339]
    "Oracle strongly recommends that you do NOT set AQ_TM_PROCESSES = 0"
    although reading a few lines up from there:
    "Oracle recommends, however, that you leave the AQ_TM_PROCESSES parameter unspecified and let the system autotune"
    As there is another planned outage this weekend i will try resetting the paramater to see if the queues are still dequeueing correctly:
    alter system reset AQ_TM_PROCESSES scope=spfile sid='*'
    If they are not dequeueing I will try stopping and starting them however I would prefer not to have to do this as then whenever a new queue is introduced with subscribers we would need to add to the scripts run after db startup.
    I did find out that removing the subscriber and then recreating it will cause the subscribers to work again but i would prefer to not have to do this after every db restart.
    Thanks for pointing me to the AQ_TM_PROCESSES and i will see if that helps :)

  • Job cancelled after system exception ERROR_MESSAGE

    Hello all
    I am facing the following issue.
    A custom report is schedulled and run as backround job. The report should create a txt file on server.
    The report works fine in foreground, but as backround job ends up cancelled all the time.
    The job log:
    Job log overview for job:    VI5 / 13072800
    Date       Time     Message text                                                                     Message class Message no. Message type
    27.03.2009 13:09:28 Job started                                                                           00           516          S
    27.03.2009 13:09:28 Step 001 started (program ZESSRIN110R, variant PR1_0000381, user ID METAPARTNER)      00           550          S
    27.03.2009 13:09:28 File creation ERROR:                                                                  00           001          E
    27.03.2009 13:09:28 Job cancelled after system exception ERROR_MESSAGE                                    00           564          A
    There is no info in SM21 regarding the error.
    Can anybody help with this?
    Thanx in advance.
    imi
    Edited by: Imrich Vegh on Mar 27, 2009 2:27 PM

    btw the part of my code  looks like this:
    server path check
        IF p_srv IS NOT INITIAL.
          OPEN DATASET gv_server FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
          IF sy-subrc EQ 0.     --- I keep receiving 8 here in BACKGROUND JOB
            WRITE : / text-077,  gv_server.
          ELSE.
            MESSAGE text-069 TYPE 'E'.
          ENDIF.

Maybe you are looking for