利用directory对象及外部表加载读取alert_sid.log文件内容
1 create or replace directory dump1
as 'E:/oracle11g/diag/rdbms/dennis/orcl/trace' ---日志文件的路径
2建立外部表create table alert_log ( text varchar2(400) )
organization external (
type oracle_loader
default directory DUMP1
access parameters (
records delimited by newline
nobadfile
nodiscardfile
nologfile
)
location('alert_orcl.log')
)
reject limit unlimite
/
select * from alert_orcl where rownum<30;
结束。。。。