外部表 alert.log (unix格式转换)

来源:互联网 发布:java互相纸牌源代码 编辑:程序博客网 时间:2024/06/03 17:57

先用perl在windows上把文件格式转换 或者FTP的时候ASCII模式

D:\external>perl -p -e 's/$/\r/' <alert_mydb.log> t.txt

create or replace directory dir_ex as 'D:\external';
drop table alert_ex
create table alert_ex ( text varchar2(400) )
  organization external (
  type oracle_loader
  default directory dir_ex
  access parameters (
  records delimited by newline
  nobadfile
  nodiscardfile
  nologfile
  )
  location('t.txt')
  )
  reject limit unlimited
查看
select * from alert_ex







0 0
原创粉丝点击