Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to store the results of several scripts in a table

Re: How to store the results of several scripts in a table

From: Ryan <rgaffuri_at_cox.net>
Date: Sun, 15 Jun 2003 13:42:16 GMT
Message-ID: <YI_Ga.30783$Id7.8733@news2.east.cox.net>

"fawad" <ahm_fawad_at_yahoo.com> wrote in message news:ef765af9.0306140759.74d3b5fc_at_posting.google.com...
> Hello,
> I am using a main script which contains several sub scripts which I
> run to evaluate the performance of the database
> These scripts generate result files(text files) .But now I want that
> these scripts should not create result files but put the result into a
> following table every time when I run the main script.
>
> The table something like this: "result_id, script_id (Foreign Key),
> time_stamp, result (Text)"
>
> I have also a table structure, that manages my scripts. The columns
> of that table are "script_id, category, description, script".
>
> I can&#8217;t understand how to do this .Could some one please give me
> suggestion/coding.
>
> Regards
>
> Fawad

two easy ways to do this.

  1. bulk collect your queries into a pl/sql table.
  2. pass the pl/sql table to a procedure that has PRAGMA AUTONOUMS_TRANSACTION in the header, then do a forall insert into your log tables. I use that alot when Im running jobs and want to see my progress.

or you can do the same thing with a ref cursor. make sure you have a sepearate insert function with autonomous transaction, in case you are doing other transactions. Just write a seperate script that does. you can pass the table name to the script also and make it dynamic. so its a one size fits all. Received on Sun Jun 15 2003 - 08:42:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US