SCHEDULING JOB@ DEFINED TIMES

Hi i am venkatesh, i want a help regarding batch jobs, currently i am using Orcale db connect for data source to SAP-BI metadata, i want to daily load operational datas to BI how to find from oracledb whether correct data is loaded to Metadata of BI how and to check since no delta update mechanism is available as for as DB connector is conecrned. How to overcome this problem.
valuable contribution is highly apreciated

You put the condition in the Infopackage. Use the ABAP routine in infopackage selection tab,
Something like this:
form compute_BUDAT
  tables l_t_range structure rssdlrange
  changing p_subrc like sy-subrc.
      Insert source code to current selection field
$$ begin of routine - insert your code only below this line        -
data: l_idx like sy-tabix.
          read table l_t_range with key
               fieldname = 'BUDAT'.
          l_idx = sy-tabix.
        Set the date selection (Today)
          l_t_range-sign   = 'I'
          l_t_range-option = 'EQ'
          l_t_range-low    = sy-datum.
          modify l_t_range index l_idx.
          p_subrc = 0.
$$ end of routine - insert your code only before this line         -
endform.
Remember: The field "BUDAT" must be set as Selection on datasource, then you can see in your infopackage
ORACLE SIDE:
On the Oracle, your table need to be updated in some field to indicate the "Delta":
First load to BW - FULL UPDATE INFOPACKAGE.
DATE         CUSTOMER    VALUE     CHANGE_DATE
01/01/2005   CUSTAAAA    10,00       "Blank"
01/01/2005   CUSTBBBB    20,00       "Blank"
01/01/2005   CUSTCCCC    30,00       "Blank"
01/01/2005   CUSTDDDD    40,00       "Blank"
Another day, only records created and changed will be loaded:
DATE         CUSTOMER    VALUE     CHANGE_DATE
01/01/2005   CUSTAAAA    15,00      02/01/2005 - BW
01/01/2005   CUSTBBBB    20,00       "Blank"
01/01/2005   CUSTCCCC    30,00       "Blank"
01/01/2005   CUSTDDDD    40,00       "Blank"
02/01/2005   CUSTEEEE    11,00      02/01/2005 - BW
Only 2 records will be upload with the  DELTA UPDATE INFOPACKAGE.
Sorry about my English, if you need to contact me, please send me a mail ([email protected]) and I will try to send you a Word with Steps.

