sqlldr相关

发布时间:2020-08-11 18:58:37 作者:正月十七
来源:ITPUB博客 阅读:164
--DROP SEQUENCE SEQ_P_ENTERHALLLEADFLOW_CODES;
CREATE  SEQUENCE SEQ_P_ENTERHALLLEADFLOW_CODES START WITH 1 CACHE 100;


CREATE OR REPLACE TRIGGER tri_1 BEFORE INSERT ON P_ENTERHALLLEADFLOW_CODES FOR EACH ROW WHEN(NEW.ID IS NULL)
BEGIN
SELECT SEQ_P_ENTERHALLLEADFLOW_CODES.NEXTVAL INTO :NEW.ID FROM DUAL;
END;
/
sqlldr sh20000_wx/sh20000_wx log=1.log bad=1.bad discard=dis.log control=1.ctl
 
LOAD DATA
INFILE '1.text'
INFILE "2.txt"
APPEND
INTO TABLE P_ENTERHALLLEADFLOW_CODES
Fields terminated    by","
TRAILING NULLCOLS
(
ID "SEQ_P_ENTERHALLLEADFLOW_CODES.NEXTVAL",
LEAD_CODE, 
isvalid FILLER
)
 
CREATE INDEX IDX_lead_code ON P_ENTERHALLLEADFLOW_CODES(lead_code) tablespace TSH10000_WX;

sqlldr tt/tt log=1.log bad=1.bad discard=dis.log control=11.ctl

dos2unix
===========================
# crm start #####################################################################################
#
# interface
rm -f de_bst_interface.txt
cat /oradata2/share_interface/hmbst/in/97SI*.txt >de_bst_interface.txt
mv  /oradata2/share_interface/hmbst/in/97SI*.txt /oradata2/share_interface/hmbst/arch
sqlldr userid=add114/add114 control=de_bst_interface.ctl log=log/de_bst_interface_$TIME.log errors=1000 bad=de_bst_interface_$TIME.bad
#
# details
rm -f de_bst_details.txt
cat /oradata2/share_interface/hmbst/in/97SD*.txt >de_bst_details.txt
mv  /oradata2/share_interface/hmbst/in/97SD*.txt /oradata2/share_interface/hmbst/arch
sqlldr userid=add114/add114 control=de_bst_details.ctl log=log/de_bst_details_$TIME.log errors=1000 bad=de_bst_details_$TIME.bad
#
# bad
cp de_bst_interface*.bad /oradata2/share_interface/hmbst/bad
cp de_bst_interface*.bad /oradata2/share_interface/hmbst/arch
rm -f de_bst_interface*.bad
cp de_bst_details*.bad /oradata2/share_interface/hmbst/bad
cp de_bst_details*.bad /oradata2/share_interface/hmbst/arch
rm -f de_bst_details*.bad
#
# crm end #######################################################################################


推荐阅读:
  1. SQLLDR用武之地
  2. sqlldr的用法

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

sqlldr 相关 lld

上一篇:PostgreSQL DBA(13) - 自顶往下的方法阅读执行计划

下一篇:修改状态条颜色 (补充)

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》