Re: apache - dbi - running jobs after browser closed

From: <sybrandb_at_hccnet.nl>
Date: Fri, 16 May 2008 21:40:14 +0200
Message-ID: <bnor24do38s7oqkjdr5ksgachtmnqujek1@4ax.com>


On Fri, 16 May 2008 08:58:26 -0700 (PDT), oldyork90_at_yahoo.com wrote:

>Greetings.
>
>We have an apache server interfaced on a linux box to an oracle
>database, 9i. We use perl with dbi.
>
>I'm fishing here, so it's just some ideas I need. Bottom line of all
>the following rambling is we need to be able to kill running jobs in
>oracle.
>
>There is a monster sql generated report that a web users can execute.
>Since it does not return quickly, an understatement, the user kills
>the browser and tires again... and sometimes again. Messages to that
>fact are ignored. The problem is that the job is left running in the
>database. Just two instances of this report brings the system to it
>knees, uptime reports over 4.00.
>
>There are a few ways to fix this. One if fix the damn report.
>
>Another way is to kill the report. But how. If the user doesn't
>logout, and just kills the browser, the report continues to run.
>Perhaps we can monitor a web connection link with ajax calls... just a
>thought. If it doesn't call back every so often, the job is killed
>(how is another question, never killed an oracle process before).
>
>We build the sql in the perl script and 'execute' it there. Is there
>any utility getting this installed into the database as a pl/sql
>script. Can a function limit itself to one instance in the schema? (I
>suppose it could leave a timestamp in a table)

Instead of hacking yourself out, look up the CREATE PROFILE command in the documentation.

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Fri May 16 2008 - 14:40:14 CDT

Original text of this message