Similar Messages

  • Scheduled Job - clock/time change miscalc

    Following the clock change at the weekend for British Summer Time (GMT + 1hr) the Process Flow to run our OWB schedule has the next run date as 30 October 2011!
    Usually the schedule runs every 2 hours between 06:00 and 18:00 every day, the last successful run was 18:00 on Saturday.
    Versions are OWB 10.2.0.3.33 and Oracle 10.2.0.3.
    Is this a known bug, any workaround to avoid in future?
    Regards
    Si

    Hi,
    Yes, its normal since the schedule discovery setting is different from Ad hoc discovery settings.
    Explanation :- Ad hoc discovery gives you the option to check the discovery of the network devices on ad hoc basisi and if you like it, then you can get this settings implemented in the schedule discovery too by using the same settings in schedule discovery.
    Similary you can check and run different schedule discovery, that means using different options you can run different schedule discovery and then finally select the one which suits as per your network requirements.
    Hope it helps,
    Many Thanks,
    Gaganjeet

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

  • Timer job defination not visible in central admin

    Hi,
    I have created timer job and added feature ans sheduled it weekly in the code.
    I have deployed it successfully by right click on project=> deploy.
    I can view this .wsp in the manage Farm Solution as Globaly deployed.
    Also I can see the feature in my site collection feture as active.
    I checked GAK also it included the timer job dll.
    I m in Farm Admin group. I restarted Timer service and admin service many times.
    BUT still I am not able to view my timer job defination in the central admin.
    Please suggest any solution.
    Thanks.

    This is code for my job
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Administration;
    using System.Net.Mail;
    using System.Net;
    using System.Collections.Specialized;
    using Microsoft.SharePoint.Utilities;
    namespace SP_MyJob_CustTimerJob
    class MyJob : SPJobDefinition
    public MyJob():base()
    public MyJob(string jobName, SPService service, SPServer server, SPJobLockType targetType): base(jobName, service, server, targetType)
    this.Title = "MyJob";
    public MyJob(string jobName, SPWebApplication webApplication): base(jobName, webApplication, null, SPJobLockType.ContentDatabase)
    this.Title = "MyJob";
    public override void Execute(Guid contentDbId)
    SPDiagnosticsService.Local.WriteTrace(0, new SPDiagnosticsCategory("C:/ChkLog.txt", TraceSeverity.High, EventSeverity.ErrorCritical), TraceSeverity.High, "My job running", null);
    This is code for event reciver
    using System;
    using System.Runtime.InteropServices;
    using System.Security.Permissions;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Security;
    using Microsoft.SharePoint.Administration;
    namespace SP_MyJob_CustTimerJob.Features.Feature
    /// <summary>
    /// This class handles events raised during feature activation, deactivation, installation, uninstallation, and upgrade.
    /// </summary>
    /// <remarks>
    /// The GUID attached to this class may be used during packaging and should not be modified.
    /// </remarks>
    [Guid("e999a541-8a4b-4170-884c-82f83853b2ab")]
    public class FeatureEventReceiver : SPFeatureReceiver
    // Uncomment the method below to handle the event raised after a feature has been activated.
    //job name
    const string JobName = "MyJob";
    public override void FeatureActivated(SPFeatureReceiverProperties properties)
    try
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite site = new SPSite(SPContext.Current.Site.ID))
    using (SPWeb web = site.OpenWeb())
    int day = DateTime.Now.Day;
    SPWebApplication webApp = site.WebApplication;
    foreach (SPJobDefinition spjob in site.WebApplication.JobDefinitions)
    if (spjob.Name == JobName)
    spjob.Delete();
    //shedule job on every week
    MyJob myJob = new MyJob(JobName, webApp);
    SPWeeklySchedule schedule = new SPWeeklySchedule();
    schedule.BeginDayOfWeek = DayOfWeek.Saturday;
    schedule.BeginHour = 1;
    schedule.BeginMinute = 1;
    schedule.BeginSecond = 0;
    schedule.EndSecond = 0;
    schedule.EndMinute = 30;
    schedule.EndHour = 1;
    schedule.EndDayOfWeek = DayOfWeek.Saturday;
    myJob.Schedule = schedule;
    myJob.Update();
    web.AllowUnsafeUpdates = false;
    catch (Exception ex)
    // Uncomment the method below to handle the event raised before a feature is deactivated.
    public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite site = new SPSite(SPContext.Current.Site.ID))
    using (SPWeb web = site.OpenWeb())
    int day = DateTime.Now.Day;
    SPWebApplication webApp = site.WebApplication;
    foreach (SPJobDefinition spjob in site.WebApplication.JobDefinitions)
    if (spjob.Name == JobName)
    spjob.Delete();
    // Uncomment the method below to handle the event raised after a feature has been installed.
    //public override void FeatureInstalled(SPFeatureReceiverProperties properties)
    // Uncomment the method below to handle the event raised before a feature is uninstalled.
    //public override void FeatureUninstalling(SPFeatureReceiverProperties properties)
    // Uncomment the method below to handle the event raised when a feature is upgrading.
    //public override void FeatureUpgrading(SPFeatureReceiverProperties properties, string upgradeActionName, System.Collections.Generic.IDictionary<string, string> parameters)
    Please tell me whats wrong in this code.

  • How to schedule a job occurring time for 1 1/2 hour in sql server

    how to schedule a job occurring time for 1 1/2 hour in sql server

    Hi,
    This is a known issue in the previous SQL Server version and has been fixed in SQL Server 2012. You should be able to set 90 minutes and the change would be saved in SQL Server 2012.
    http://connect.microsoft.com/SQLServer/feedback/details/346786/ssms-does-not-support-job-schedule-frequencies-greater-than-60-minutes
    Currently, you may schedule the job to occur every 1 hour or you may refer to the suggestion by Latheesh to get around this.
    Thank you for your understanding.
    Tracy Cai
    TechNet Community Support

  • Event based scheduler job - 2 events at the same time only 1 run

    Hi,
    i converted our dbms_job - jobs to the newer package dbms_scheduler.
    It is a 10.2.0.4 patch 23(8609347) database on an windows server 2003 R2 Enterprise x64 Edition SP2.
    The Jobs(about 130) are nothing special ... only some statistics, matview-refreshes and so on.
    For the notification of failed jobs and jobs which run over the max_run_duration i downloaded and installed the job notification package.
    The jobs are assigned to different departments and the corresponding developer teams in our company.
    I created a notification job for each department and if a job fails we (the database administrators) and the corresponding deverlopers will be informed.
    Now i ascertained that only 1 email will be send if 2 jobs of the same department fails at the same time.
    The emailer-jobs are auto-generated by the job notification package. I only modified them to look after all jobs of special department and not only after one job. (--> event_condition ... object_name LIKE 'XXX%')
    example for dba-jobs(copy of the script output of TOAD):
    SYS.DBMS_SCHEDULER.CREATE_JOB
           job_name        => 'DBA_JOBS_EMAILER'
          ,start_date      => NULL
          ,event_condition => tab.user_data.object_name LIKE ''DBA%'' AND tab.user_data.event_type in (''JOB_FAILED'',''JOB_OVER_MAX_DUR'')'
          ,queue_spec      => 'SYS.SCHEDULER$_EVENT_QUEUE, JOB_FAILED_AGENT'
          ,end_date        => NULL
          ,program_name    => 'SYS.EMAIL_NOTIFICATION_PROGRAM'
          ,comments        => 'Auto-generated job to send email alerts for jobs "DBA%"'
        );I thought that a queue is used to manage all events from the scheduler jobs. So i made a test with 2 dba jobs and simulated a failure at the same time but i received only one mail.
    So what is happend with the second event? I looked for the events in the qtab(SCHEDULER$_EVENT_QTAB) which belongs to the event queue(SYS.SCHEDULER$_EVENT_QUEUE) and no event was missing.
    So i think the emailer job has to run 2 times.
    Is anyone able to explain or to find my mistake?
    I know that the easiest way is to create one emailer job for each normal job but i think this is a little bit costly because all the arguments are the same for one department.
    Thanks & Regards

    Thanks for your fast answer.
    You are right with the "enabled => TRUE;" part and i only forgot to post it.
    So the Job is enabled (otherwise it would not send any mail). Because it is sending one mail i think it is also not necessary to hand over a job_type.
    Additionally the job starts a program ... so it is right to set the job_type='STORED_PROCEDURE' isn't it?
    And also right ... i already added the agent as subscriber to the queue.
    Anyway i think the whole thing do what it have to do. So in my oppinion there are no big mistakes in creating the job or at adding the subscriber.
    There are also no problem in raising the events by itself and enqueue them in the scheduler event queue.
    There is only a problem when 2 jobs fails (or run out ouf max duration) at exactly the same time.
    If i understand it right:
    The agent/subscriber will find the "JOB_FAILED"-event for the first Job in the queue and starts the emailer Job.
    The agent will also find the "JOB_FAILED"-event for the second Job and wants to start the emailer Job again.
    I don't know if this is really the problem but perhaps the emailer-job can not be started in consequence of the second event because ist is already running.
    I also don't know if this is a mistake of the agent or of the emailer-job by itself.
    I only want that it runs two times (one run for each event). I my case it also doesn't matter which email is send at first.

  • How to Schedule Jobs to only run during a time window

    I have a long running task that needs to schedule jobs to process data.
    I only want these scheduled jobs to start during a specific window of time each day, probably 10:00 PM to 6:00 AM.
    If the scheduled jobs do not begin during the specified time frame, they must wait until the next day to start running.
    Each scheduled job will only be executed once and then auto dropped.
    How should I go about creating these scheduled jobs?

    Hi Jeff,
    I agree that the documentation isn't clear enough about the purpose of windows.
    You can indeed use windows for changing the resource plan, but you can also use them for scheduling your jobs.
    I did a simple test in real-time to illustrate the latter.
    At around 10.30 am today I created a table that will populated by a job:
    CREATE TABLE TEST_WINDOW_TABLE(EVENT_DATE DATE);
    Then, I created a window whose start_date is today at 10.40 am :
    dbms_scheduler.create_window(
                                 window_name     =>'TEST_WINDOW',
                                 resource_plan   => NULL,
                                 start_date      => to_date('10/04/2014 10:40:00', 'dd/mm/yyyy hh24:mi:ss'),
                                 repeat_interval => NULL,
                                 duration        =>interval '5' minute
    You can see that this window doesn't have a resource plan, and its repeat interval is NULL (so it will be opened only once).
    The window will stay open for 5 minutes.
    Finally, I created a one-off job whose schedule is the previously created window:
    DBMS_SCHEDULER.create_job (
                               job_name      => 'TEST_WINDOW_JOB',
                               job_type      => 'PLSQL_BLOCK',
                               job_action    => 'BEGIN insert into test_window_table values (sysdate); COMMIT; END;',
                               schedule_name => 'SYS.TEST_WINDOW',
                               enabled       => true,
                               auto_drop     => true
    Checking the user_scheduler_job_log before 10.40 would return no rows, which mean the job hasn't started yet since the window was not open.
    Now, from 10.40, it shows one entry:
    SQL> select log_date, status from user_scheduler_job_log where job_name = 'TEST_WINDOW_JOB';
    LOG_DATE                                                                         STATUS
    10/04/14 10:40:02,106000 +02:00                                                  SUCCEEDED
    The TEST_WINDOW_TABLE has also got the row:
    SQL> select * from TEST_WINDOW_TABLE;
    EVENT_DATE
    10/04/2014 10:40:02
    Voilà.
    In your case, since you want to run the jobs daily between 10 pm and 6 am (duration of 8 hours), the window would look like this:
    dbms_scheduler.create_window(
                                 window_name     =>'YOUR_WINDOW',
                                 resource_plan   => NULL,
                                 repeat_interval => 'freq=daily;byhour=22;byminute=0;bysecond=0',
                                 duration        =>interval '8' hour
    For your jobs, you may need to specify an end_date if you want to make sure the job gets dropped if it couldn't run in its window.

  • Background Processing? how schedule job for "System Error" Message .

    Hello everyone,
    in sap help i have read.
    http://help.sap.com/saphelp_nw04/helpdata/en/5a/f72040599a8f5ce10000000a155106/frameset.htm
    PCK> Monitoring>Message Monitoring-->Background Processing
    you can schedule jobs for various background processing:
    ●     Archiving of messages processed successfully
    ●     Deletion of messages that are not to be archived
    ●     Restarting of messages with errors
    ●     Rescheduling of lost messages
    can anyone understand this docu?
    give me some introduction, how can i define and schedule these jobs ?
    thx in advance!!
    best regards
    Yaning

    Background Processing
    Prerequisites
    You have started the message monitor on the initial screen of the PCK and are in Background Processing.
    Features
    Archiving
    You require two archiving sessions to archive messages:
    ●     One session to write the messages to the archive
    ●     One session to delete the persisted messages that have been archived
    To do this, you schedule an archiving job, which implicitly schedules the sessions to write to the archive and delete the archived messages.
    You can define one or more rules for each archiving job; these rules contain conditions that a message must meet in order to be archived by the job. At least one of the defined rules must be met for archiving to take place.
    All information that is displayed for a message in message monitoring is archived, in addition to the audit log for each message.
    Deleting
    A standard delete job is created automatically. It runs once a day. You can schedule additional delete jobs; however, you cannot define rules for them.
    Restarting
    Instead of restarting messages with errors manually with message monitoring, you can schedule a job to automatically restart these messages. This is possible for all messages for which the number of defined restart attempts has been exceeded (messages with the system error status).
    You can define one or more rules for each job to restart messages; these rules contain conditions that a message must meet in order to be restarted by the job. At least one of the defined rules must be met for archiving to take place.
    Rescheduling
    A standard job to reschedule messages is created automatically. The job runs once a day and ensures that messages lost as a result of database failure, for example, are rescheduled. You can schedule additional rescheduling jobs; however, you cannot define rules for them.
    Thx Aamir.
    But I mean the messages with errors in Adapter Engine , not in Intergrations Engine.
    the situation is like Naveen Pandrangi's WebLog
    II. Errors in Adapter Engine [XI :  How to Re-Process failed XI Messages Automatically|XI :  How to Re-Process failed XI Messages Automatically]
    I
    Till now we have seen how to resubmit/restart message that failed in Integration Engine.  One a message makes it from Integration Engine to Adapter Engine, the message is flagged as checked in Integration Engine. The status of the message in Adapter engine does not effect the processed state in Integration Engine. Now if this message was asynchronous, XI will by default try to restart the message 3 times at intervals of 5 minutes before the status of the message is changed from Waiting to System Error .
    *how can i schedule a job to automatically restart these messages with errors?
    best regards
    Yaning
    Edited by: Yaning Liu on Aug 18, 2008 1:43 PM

  • Request vs Actual Start Date in Scheduler Jobs

    Hi, I want to run a PL/SQL block, all days, at 1:00 AM
    I've defined the following scheduler job, in a new (and empty) Job Class:
    <font face="Courier New">
    SQL> select job_name, repeat_interval, job_class, job_priority from dba_scheduler_jobs where job_class = 'MY_NOCHE_JOB_CLASS';
    JOB_NAME...........: UNIFICA_CLIENTES
    REPEAT_INTERVAL....: FREQ=DAILY;BYHOUR=1;BYMINUTE=0;BYSECOND=0
    JOB_CLASS..........: MY_NOCHE_JOB_CLASS
    JOB_PRIORITY.......: 1
    </font>
    However, the process is starting later, for example:
    <font face="Courier New">
    Request Start Date....: Nov 10, 2010 1:00:00 AM -02:00
    Actual Start Date.....: Nov 10, 2010 4:06:33 AM -02:00
    </font>
    Why is the difference between Request Start Date and Actual Start Date ?
    Is there any way to enforce the start of the Job at any time ?
    OS: Solaris 10 8/07 s10s_u4wos_12b SPARC
    DB: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
    Thanks in advance

    The database is not down since at least 2 months
    <font face="Courier New">
    SQL> select LAST_START_DATE from DBA_SCHEDULER_JOBS where job_class = 'MY_NOCHE_JOB_CLASS';
    LAST_START_DATE
    ────────────────────────────────────
    17-NOV-10 04.21.00.447083 AM -02:00
    </font>
    Any advice ?

  • 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,
    Simon

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

  • Schedule Job : Backup Encryption hasnot finish completely.

    Dear Mr/Ms,
               SQL Server 2008 has backup encryption schedule job for 02 databases, but it has just backed up 01 database in several time.
    Access is denied due to a password failure [SQLSTATE 42000] (Error 3279)  BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013).  The step failed.
    I have enough space for backup file.
    Please help me solving this problem completely.
    Thanks and best regards,
      Phong Eximbank.

    Have you tried with PASSWORD='Password123'
    instead of mediapassword?
    Passwords can be used for either media sets or backup sets:
    Media set passwords protect all the data saved to that media. The media set password is set when the media header is written; it cannot be altered. If a password is defined for the media set, the password must be supplied to perform any append or restore
    operation.
    You will only be able to use the media for SQL Server backup and restore operations. Specifying a media set password prevents a Microsoft Windows NT® 4.0 or Windows® 2000 backup from being
    able to share the media.
    Backup set passwords protect only a particular backup set. Different backup set passwords can be used for each backup set on the media. A backup set password is set when the backup set is written to the media. If a password is defined for the backup set,
    the password must be supplied to perform any restore of that backup set.
    https://technet.microsoft.com/en-us/library/aa173504%28v=sql.80%29.aspx?f=255&MSPPError=-2147217396

  • How to stop a scheduled job using OMB*Plus ?

    Hello everyone,
    I use a OMB*Plus script to deploy a project in various environments. This includes scheduled jobs.
    In this context, I need to stop the schedules of the previous versions to avoid a script crash.
    I found the OMBSTOP command thad could do, but I need to retrieve the job ID of the schedule I want to stop. And I don't know how to get the Job ID.
    I could get it from a previous launch and save it somewhere, but it wouldn't work if the schedule was manually stopped and restarted. Maybe is there a command that lists the running / scheduled jobs and their IDs? I didn't find it.
    Thanks in advance for your help.
    Cedric.

    Frankly, I cannot see where this is available via pure OMB+, however you could back-door it if if you can figure out how to get these values from the public views (I would guess from the "Scheduling Views" section at http://download-east.oracle.com/docs/cd/B31080_01/doc/owb.102/b28225/toc.htm).
    Then you could use my SQL library from OMB+ to get these values and stop the schedules before deploying. you can save this file as omb_sql_library.tcl and then just "source /path/to/omb_sql_library.tcl in your own script to make the functions available in your script.
    {code}
    package require java
    # PVCS Version Information
    #/* $Workfile: omb_sql_library.tcl $ $Revision: 1.0 $ */
    #/* $Author: $
    #/* $Date: 03 Apr 2008 13:43:34 $ */
    proc oracleConnect { serverName databaseName portNumber username password } {
    # import required classes
    java::import java.sql.Connection
    java::import java.sql.DriverManager
    java::import java.sql.ResultSet
    java::import java.sql.SQLWarning
    java::import java.sql.Statement
    java::import java.sql.CallableStatement
    java::import java.sql.ResultSetMetaData
    java::import java.sql.DatabaseMetaData
    java::import java.sql.Types
    java::import oracle.jdbc.OracleDatabaseMetaData
    # load database driver .
    java::call Class forName oracle.jdbc.OracleDriver
    # set the connection url.
    append url jdbc:oracle:thin
    append url :
    append url $username
    append url /
    append url $password
    append url "@"
    append url $serverName
    append url :
    append url $portNumber
    append url :
    append url $databaseName
    set oraConnection [ java::call DriverManager getConnection $url ]
    set oraDatabaseMetaData [ $oraConnection getMetaData ]
    set oraDatabaseVersion [ $oraDatabaseMetaData getDatabaseProductVersion ]
    puts "Connected to: $url"
    puts "$oraDatabaseVersion"
    return $oraConnection
    proc oracleDisconnect { oraConnect } {
    $oraConnect close
    proc oraJDBCType { oraType } {
    #translation of JDBC types as defined in XOPEN interface
    set rv "NUMBER"
    switch $oraType {
    "0" {set rv "NULL"}
    "1" {set rv "CHAR"}
    "2" {set rv "NUMBER"}
    "3" {set rv "DECIMAL"}
    "4" {set rv "INTEGER"}
    "5" {set rv "SMALLINT"}
    "6" {set rv "FLOAT"}
    "7" {set rv "REAL"}
    "8" {set rv "DOUBLE"}
    "12" {set rv "VARCHAR"}
    "16" {set rv "BOOLEAN"}
    "91" {set rv "DATE"}
    "92" {set rv "TIME"}
    "93" {set rv "TIMESTAMP"}
    default {set rv "OBJECT"}
    return $rv
    proc oracleQuery { oraConnect oraQuery } {
    set oraStatement [ $oraConnect createStatement ]
    set oraResults [ $oraStatement executeQuery $oraQuery ]
    # The following metadata dump is not required, but will be a helpfull sort of thing
    # if ever want to really build an abstraction layer
    set oraResultsMetaData [ $oraResults getMetaData ]
    set columnCount [ $oraResultsMetaData getColumnCount ]
    set i 1
    #puts "ResultSet Metadata:"
    while { $i <= $columnCount} {
    set fname [ $oraResultsMetaData getColumnName $i]
    set ftype [oraJDBCType [ $oraResultsMetaData getColumnType $i]]
    #puts "Output Field $i Name: $fname Type: $ftype"
    incr i
    # end of metadata dump
    return $oraResults
    # SAMPLE CODE to run a quick query and dump the results. #
    #set oraConn [ oracleConnect myserver orcl 1555 scott tiger ]
    #set oraRs [ oracleQuery $oraConn "select name, count(*) numlines from user_source group by name" ]
    #for each row in the result set
    #while {[$oraRs next]} {
    #grab the field values
    # set procName [$oraRs getString name]
    # set procCount [$oraRs getInt numlines]
    # puts "Program unit $procName comprises $procCount lines"
    #$oraRs close
    #oracleDisconnect $oraConn
    {code}
    So you would want to connect to the control center, query for scheduled jobs, stop them, and then continue on with your deployment. I assume that you also need to pause and check that an scheduled job in mid-run has time to exit before moving ahead. You could do a sleep loop querying against system tables looking for active sessions running mappings and waiting until they are all done or something if you really want to bulletproof the process.
    Hope this helps,
    Mike

  • Analytical snapshots and scheduled jobs

    Hello,
    for extended analytical reports we need to make the snapshots of our statistic datas every day.
    There is an option of doing snapshots of the Project in Project Management, but we need to have snapshots of our own BO's or data sources. Is there any possibility to do this?
    In case snapshots can't be done by the system we also would perform it in coding, by creating business objects with required datas and saving them. But we need to do the saving automatically (regularly).
    In Project Management it is also possible to run scheduled snapshots. How can we schedule jobs (it would be enough if we could execute an action which saves our datas at scheduled time)?
    We have found only "Mass Data Run Process" in this context but the MDR's can be done only for the special standard Floorplans, aren't they?
    Best regards,
    Leonid Granatstein.

    Hi,
    currently it is not possible to create snapshots for partner BO content by a standard process.
    Also defining a mass data run object, which you could schedule and where you could implement the snapshot by yourself, is not available for partners yet.  So we have no standard mechanism available to get your task done with the use of the current implementation possibilities.
    The only option I see is that you develop the snapshot activity on your own in ByD studio.
    To trigger the snapshot activity on a regular basis, I only see the option to trigger this from outside. An option would be to define a web service or an XML file upload.
    You could write for example a small program ( by using PHP or .NET) on a PC which runs on a regular basis and which uploads an XML file or calls a web service. This then triggers the snapshot activity you have programmed in ByD Studio.
    I hope this helps.
    Regards,
    Thomas

  • Issues with scheduling job in sm36 for a standard report...

    Hi,
    After creating a variant for a program, if I try to execute SM36 -> Define step and then, I select ABAP program, the variant name associated with it. Now what do I need to do to schedule job for that report.

    Hi,
    After giving the program and variant..
    Press the start condition button..
    Press Immediate to run immediately..
        Or
    Choose the date and time you want to run this job..
    After that press save.
    Then press save in sm36 for the job..THis will release the job...
    Thanks,
    Naren

  • What is released job and scheduled job?

    Hi BW experts,
    Please let me know what is released job and scheduled job?

    Hi
      <b>Released job</b>:The job has been fully defined, including a start condition. Without a start condition, a job cannot be released.
    Only an administrator or a user with appropriate authorizations for background processing can release a job, preventing unauthorized users from running jobs without approval.
    <b>scheduled job:</b> The job which is scheduled for a particular time and that will come into the queue of jobs to which time it is scheduled.
    U can see these jobs in SM37 tcode

Maybe you are looking for

  • Formatting characters shown in SQL worksheet in version 2.1.1.64

    Hi, Using version 2.1.1.64 When I type SQL in the SQL worksheet is it showing formatting characters - for example all spaces display as a light grey dot and a carriage return character appears at the end of every line. The formatting characters were

  • Oracle Select Max Date

    Hi, I need help with a Select statement that returns the most recent revision date from an Oracle database. This is my Select statement: SELECT STORE.ITEM.ID, STORE.ITEM.ITEM_NUMBER, STORE.ITEM.CATEGORY, STORE.ITEM.DESCRIPTION, STORE.REV.REV_NUMBER,

  • Ageing queries

    Hi What are the standard queries vendor and customer ageing in BI? Can anyone let me know the technical name of Vendor ageing query and custome ageing query Regards annie

  • MBAM 2.5 / Temp User Exempt

    Greetings All, Quick question, on a test system I am using to test out MBAM, I selected the request exemption option which displayed the contact name and phone number as I had setup in the GPO, and it now shows in the reports as Temp User Exemption. 

  • Mediasource now crashes with new version. CTCMS err

    I have been using Mediasource for months with my Zen Xtra 40gb. No problems. I just got a Muvo TX FM and installed the newer version of Mediasource. Now I can't rip CD's. Whenever I try to rip Mediasource crashes with a "CTCMS" error. It does read di