Wednesday, August 20, 2008

External table to select from Oracle alert log

create or replace directory bdump
as '/u01/app/oracle/admin/ts01/bdump';

create table alert_log ( text varchar2(400) )
organization external (
type oracle_loader
default directory BDUMP
access parameters (
records delimited by newline
nobadfile
nodiscardfile
nologfile
)
location('alert_ts01.log')
)
reject limit unlimited
/