Dbms job vs unix job

Hi all
I have a big discussion going on in our team with dbas and developers.....
we have some tasks such as dropping partitions on a monthly basis and clean up of log tables in the database that have to be scheduled on a monthly basis.
we have written stored procedures to do such tasks
Now a simple dbms scheduler would do the scheduling part ... but dba's are proposing that they do not accept such dbms jobs on the db servers and suggestin us to
create a unix shell script on other application server and connect to the databse through the script. and schedule the script through controlm or autosys tool.
why cant we leverage dbms jobs to do these tasks.... and going for a complex soltuion
what is best solution?

I don't know about RAC, but I would think that Oracle has made DBMS_Scheduler RAC-aware. Worth looking into.
As for monitoring, of course they can monitor it! ("They" are DBA's, yes?) Grid Control or OEM will show DBMS_JOB/SCHEDULER information as it will your SQL Plus query.
I don't understand how the tasks you describe in your first post are not "core" DBA functions, so even if they have the policy you say they have, why do your tasks not fit nicely into the things the DBAs say they want to do in the database? Specifically, +"we have some tasks such as dropping partitions on a monthly basis and clean up of log tables in the database that have to be scheduled on a monthly basis."+
I found an interesting thread on the topic as well. Re: DBMS scheduler v/s Cron
Given that people are asking how to make things run on the same node in the following thread, it looks like by default it will not be stuck running on the same RAC node every time (but for performance reasons it appears to have a slight bias to do so).
dbms_scheduler on RAC database
Edited by: Gaff on Apr 7, 2010 10:39 AM

Similar Messages

  • Our organization uses an Oracle database hosted on a Unix platform and one of our data processing outputs is a "stuffer" document that has a barcode, and Unix jobs automatically send the document to a printer.   Is there a way, or does Adobe have a produc

    Our organization uses an Oracle database hosted on a Unix platform and one of our data processing outputs is a “stuffer” document that has a barcode, and Unix jobs automatically send the document to a printer.
    Is there a way, or does Adobe have a product or solution, to create a PDF version of the document including the barcode, before it’s sent to a printer?

    What format is the document that is printed? Or what technology is used to format the printer? There isn't a standard way of doing things in Unix.

  • Download a Spool job to UNIX ???

    Hi techies:
    <b>I have an urgent request from client.  They need to download a Spool job(report format) to UNIX directory.</b> Is there any standard SAP function routine that does this function???
    PLEASE help -  they have many reports that they want to spool .. and then
    save this spool job in UNIX directory.
    thanks for all your support and assistance.
    SB

    Hello Seshu:
    This fm <b>RSPO_DOWNLOAD_SPOOLJOB is not working to download to
    UNIX  -  unless I am missing something???</b>It does work to download to regular flat text file on local server
    HELP!!
    thanks
    SB

  • Difference between batch job and Background Job

    Hi Forum,
    Can anyone distinguish between batch job and background job for me please ?
    SK

    Hi,
    Batch Job:
    A batch job is a process that runs in the background, often deferred and unattended, to process data in groups (batch) rather than by individual transactions (e.g. a monthly phone bill rather than a bill for each individual phone call). A batch job executes a sequence of programs and technical instructions that are stored in a command file. Progress and error messages are output to a log file allowing users to determine, at any time, if the batch job completed successfully or identify the cause of the problem. Because batch jobs run in the background they are less visible to the end user.
    In a business-computing context, batch job scheduling implies the automatic execution of background tasks (batch jobs) at pre-determined points in time (e.g. every day at 8pm, midday on Wednesday).
    3 types of batch job scheduling can be distinguished: native, basic and advanced batch job scheduling.
    Most operating systems and some business solutions software come equipped with native batch job scheduling tools that provide a limited service (e.g. Windows Scheduled Tasks, UNIX crontab, SAP CCMS) locally to each installation. However, business processes may span multiple platforms, applications, countries and companies. Their complexity may require much more functional power as provided by basic batch job scheduling including national and regional variations in the working calendar, sequence variations according to the day of the month, triggering of jobs by the successful completion of preceding jobs, elimination of gaps and reduced batch windows. Major benefits of basic batch job scheduling are enhanced productivity, operations reliability and cost-reduction. For e-business applications that require real-time processing, the distance between interactive individual processing and batch processing tends to decrease. Advanced batch job scheduling can handle these advanced requirements: event-driven scheduling for a real-time synchronization with interactive processing, just-in-time scheduling to run operations as soon as possible, cross-platform and cross application services for the entire IT landscape, real-time overall monitoring to track background operations for all applications on all servers.
    The standard benefits of batch job scheduling are drastically amplified when job schedulers can handle the end-to-end automation and monitoring requirements for all background operations.
    To schedule a back ground job follow the below steps:
    1. Use Transaction SM36.
    2. Assign a job name.
    3. Set the job’s priority, or “Job Class”:
    High --- Class A
    Medium --- Class B
    Low ---Class C
    4. Here you can specify,when the job is to start by choosing Start Condition. If you want the job to repeat, or be periodic, check the box at the bottom.
    Else click on the immediate and save this.
    5. Now,define the job’s steps by choosing Step.
    Here you need to give the ABAP program that has been used and the name of the variant thats being used.
    6. Save the fully defined job to submit it to the background processing system.(You need to click save button on the main screen i.e SM36)
    7. When you need to modify, reschedule, or otherwise manipulate a job after you've scheduled it the first time, you'll manage jobs from the Job Overview.
    8. Release the job so that it can run.
    The job, even those scheduled for immediate processing, can not run without first being released.So,do remember to release.
    Hope this helps you.
    Regards,
    Rakesh

  • Problems creating background job for program (job open, submit and close)

    Hi gurus,
    im trying to start a background job using the FM BP_START_DATE_EDITOR to show the start date to the job or if it's imediate. this FM it's working fine, after call it im opening a job, submiting it and call the job close FM and the job close FM creates me the job.
    The problem it's when i go to the sm37 to see the job status the job has been canceled, and the job log says that i have to give a start date to the job.
    What i dont understand it's either the job is imediate or i choose a date to start the job always gives me this error...
    Below goes my code,
    any ideas will be rewarded
      CLEAR: stdt_modify_type, stdt_output.
      CALL FUNCTION 'BP_START_DATE_EDITOR'
           EXPORTING
                stdt_dialog                    = 'Y'
                stdt_input                     = stdt_input
                stdt_opcode                    = 14
           IMPORTING
                stdt_modify_type               = stdt_modify_type
                stdt_output                    = stdt_output
           EXCEPTIONS
                fcal_id_not_defined            = 1
                incomplete_last_startdate      = 2
                incomplete_startdate           = 3
                invalid_dialog_type            = 4
                invalid_eventid                = 5
                invalid_opcode                 = 6
                invalid_opmode_name            = 7
                invalid_periodbehaviour        = 8
                invalid_predecessor_jobname    = 9
                last_startdate_in_the_past     = 10
                no_period_data_given           = 11
                no_startdate_given             = 12
                period_and_predjob_no_way      = 13
                period_too_small_for_limit     = 14
                predecessor_jobname_not_unique = 15
                startdate_interval_too_large   = 16
                startdate_in_the_past          = 17
                startdate_is_a_holiday         = 18
                startdate_out_of_fcal_range    = 19
                stdt_before_holiday_in_past    = 20
                unknown_fcal_error_occured     = 21
                no_workday_nr_given            = 22
                invalid_workday_countdir       = 23
                invalid_workday_nr             = 24
                notbefore_stdt_missing         = 25
                workday_starttime_missing      = 26
                no_eventid_given               = 27
                OTHERS                         = 28.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        MOVE 'X' TO gv_flag.
      ENDIF.
      DATA jobname LIKE tbtcjob-jobname.
      DATA jobcount LIKE tbtcjob-jobcount.
      DATA job_release LIKE  btch0000-char1.
      DATA job_imediate TYPE c.
      CLEAR: jobname, jobcount, job_release.
      CONCATENATE 'MAPAEXEC' sy-uname sy-datum
                   INTO jobname SEPARATED BY space.
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                jobname          = jobname
           IMPORTING
                jobcount         = jobcount
           EXCEPTIONS
                cant_create_job  = 1
                invalid_job_data = 2
                jobname_missing  = 3
                OTHERS           = 4.
      IF sy-subrc <> 0.
        MESSAGE i003(zmapas).
        EXIT.
      ENDIF.
      SUBMIT z_mapa_execucao_orcamental
             VIA JOB jobname NUMBER jobcount
             WITH ano EQ ano
             WITH so_perio IN so_perio
             WITH so_date IN so_date
             WITH so_org EQ so_org
             WITH so_num IN so_num
             AND RETURN.
      IF stdt_output-startdttyp EQ 'I'.
        CLEAR job_imediate.
        job_imediate = 'X'.
      ENDIF.
      CALL FUNCTION 'JOB_CLOSE'
           EXPORTING
                calendar_id                 = stdt_output-calendarid
                event_id                    = stdt_output-eventid
                event_param                 = stdt_output-eventparm
                event_periodic              = stdt_output-periodic  "?
                jobcount                    = jobcount
                jobname                     = jobname
                laststrtdt                  = stdt_output-laststrtdt
                laststrttm                  = stdt_output-laststrttm
                prddays                     = stdt_output-prddays  "??
                prdhours                    = stdt_output-prdhours  "?
                prdmins                     = stdt_output-prdmins  "??
                prdmonths                   = stdt_output-prdmonths
                prdweeks                    = stdt_output-prdweeks  "?
                predjob_checkstat           = stdt_output-checkstat
                pred_jobcount               = stdt_output-predjobcnt
                pred_jobname                = stdt_output-predjob
                sdlstrtdt                   = stdt_output-sdlstrtdt
                sdlstrttm                   = stdt_output-sdlstrttm
                strtimmed                   = job_imediate
                targetsystem                = stdt_output-instname
                start_on_workday_not_before = stdt_output-notbefore
                start_on_workday_nr         = stdt_output-wdayno
                workday_count_direction     = stdt_output-wdaycdir
           IMPORTING
                job_was_released            = job_release
           EXCEPTIONS
                cant_start_immediate        = 1
                invalid_startdate           = 2
                jobname_missing             = 3
                job_close_failed            = 4
                job_nosteps                 = 5
                job_notex                   = 6
                lock_failed                 = 7
                OTHERS                      = 8.
      IF sy-subrc <> 0.
        MESSAGE i003(zmapas).
        EXIT.
      ELSE.
        MESSAGE i004(zmapas) WITH jobname.
      ENDIF.
    Thanks in advance,
    Best Regards
    João Martins

    Hello João.
    In debug mode, check the value of variables you passed to parameters sdlstrtdt and sdlstrttm.
    As aditional info, I usually achieve your goal without FM BP_START_DATE_EDITOR.
    Check this code:
    CALL FUNCTION 'JOB_OPEN'
          EXPORTING
               jobname          = w_jobname
          IMPORTING
               jobcount         = w_jobcount
          EXCEPTIONS
               cant_create_job  = 1
               invalid_job_data = 2
               jobname_missing  = 3
               OTHERS           = 4.
    CHECK sy-subrc = 0.
    CLEAR seltab_wa.
    MOVE: t_jobs-param TO seltab_wa-selname,
    t_processar-line+34 TO seltab_wa-low.
    APPEND seltab_wa TO seltab.
    seltab_wa-selname = 'P_LOJA'.
    seltab_wa-low = t_processar-ficheiro+7(4).
    APPEND seltab_wa TO seltab.
    *** Submete o programa para o JOB
    SUBMIT (t_jobs-repid)
      WITH  SELECTION-TABLE seltab
      USER sy-uname
       VIA JOB w_jobname NUMBER w_jobcount
       AND RETURN.
    *** Encerra o JOB
      l_hora = sy-uzeit.
      ADD 60 TO l_hora.
    CALL FUNCTION 'JOB_CLOSE'
       EXPORTING
          jobcount           = w_jobcount
          jobname           = w_jobname
          sdlstrtdt            = sy-datum
          sdlstrttm           = l_hora
          targetserver       = w_servidor
       IMPORTING
          job_was_released     = l_liberado
       EXCEPTIONS
          cant_start_immediate = 1
          invalid_startdate    = 2
          jobname_missing      = 3
          job_close_failed     = 4
          job_nosteps          = 5
          job_notex            = 6
          lock_failed          = 7
          OTHERS               = 8.
    Regards.
    Valter Oliveira.

  • Unable to schedule a job from the Jobs Library

    Hi,
    I have created and stored a job in the Job Library, however when I try and submit it to run with a schedule and against specified targets Grid just seems to hang, and eventually it comes back with "Application server is not responding". I have set it up as a sql script and used a PL/SQL block, I have tested the script outside of Grid and it works fine. I have tried using prefered credentials and override credentials, but this makes no difference.
    I am running OEM 10g Release 3 on Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
    Anybody had anything similar?

    Thanks for the reply. Tested connectivity to both databases from Grid all looks good. Attempted to set up a job individually for each db and it hung on both, again I tried using default credentials and override credentials.

  • JSM - Creating Job Documentation from Job Request itself

    Hi all,
    I am still exploring JSM, and I know its possible to create Job Request (Job Req) from Job Documentation (Job Doc).
    But is it possible to create the reverse (Job Doc from Job Req) ?
    This will be great, if the user is creating Job Req from "Detailed" version (compared to "Basic"), which has similar entries and tabs, as Job Doc.
    I did read somewhere that its possible, but I never find any documentation or SCN/blogs on this.
    Thanks in advance
    Regards
    Shahul

    This was answers below, in the comment area by Volker.
    How to configure SAP's standard Job Request form - Part 2
    Hi Shahul,
    the user triggers the Job Doc creation from within the Incident or Change Request in the JSM assignment block, but then the data from teh Job Request is automatically taken over for the Job Document.
    So starting the creation and pushing the save button is manual work, but the filling out the Job Doc is done automatically.
    Kind Regards
    Volker
    Regards
    Shahul

  • Reports-Job-Scheduler: create job with startoption later: wrong date-format

    Hi,
    I test reports 11.1.1.2.0 (weblogic11 g) and try to start a report job with Reports-Job-Scheduler.
    Startoption: later and date = 09:48 Jan 12, 2010
    When I submit the job I get following Error:
    REP-50006: Das Argument SCHEDULE ist in der Befehlszeile ungültig: 09:48 Jän 12, 2010
    in english:
    Rep-50006: argument Schedule is wrong in command line: 09:48 Jän 12, 2010
    Why is Jän instead of Jan.
    When I start the report in February then it works.
    I defined also environment variables in basic configuration for the report server:
    NLS_DATE_FORMAT DD.MM.YYYY
    NLS_DATE_LANGUAGE GERMAN
    NLS_LANG GERMAN_GERMANY.WE8ISO8859P1
    I would be very pleased to get support.
    Many thanks
    Alois

    I created a SR and oracle support found a bug in EM.

  • We are running 3 batches parallel(a.ksh,b.ksh,c.ksh parallel ) .if a.ksh will complete then d.ksh will start('d' start when 'a' will terminate successfully) and we have to handle error for all jobs ( if some job got aborted during runtime) ?

    we are running 3 batches parallel(a.ksh,b.ksh,c.ksh parallel ) .if a.ksh will complete then d.ksh will start('d' start when 'a' will terminate successfully) and we have to handle error for all jobs ( if some job got aborted during runtime) ?

    Moderator Action:
    You already asked this question, two days earlier.
    https://forums.oracle.com/thread/2585158
    Stay with your original post.   Deliberate multiple posting is the same as spamming the forums.
    This new post is locked.

  • CCMS job monitoring -- RZ20 job history node get duplicated record

    Hi,
    I configured CCMS/Solution Manager auto monitoring job failure. When a job failed on my satellite system, it created a alert and send notification to my CEN, which is my solution manager. Then solution manager send e-mail to a distribution group.
    This is working fine until last week. Now when a job failed, in job history node of RZ20 of my satellite system, the alerts are created mutiple times even the job actually only failed once. For some reasons, the history node of the alerts are updated every 5 minutes with the same job failure. More interestingly, after one hour, it did not create alerts any more. However, as the result I get many e-mails with the same job failure in this once hour, which I expect only one e-mail.
    Do you guys encounter the same problem? I am wondering something has been unintentionaly turned on so it's updating every 5 minutes. I want to turn it off. I looked at SM37 try to find if some batch jobs are doing this but did not find anything running on every 5 minutes.
    Any helpful answers will definitely be appreciated and reward point.
    Yujun Ran

    Hi Suhas,
    Once we had the same issue. But once we updated the current ccmsagent in both Solution manger and the satellite system the issue got resolved.
    Regards,
    Rafikul Hussain

  • How to get job ID/alias of jobs within a job group programatically

    We are trying to automate the export of job group/job definition from tidal in xml file, we know that you can use REST API to get job definition as xml.
    by using http://localhost:8080/api/tes-6.0/Job.get/<Job ID/alias> 
    but the problem is when you use it for group it does not tell you what are all the child of this job group. 
    here is the output you get from REST API 
    <entry><id>354</id><title>TestJOb</title><source>com.tidalsoft.webclient.tes.dsp.db.datatypes.Job</source><tes:job><tes:agenttype>6</tes:agenttype><tes:childrencount>6</tes:childrencount><tes:agentostype>1</tes:agentostype><tes:ownername>IDX_Workgroup</tes:ownername><tes:agentname>machinename</tes:agentname><tes:parentname>\Test</tes:parentname><tes:rerundependency>N</tes:rerundependency><tes:dependencylogic>1</tes:dependencylogic><tes:durationminimum>60</tes:durationminimum><tes:parentactive>Y</tes:parentactive><tes:unixprofile>0</tes:unixprofile><tes:type>1</tes:type><tes:normalexittorange>0</tes:normalexittorange><tes:estimatedmethod>1</tes:estimatedmethod><tes:predecessorsvalue>N</tes:predecessorsvalue><tes:isnotes>false</tes:isnotes><tes:historyretention>30</tes:historyretention><tes:jobdetailid>354</tes:jobdetailid><tes:durationestimated>60</tes:durationestimated><tes:trackingmethod>1</tes:trackingmethod><tes:active>Y</tes:active><tes:durationmaximum>60</tes:durationmaximum><tes:repeat/><tes:id>354</tes:id><tes:dirty> </tes:dirty><tes:ownerid>13</tes:ownerid><tes:fullpath>\Test\TestJOb</tes:fullpath><tes:concurrency>3</tes:concurrency><tes:isrunbook>false</tes:isrunbook><tes:excludeabnormalduration>4</tes:excludeabnormalduration><tes:inheritrepeat>Y</tes:inheritrepeat><tes:inheritoptions>Y</tes:inheritoptions><tes:disablecarryover>1</tes:disablecarryover><tes:normalexitfromrange>0</tes:normalexitfromrange><tes:successorsvalue>N</tes:successorsvalue><tes:inherittimewindow>N</tes:inherittimewindow><tes:lastusermodifiedtime>2013-05-13T00:47:30-0700</tes:lastusermodifiedtime><tes:allowrerun>Y</tes:allowrerun><tes:parentid>18</tes:parentid><tes:agentid>2</tes:agentid><tes:priority>50</tes:priority><tes:inheritagent>N</tes:inheritagent><tes:name>IDX.TestWebService</tes:name><tes:nearoutage>3</tes:nearoutage><tes:saveoutputoption>Y</tes:saveoutputoption><tes:alias>354</tes:alias><tes:allowunscheduled>Y</tes:allowunscheduled><tes:createtime>2013-05-12T23:32:05-0700</tes:createtime><tes:inheritcalendar>N</tes:inheritcalendar><tes:waitOperator>N</tes:waitOperator><tes:exitcodenormaloperator>1</tes:exitcodenormaloperator><tes:lastchangetime>2013-05-13T00:47:30-0700</tes:lastchangetime><tes:clientcachelastchangetime>2013-05-13T00:47:30-0700</tes:clientcachelastchangetime></tes:job></entry>
    it gives you number of child in the group, but does not give further info like what are the JOb ID/alias of children.
    we need this information to dynamically get job definition of all the jobs within a job group.
    Any help much appreacited.

    Solved myself.

  • SAP Scheduler. Multiple jobs for one job definition issue.

    Hi.
    I am facing one problem concerning scheduling jobs. I've created a job definition and deployed it on server. In onJob(...) method system queries to DB for a single result, when this result matches some conditions job is finished, otherwise it waits for a minute and then queries again. Then I tried to create several tasks for this job definition and set similar execution time for all tasks to check their simultaneous behavior. I was surprised to find out that only one job status is 'RUNNING' and for others status is 'STARTING'. But I expected to see all my jobs in status 'RUNNING'. At first I thought the problem was in MDB pool stuff(e.g. InitialSize of beans or something like that), supposing that there is only one working bean and huge queue  of messages. But nothing changed after setting different values for pool params.
    So, can anyone help me to make at least 2 simultaneous working  jobs for one job definition, if it possible, off cause. Or may be I am wrong somewhere. (By the way, I used Threads in MDB for waiting).
    Thanks in advance.

    May be I described my problem rather messy. The main question is it possible to create several jobs for one job definition and see them running at the same time (simultaneously)?
    Thanks.

  • Differences in Background jobs and Dialog jobs

    Hi everyone,
    I am new to SAP and would like a little clarification regarding what is meant by Background jobs and Dialog jobs/processes. We had a situation at our client location where the system got completely bogged down to the point that it almost froze and many of the process chains were failing in BI. As per the basis team, the jobs were triggered as "dialog jobs" instead of "background" jobs which caused a heavy load on the system.
    What is the difference? What happens when the jobs are run in the background or as dialog? Can both be checked in SM37?
    Points will be awarded
    Thanks.

    **Dialog Work process:** The Dialog work process fulfill all requests for the execution of dialog steps triggered by an active user. The dialog work process are not used for request which take long time and which use more cpu. Every dispatcher requires at least two dialog work processes. The dialog work process default time is 300 secs. If the dialog work process does not respond in this time, it will be terminated. Also dialog work process are multiplexed to handle large no of user request.
    **Background Work process:** The background work processes execute programs that run without user interaction. At least two background work processes are required per SAP system. More than one background work processes can be configured per dispatcher. Usually the background work process are used for carrying jobs that take long time to finish, like client copy, client transport etc.., . There are two types of background work process. They are A type and B type. A type background work process are used for mission critical jobs. Background jobs of priority a have high priority than B type back ground jobs.
    you can check your job using tcode SM50.
    Thanks
    Dhiraj

  • How to get Current Background Job name and Job Count programmically?

    Hi all,
            I have a requirement wherein I need to get the Current Background Job name and Job Count in the program and store it in a custom table. In other words, whenever I schedule a particular program ( This is a Std program) in background, I need to update this table with the Job Name and Job Count. This will be used by another program later to read the Job Information from table TBTCO. TBTCO has key fields Job Name and Job ID. The sheduled program will be a SAP standard program and I'll be writing the logic to get the info in an Implicit Enhancement Spot.
    Is there anyway I can do this? Any FM to get this information?
    Thanks,
    Mahesh.

    Hey Adrian,
                             Thanks a lot. This is what exactly i was looking for. Appreciate it.
    Mahesh.

  • DBMS_JOB.RUN: cannot run a job from a job

    I'm trying to set up a job to automatically run every October 1st. The "submit" part of this job is pretty simple, but I am getting some errors on the "run" part:
    declare
    job_nbr binary_integer;
    BEGIN
    dbms_job.submit(job => job_nbr,
              what => 'RESET_ORDER_NBR_SEQ;',
              next_date => to_date('10/1/2008', 'mm/dd/yyyy'),
              interval => 'add_months(sysdate,12)');
    dbms_job.run(job_nbr);
    COMMIT;
    END;
    When I run this script, I get the following error: "ORA-32317: cannot run a job from a job". I know this is due to the dbms_job.run because I don't get the error when I comment this line out. Also, even when I moved the dbms_job.run into its own script (and even hard-coded the job_nbr, so the dbms_job.run was the only line in the script), it still gave me the same error. This is working in SQL Developer when but not in Application Express. It seems to be something specific to the "run", since "submit" and "remove" work fine. Has anyone had any problems like this?

    MBETTIS,
    Rather than including dbms_job.run in your PL/SQL block, why don't you just schedule the job to run via next_date?
    Also, the interval will be computed after the job successfully executes. So if your job takes 5 minutes to run, the value of SYSDATE in your interval may "slide" after each execution. Consider using some form of TRUNC against the SYSDATE in your interval if you want to achieve a consistent execution time.
    Joel

Maybe you are looking for