ITPub博客

首页 > 数据库 > Oracle > 使用外部表读日志文件

使用外部表读日志文件

原创 Oracle 作者:wmlm 时间:2007-04-11 15:03:23 0 删除 编辑
根据TOM的提示,使用外部表来查看数据库的警告日志文件[@more@]conn system/manager
grant create any directory to scott;
grant drop any directory to scott;
conn scott/tiger
create or replace directory data_dir as 'D:oracleadmingswebbdump';
-- grant read,write on directory data_dir to scott ;
CREATE TABLE alert_log
(
text_line varchar2(255)
)
ORGANIZATION EXTERNAL
(
TYPE ORACLE_LOADER
DEFAULT DIRECTORY DATA_DIR
ACCESS PARAMETERS
(
records delimited by newline
fields
REJECT ROWS WITH ALL NULL FIELDS
)
LOCATION
(
'alert_gsweb.log'
)
)
REJECT LIMIT unlimited
/

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/271063/viewspace-909954/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-04-08

  • 博文量
    398
  • 访问量
    3716775