How to run cfstoredproc in the background

Hi,
I'm looking for a possibility to run an oracle procedure via cfstoredproc
and continue my CF-page immediately afterI starting the procedure.
I need to do that because the procedure sometimes needs more than 10 mintues  so that I get
a timeout.
Does anybody has an idea?
regards Claudia

I tested cfthread, but still I have the same problem like before(page timeout).
Here is what I do:
Start Database procedure to create a data export file. It will be saved on the server.
<cfthread  name="t1" action="run" priority="normal">
<cfstoredproc procedure="exp" datasource="test" returncode="no" >
    <cfprocparam type="in" dbvarname="id"  cfsqltype="cf_sql_integer" value="#url.id#">   
</cfstoredproc>
</cfthread>
When the procedure finished, (this can take some minutes), the export file is opened.
If it is a big export I get a page timeout. If the export is fast enough a popup window opens to download or
open the file.
<cfthread  name="t1" action="join"  />
  <cfheader
    name="content-disposition" charset="utf-8"
    value="attachment; filename=export.txt"
    />
<cfcontent type = "text/plain" 
    file = "export" 
    deleteFile = "no">
What's wrong with my code? How to tell the page to wait until the procedure is finished and not to get a timeout?

Similar Messages

  • How to run form in the background from command line

    please can anybody tell me to
    how to run form in the background from command line
    vishal

    Ummm....Oracle Forms is a foreground runtime kind of thing. What you want is a database procedure (or an OS utility - it depends on what sort of processing you want to do in the background).
    Cheers, APC

  • How to run long running report in the background

    Oracle Application server 10g
    I need to run the long running reports in the background because while the report is running the cursor is loading and the control doesn't return to the user
    this feature exist in oracle 6i by set the following parameter
    RUN_PRODUCT( REPORTS, 'r_1', ASYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    How can I accomplish the same in OAS 10g?

    Hi,
    I've done this in 11g. I think it will be the same in 10g as well
    Following are the steps in 11g using run_report_object.
    1. Read metalink note: Using the Reports Server Queue PL/SQL Table and API - RW_SERVER_JOB_QUEUE [ID 72531.1]
    2. Implement RW_SERVER_JOB_QUEUE table as per above notes.
    3. When submitting report run it as background
    a. SET_REPORT_OBJECT_PROPERTY(lo_report_object, REPORT_EXECUTION_MODE, ASYNCHRONOUS); -
    SET_REPORT_OBJECT_PROPERTY(lo_report_object, REPORT_COMM_MODE , BATCH);
    4. Display the job_id to user (notification).
    5. Create a new form to view reports base on on RW_SERVER_JOB_QUEUE which provides you the status, etc.... (you may have to create a way to identify the username who submitted the job. This way not all users will see the jobs in RW_SERVER_JOB_QUEUE )
    6. Optionally you can use NOTIFYSUCCESS=email to notify user when the report is finished.
    Cheers
    LS

  • How run OC4J in the background

    Hello!
    How can I run oc4j in the background(without a window open) on a solaris box?
    I have tried 'nohup java -jar oc4j.jar &' but the startup seems to hang when I do this.
    Any ideas?

    Make sure you can write to nohup.out in the current directory.
    Also, I typically start my OC4J in /etc/init.d from my solaris machine and that seems to work nicely.
    Also try putting the 2>&1 at the end instead of in the middle.
    Of you could try using CSH vs. SH, some google hits mention that makes life easier.
    Rob

  • 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

  • Run Servlet in the background (Daemon)

    Hi all ,
    I am using Apache Tomcat/5.0.25 container.
    Need some advice regarding running servlet at the background or as daemon . Below is the scope of the program :
    The servlet will do a updating in the database in the background every 5 minute.
    Any ideas how to implement such behaviour using servlet ?
    Thanks.
    Wee Tat

    hi..
    Make a thread and initialize in the init method of ur servlet.
    And make another thread so that it wakes up every five minutes and does the database processing..
    so ur servlet always has a thread which invokes the other thread(database accesing thread)..
    here is the code sample ..
    Thread t = new Thread( new Runnable() {
    public void run() {
    Thread dbHandler = new DBHAndler(..);
    dbHandler .start();
    try {
    t.start();
    catch(IllegalThreadStateException e) { }
    hopefully it works..
    regards
    Kovi

  • How to run a scene in background in javafx

    How to run a scene in background in javafx?

    Can you explain better your objective?
    Because all your scenes vars will be loaded when your app run. The scene is a visual artifact and running it in background could not be usual
    Regards

  • After closing large documents (drawings) the window closes but the process runs still in the background. I open the next document, the same procedure and after dowing this several times the RAM is full the system becoms very slow. what can i do???

    after closing large documents (drawings) the window closes but the process runs still in the background. I open the next document, the same procedure and after dowing this several times the RAM is full the system becoms very slow. what can i do???

    You can always shut it down manually via the Task Manager
    (CtrlShiftEsc)...
    On Mon, Sep 1, 2014 at 3:05 PM, frank koethen <[email protected]>

  • How can I do that the background appears through the person who is on the pic

    how can I do that the background appears through the person who is on the pic

    Hi
    just decrease the opacity of the layer on which you have the person

  • Running AppleScript in the background

    Okay, yet another problem I'm having that I'm going to bug the community here with.
    Is it at all possible to run AppleScript while doing other things? For example, if I wanted my AppleScript to hop online every hour and send me back information from my site could I have it do this while I do other things? Or will I have to wait until it's completed?
    Say I wanted to create a script that hopped on my site and sent me the post number of the last post, could I have it do this while I do other things?
    Something like
    tell application "Safari" to activate
    tell application "System events"
    tell process "Safari"
    (enter code here to get post number and send it to me)
    end tell
    end tell
    I've tried doing it like this and it definitely doesn't work at all if I don't have the Safari window selected at all times, so is there any way in which I can run script in the background while I work on other things or does AppleScript require full control of my computer while it's working?

    Save this script just like the others I posted. The script will do exactly as you asked.
    <pre style="width:630px;height:auto;overflow-x:auto;overflow-y:hidden;"
    title="Copy this code and paste it into your Script Editor application.">property helloWorld : "Hello World "
    global numChars, charNum, x
    on run
    tell application "System Events" to set isRunning to exists process "TextEdit"
    if not isRunning then tell application "TextEdit" to launch
    tell application "TextEdit"
    if isRunning then make new document
    set name of window 1 to "Hello World"
    set numChars to number of characters in helloWorld
    set charNum to 0
    set x to 0
    end tell
    end run
    on idle
    try
    tell application "TextEdit"
    if x = numChars then
    set x to 1
    else
    set x to x + 1
    end if
    set charNum to charNum + 1
    set theChar to character x of helloWorld
    set character charNum of document 1 to theChar
    end tell
    on error
    quit
    end try
    return 0.1
    end idle
    on quit
    continue quit
    end quit</pre>

  • Running program in the background

    Hi everybody!
    I need to run  program in the background.
    So I need only to change the sy-batch status to 'X'?

    HI,
    if your program is runninn in the Background then the System field SY-BATCH will become 'X' otherwise it will have space ......
    it will not execute the job in the background if you put SY-BATCH = 'X'
    you need to use: Job_open , Job_submit and job_close function modules
    example:
    *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
                sdlstrttm        = sy-uzeit
           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.
    Thanks
    Sudheer

  • How to Run scenario from the web using HTTP web page?

    Hi guys
    Please let me know How to Run scenario from the web using HTTP web page?
    Regards
    Janakiram

    Hi Janakiram,
    ODI provides web based UI for running the scenarios using Metadata Navigator (read only of ur ODI components) and Lighweight designer (u can edit the mapping here).
    Please explore how to install metadata navigator in ODI and have a look at ODI Setup document for more information.
    Thanks,
    Guru

  • I have a Mac mini. Suddenly there are ads running constantly in the background. Even when it's just on desktop. Anybody experience this?

    I have a Mac mini. Suddenly there are ads running constantly in the background. Even when it's just on desktop. Anybody experience this?

    Please post a screenshot that shows what you mean. Be careful not to include any private information.
    Start a reply to this message. Drag the image file into the editing window to upload it. You can also include text in the reply.

  • Run OC4J in the background

    Is there anyway I can run OC4J in the background as an NT service?
    Thanks in advance.

    I took the approach above, and my experience was only partially successful. With some scrounging around newsgroups, orionsupport.com, and Sun's website, I came up with the following solution:
    Creating an NT Service for OC4J
    OC4J by default runs as a command shell application, so it is bound to a user's login session and will die if the user who called the start command logs off of the system. Oracle has not provided a version of OC4J that runs as a service on Windows-based servers, so here is a process to create a service using the freeware utility, RunExeSvc (http://www.winwinsoft.com/goodies/RunExeSvc/index.html). This utility is more user-friendly and flexible than tools such as srvany.exe and instsrv.exe in the NT Resource Kit.
    Dependencies
    1. RunExeSvc is installed
    (Unzip the runexesvc.zip file to a directory)
    2. Sun's JDK 1.3.1 is installed.
    (JDK 1.3.1 is required because a bug in prior versions of Sun's JVM for Windows killed any JVMs initiated by a user in that login session.)
    Installation Procedure
    1. Run the RunExeSvcAdmin.exe application
    2. Create a new service by copying the example script below into the Script window of RunExeSvcAdmin.exe. Some changes to drives and/or paths may of course be needed.
    3. Save the new entry and exit the application.
    4. The service should now appear in the services control panel. Changes may be required for its startup options.
    Example Script#########################
    # This script runs OC4J
    # RunExeSvc variables
    # if true, RunExeSvc will show internal status
    debug=false
    # the starting dir of the service
    home=e:\oc4j\j2ee\home
    # Running as an http server.
    cmdline=e:\jdk1.3.1\bin\javaw.exe -Xrs -jar orion.jar -out e:\oc4j_out.log -err e:\oc4j_err.log
    null

  • How to run a program in background and how to check the output

    I have to run my program as background job... it has a selection screen...... and i need to check the output after its complete.

    hi,
    u need to create one program for this.
    tables:btcevtjob.
    parameters:job(32).
    data:count like btcevtjob-jobcount.
    call the function modules JOB_OPEN,JOB_SUBMIT AND JOB_CLOSE
    and pass the parameters in those function modules.
    once u execute this program,
    go with sm37->provide jobname->select the option scheduled
    ->execute
    selct the entry->go with release option.
    under releasae select immediate option
    save
    select the job name again
    go with release
    status is in finished stage
    now go with spool option
    give spool no
    go for display
    o/p displayed.
    before this,go for se38->provide the name of program which u want to run in back ground->seelct variants->change->provide variant name->go for create->provide input value->go with attributes->provide description->save
    this variant name u have to give in the job_submit fm.
    or
    se38->program->execute->in back ground
    Reward points if useful,
    Thanks,
    Usha

Maybe you are looking for