Running job in background

Hi,
I am using oracle 10.2.0.4 and HP UX .
I want to run job in background .For this i created on sql file "stat.sql"
execute sys.dbms_stats.gather_schema_stats( ownname=>'PRD',cascade=>FALSE,degree=>dbms_stats.default_de
gree, estimate_percent=>100);
and then i created one "statscr.sh" file to run this script.
#!/bin/ksh
sqlplus sys/sys as sysdba
@/home/oracle10/stat.sql
exit
i am running this by
nohup ./statscr.sh >/home/oracle10/stat.log &
But soon it displaying message ...
/home/oracle10 > nohup ./statscr.sh >/home/oracle10/stat.log &
[1] 27188
[1] + Done(126) nohup ./statscr.sh >/home/oracle10/stat.log &
How to check this job is running in backuground or not .. in ps -ef|grep nohup it is not displaying anything .
OR is there any thing wrong in my steps ...
Thanks

Hi,
i missed to reply your part ..
See when i loged in to system .. it is prompted me like
oracle10@n2v4d1/PRD
/home/oracle10 >
i tried by "jobs" but it not showing anyting ...
this is one time activity till now ..i need to run few sql script before starting this job and after finishing this job ...
those scripts are taking less time . so i am doing directly in sql prompt ..
I don't know when previous script will fininsh ,so i am not able to tell time when i can run this script.
can you find any mistake in my shell script or sql script or executing command nohup ...
Thanks

