Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to store the results of several scripts in a table
On Sat, 14 Jun 2003 08:59:30 -0700, fawad wrote:
> 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’t understand how to do this .Could some one please give me
> suggestion/coding.
>
> Regards
>
> Fawad
Use external tables.
You can do something like this:
SQL> create or replace directory bdump as '/oracle/admin/o9i/bdump'
2 /
Directory created.
SQL> grant read on directory bdump to public 2 /
Grant succeeded.
SQL> create table alert_log_ext (
2 line varchar2(2000) )
3 organization external
4 (
5 type oracle_loader
6 default directory bdump
7 access parameters
8 (
9 records delimited by newline 10 nobadfile nologfile nodiscardfile 11 fields (line char(132)
Table created.
SQL> After that, the access is enormously complicated:
select * from alert_log_ext
/
......
LINE
--------------------------------------------------------------------------------starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=IPC))'...
Sat Jun 14 13:08:45 2003
ALTER DATABASE MOUNT
Sat Jun 14 13:08:49 2003
Successful mount of redo thread 1, with mount id 2499258397.
Sat Jun 14 13:08:49 2003
Database mounted in Exclusive Mode.
Completed: ALTER DATABASE MOUNT
Sat Jun 14 13:08:50 2003
LINE
--------------------------------------------------------------------------------ALTER DATABASE OPENSat Jun 14 13:08:50 2003
LINE
--------------------------------------------------------------------------------Undo Segment 4 OnlinedUndo Segment 5 Onlined
LINE
--------------------------------------------------------------------------------Database Characterset is WE8ISO8859P1replication_dependency_tracking turned off (no async multimaster replication found)
Completed: ALTER DATABASE OPEN
10696 rows selected.
SQL>
-- Mladen Gogala Software is like sex, it is better when it is free. Linus TorvaldsReceived on Sat Jun 14 2003 - 12:39:59 CDT
![]() |
![]() |