Similar Messages

  • [abap] Running job in background

    Hi !
    When I am running a job in background using the functions :
    'JOB_OPEN','JOB_SUBMIT','JOB_CLOSE'.
    Eventually the job is in finished status, however
    I get the following error popup message :
    " classification locked (user username)
    you cannot classify the batch
    because the batch class is
    currently being processed.
    Do you want to try to carry out the
    classification again ?
    Please tell me what's the problem, and how to correct the problem ?.
    Thanks
    moshe

    Most likely you try to change data which is locked by another user to the same time in some cases - depending on what you were doing the locks are created by the same job in a previous step. In both cases there is only one scenario that works - check, resp. wait until the locks are released.
    Christian

  • Running jobs asynchronously

    Suppose I want to run 3 procedures
    If I call them in a function like this
    proc1()
    proc2()
    proc3()
    Then proc2 won't start until proc1 finished and so on.
    How can I start them simultaneously without proc2 caring for whether proc1 finished or not?
    Basically I'm looking something like using "&" in Unix to run jobs in background.
    My environment is Oracle 10g in Windows 2003.

    Hi,
    You can use [DBMS_SCHEDULER|http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_sched.htm#CIHHBGGI] to run the procedure and continue with other procedures, for examples you can see [DBMS_SCHEDULER|http://psoug.org/reference/dbms_scheduler.html].
    More examples in [Scheduler in Oracle Database 10g|http://www.oracle-base.com/articles/10g/Scheduler10g.php]
    Regards,
    Edited by: Walter Fernández on Jun 29, 2009 10:18 AM - Adding other url...

  • Error while running a job in background

    Hi,
      I got the following error message while running the job in background.
    "Step 001 started .
    Control Framework: Fatal error - GUI cannot be reached.
    ABAP/4 processor: RAISE_EXCEPTION
    Job cancelled"
    What is the reason for this error and how to correct it?

    ALV Grid control is based on the custom controls on the screen. When the program is scheduled in background, it tries to create GUI related front-end objects and hence the error u201CFatal Error u2013 GUI cannot be reachedu201D. This type of problem is common with all the programs that use the ALV grid control to display the output.
    Solution:
    Whenever we execute this type of programs in background, we should be passing a blank docking container instead of the custom container as parent to our grid control. 
    The docking container doesnu2019t need any of the custom controls on the screen; instead it attaches an area to any or all of the four edges of the screen (top, left, right or bottom). The behavior of the areas in the container is determined by the sequence in which they are initialized. Docking Containers are attached to the screen from the inside out. This means that when you create a second container, it is attached to the edge of the screen, and the container that was already there is pushed outwards. 
    Let us modify the standard program (by taking a copy of it) to enable it to execute it in background.
    Following modifications have to be made:
    ·        Define a docking container in the program
    data: or_doc  type ref to cl_gui_docking_container .
    ·        At the time of creating a custom container, check if the program is being executed in background or foreground. If the program is scheduled in background, then create a docking container instead of custom container.
    if cl_gui_alv_grid=>offline( ) is initial.
        create object or_custom_container
               exporting container_name = c_container.
      create object or_grid
             exporting i_parent = or_custom_container.
    else .
    create object or_grid
             exporting i_parent = or_doc .
    endif . 
    Now test executing the program in background. The report would be generated.

  • How to run a job in background programatically after 10 sec

    Hi Forum,
    Can anyone tell me How to run a job in background programatically after 10 sec..
    Thanks in advance

    Hi,
    Here is the example code
    *Submit report as job(i.e. in background) 
    data: jobname like tbtcjob-jobname value
                                 ' TRANSFER TRANSLATION'.
    data: jobcount like tbtcjob-jobcount,
          host like msxxlist-host.
    data: begin of starttime.
            include structure tbtcstrt.
    data: end of starttime.
    data: starttimeimmediate like btch0000-char1.
    * Job open
      call function 'JOB_OPEN'
           exporting
                delanfrep        = ' '
                jobgroup         = ' '
                jobname          = jobname
                sdlstrtdt        = sy-datum    " You need to give the Date for execution the Job
                sdlstrttm        = sy-uzeit    " You need to give the Time for execution the Job
           importing
                jobcount         = jobcount
           exceptions
                cant_create_job  = 01
                invalid_job_data = 02
                jobname_missing  = 03.
      if sy-subrc ne 0.
                                           "error processing
      endif.
    * Insert process into job
    SUBMIT zreport and return
                    with p_param1 = 'value'
                    with p_param2 = 'value'
                    user sy-uname
                    via job jobname
                    number jobcount.
      if sy-subrc > 0.
                                           "error processing
      endif.
    * Close job
      starttime-sdlstrtdt = sy-datum + 1.
      starttime-sdlstrttm = '220000'.
      call function 'JOB_CLOSE'
           exporting
                event_id             = starttime-eventid
                event_param          = starttime-eventparm
                event_periodic       = starttime-periodic
                jobcount             = jobcount
                jobname              = jobname
                laststrtdt           = starttime-laststrtdt
                laststrttm           = starttime-laststrttm
                prddays              = 1
                prdhours             = 0
                prdmins              = 0
                prdmonths            = 0
                prdweeks             = 0
                sdlstrtdt            = starttime-sdlstrtdt
                sdlstrttm            = starttime-sdlstrttm
                strtimmed            = starttimeimmediate
                targetsystem         = host
           exceptions
                cant_start_immediate = 01
                invalid_startdate    = 02
                jobname_missing      = 03
                job_close_failed     = 04
                job_nosteps          = 05
                job_notex            = 06
                lock_failed          = 07
                others               = 99.
      if sy-subrc eq 0.
                                           "error processing
      endif.
    Regards
    Sudheer

  • Can the standard program RFBIBL00 be run as a background job ?

    Hi all,
    Can the standard program RFBIBL00 be run as a background job for the call transaction mode.
    As I tried I got the job cancelled with message"Job RFBIBL00: Data does not match the job definition; job terminated".
    As i run it in foreground it executes properly.
    Why is it failing in background? Please help.
    Thanks ,
    Stock

    Hi,
    You need to copy the program RFBIBL00 & modify the program to build the logic to upload through application server. Then schedule the modified program in background & it wl work.
    Best regards,
    Prashatn

  • Downloading the file in our PC , when running the job in Background

    Hi,
    We have an enquiry for below requirment.
    Our client runs some jobs in front end , but as the time taken to execute the JOB is more than 15 minutes  , he is getting timeout problem, so we want to run the same program in background.
    Generally the output of the report is to download the file into his desktop,  so even when he is running
    the same job in background he want it to be downloaded into his PC, instead of application servor.
      We created a test program similar to the requirment, and ran the job in foreground and the file could easily be downloaded to desktop. Then we ran the program in backgound - The job failed with an error message  Codepage could not be determined  - Message no. FES025.
    My Question is - is it possible to download the file into the desktop while running in background.
    Please help me .
    Thanks in advance.
    Vengal Rao.

    Please search the forum. This question has been asked and answered many times before.
    Rob

  • Running job with a specific background ID...

    I have a program and a background ID created. I want to run that job in background immediately using that background ID defined by basis. How can I do that ?
    Regards,
    Rajesh.

    Hi,
    YOu can create a separate program with Input parameters as job id.
    Now submit the program using SUBMIT statement along with Job id, jobname which are created.
    Usually, we will be creating job id using JOB_OPEN function module, and then will be submitting a background job using SUBMIT statement and finally closing the job using JOB_CLOSE function module.
    Regards,
    AShok

  • Will it be possible to run several jobs in background at the same time?

    Hi!
    The new release looks promising. Look forward to hear more in Birmingham.
    Just now we have a problem. It have to do with functionality In Toad compared to SQL Developer.
    Will it be possible to run several jobs in background at the same time. Toad allows that.
    If yes: How can we make that happen?

    "Jobs" are always background.
    But I take you mean queries. Yes, since v1.5.x you can open an Unshared SQL Worksheet (ctrl-shift-n or the toolbar button).
    Have fun,
    K.

  • Can the width of a report that has been run in the background be increased?

    Hello Experts,
    How can I increase the width of a report that I have run in the background so that it does not wrap text to the next line?
    I have been running the same HR report successfully in the background for many months.  Today I ran it with the same parameters that I've always used and when I retrieve it from my Own Job Spool - System | Own Spool Request | Display Contents the last field is wrapped to the next line.
    Thanks.
    Regards,
    Jeanette

    Jeanette,
    Thereu2019s another possibility if Tedu2019s suggestion doesnu2019t work. When you look at your spool requests, thereu2019s an icon on the toolbar next to the eyeglasses that looks like a yellow rectangular callout. Itu2019s called u201CDisplay in Maximum Widthu201D. Select the Spool no. to display and then press this icon. Shift + F4 is the shortcut.
    Regards,
    Howard

  • Submit a job in background

    Hi,
    We have a query regarding submission of Jobs in background. If we use JOB_OPEN,JOB_CLOSE in our executable program to submit a job to run this proram with a transaction code and also schedule this job in background using SM36 the what will be the effect?

    Hi pankaj,
    1. If the program only display some data,
      and does not update anything,
      then nothing will go wrong.
    2. Both programs will run independently of each other,
      in background.
    regards,
    amit m.

  • Schedule job in background and ftp the data to non-sap system

    Hello All,
    I have a requirement where in i have to write a program(with selection screen) to download 2 files into application server(frequency: end of each day i.e daily at 23:59), and then in turn i need to put those two files into FTP server using FTP script.
    i guess my flow of the code should be
    1. write the program with selection screen and
    2. get the data from corresponding tables and put it into internal tables.
    3. then i have download the data into application server
    my question is : how i will schedule the job in background to download the data into application server daily? using job_open, job_submit, job_close?
    4. then how i need to move the files from application server to FTP server using FTP SCRIPT?
    Also my doubt is once i execute the program ONLY, the background job is triigred (because i wrote job_open, job_submit and job_close inside my program). then how will i input the data into screen daily and download the data into application server in background automatically???? i am confused ...
    Please help me to solve the above issues
    thanks
    sangeetha

    >
    sangeetha s k wrote:
    How my data in application server will be transfer to another system using above FM? Because i am not passing application server file path in SAP to that FM. Could you please explain ?
    So the path name and the file name are always the same? In that case you could simply create a SM49 entry with hard coded file & path name.
    An easy example for the COPY command under WINDOWS OS:
    Create a command in SM49 called ZCOPY with following data:
    Operating System = Windows NT
    OS command: cmd
    Parameters for os command: /C copy  "C:\tmp\my_file.txt" "z:\tmp\my_file_copy.txt"
    Additional parameters allowed: (leave blank)
    In this case you would call SXPG_COMMAND_EXECUTE by filling this 2  parameters:
         commandname                  = 'ZCOPY'     
         operatingsystem               = 'Windows NT'
    In the case that the file name and the path are not fixed you would set the following in the SM49 definition:
    Additional parameters allowed: X
    In this case you would call SXPG_COMMAND_EXECUTE by filling this 3  parameters:
         commandname                   = 'ZCOPY'     
         operatingsystem                = 'Windows NT'
         additional_parameters       = params  "<== fill in the path and file name during run time into this variable

  • A problem about the "Max running jobs". Thanks a million!

    Hello everyone,
    The "Max running jobs" was set to 15.
    (1). When I dragged two assets into FCSvr at a time, in the "Search all jobs" window, I saw the first one being uploaded then transcoded, and later the second one being uploaded then transcoded.
    (2). When I dragged them into FCSvr one by one, I saw them being uploaded, then the first one being transcoded, and the second one later.
    Thus with (2), there is no need to wait or queue between the uploading of the second one and the transcoding of the first one.
    However, I intend to drag the assets at the same time, besides, I wanna attain the aim in (2) that no queue to wait. Could someone tell me how to do it?
    With best regards,
    Steven Lee
    PINZ Media

    If I understand, you used for upload menu "Upload file..."
    For uploading and conversation in same time many files you can setup production action (response) for some folder on your device (XSAN, RAID, HDD)
    This action can create production for folder, and create assets for media in folder. The add action "SCAN" in response submenu. For transcoding many assets in same time check radio button "Background Analyze" in response "SCAN".
    You can read more about that in manual.

  • SAFARI: running in the background:

    When I access a website there is an automatic refresh of the content. When I open a different webpage with Safari, then the automatic refresh on the first page stopps! How can I have a webpage be refreshed in background?
    Does Safari download content when it is minimized / not visible?
    When I go back to the first page, then the automatic refresh is not there any more. The function has been de-activated by Safari on Ipad. (On a Firefox on windows there is no such problem). How can I get the same webpage behaviour than before. (I know that reloading the page does the job. But this should be automatic and not from the user)

    The ipad like a lot of other mobile devices use a type of multitasking that differs from multitasking you would find on Mac OS X, Windows or Linux.  Apple chooses to put most background apps on iOS devices in a suspended mode which allows the application to be paused in the background and then respond quickly when brought to the foreground. Some application functions can continue to run in the background.
    Features that are allowed to run in the background are music, location services, airplay, VoIP, push notifications, but it is still up to the developers to make use of this functionality.
    I don't believe Safari is one of the applications that will continue to run in the background.
    Why does Apple choose to do this? Short answer: Battery life and performance.  If app developers were allowed to choose whether or not to have their application to run in the background, bad programmers would quickly kill the performance and battery on the iOS device.
    Some devices such as andriod phones and the blackberry playbook allow broader multi-tasking. The trade off? Andriod phones have task killers, which forces the user to manage their performance and battery life. The playbook comes shipped with a default of using suspended multi-tasking on vs. full multi-tasking - since full multi-tasking would again affect performance and battery life.
    I agree it would be nice if webpages continued to load if Safari is in the background, and maybe this will be added / enabled in the future. I think Apples design provides a better user experience and still allows most of the functions to run in the background that need to.  (I don't need a movie to play in the background or game).
    My guess would be Safari doesn't allow background use right not because of issues like auto-refresh pages, which again would affect performance and battery.

  • PDF to spool to run program in background

    Hi Experts,
    i have created a custom program by copying FP_TEST_00 and gave nodialog mode for out parameters which will supress the prompt for printer and that i can run it in background. i just want the data to written to spool.
    call function 'FP_JOB_OPEN'
    changing
    ie_outputparams = iwa_outputparams
    exceptions
    cancel = 1
    usage_error = 2
    system_error = 3
    internal_error = 4
    others = 5.
    call function module with import params
    call function function_name
    parameter-table
    para_tab.
    close job
    call function 'FP_JOB_CLOSE'
    exceptions
    usage_error = 1
    system_error = 2
    internal_error = 3
    others = 4.
    Any pointers in this regard will be help ful.
    Please provide some inputs if we can send the PDF to a spool.
    Thanks in Advance,
    Deepa

    Try:
    iwa_outputparams-REQNEW = 'X'.
    iwa_outputparams-REQFINAL = 'X'.
    Cheers,
    Andres.

Maybe you are looking for

  • Pan & Zoom Not Working in PP4

    Using PP CS4 with 8 years experience with Premiere, am having trouble with this effect. Effect Controls > Motion > Position & Scale controls are all there but the resizing for keyframes is not having any visible effect in either Source or Program mon

  • ASSIGN_TYPE_CONFLICT in SAPLCOM_PRODUCT_UI_API

    Hi Experts, I am calling FM  "COM_PRODUCT_UI_MAINTAIN" when executing from Z program. Passing the value for IS_PRODUCT and IS_SET. But the program is terminated with dump "ASSIGN_TYPE_CONFLICT" for ABAP Program           SAPLCOM_PRODUCT_UI_API, Inclu

  • While creating change number

    At the time of creating change number do i need to give the material numer whose BOM need to be changed using that change number Or while changing the BOM of a material using that change number in the change no. master the material is updated in Obje

  • Disable Creation of infotype

    I would like to disable creation and insertion of a custom 9xxx infotype... Is there any customizing way to do this ? Or should I do some abap Regards

  • If 11.6.602.168&167 are the latested?

    what is 11.6.602.170 is it an even newerer version just not available in download area yet??