DW系统WIN下上线方案

1、 D盘根目录下新建WIN_ONLINE文件夹(程序全部在此目录下)

2、 批调度程序

WIN_ONLIINE.bat

 D: cd D:/WIN_ONLINE sqlplus edw/edw@orcl @./ALL_CTL.CTL exit

3、 总控脚本

ALL_CTL.CTL

 spool ./online.log @./create_table.spl; @./insert_data.spl; spool off; exit

4、 被调用的两个脚本(建表和插入数据脚本)

create_table.spl

 drop table EDW_INT_NISJ; create table EDW_INT_NISJ ( AGMT_NO VARCHAR2(40) not null, AGMT_SUB_NO VARCHAR2(4) not null, NEED_REPAY_INT NUMBER(22,2), CURR_PERIOD NUMBER(4) not null );

insert_data.spl

 insert into edw_int_nisj (AGMT_NO, AGMT_SUB_NO, NEED_REPAY_INT, CURR_PERIOD) values ('20003874', '2104', 3126.50, 7); insert into edw_int_nisj (AGMT_NO, AGMT_SUB_NO, NEED_REPAY_INT, CURR_PERIOD) values ('20003874', '2104', 3290.76, 6); insert into edw_int_nisj (AGMT_NO, AGMT_SUB_NO, NEED_REPAY_INT, CURR_PERIOD) values ('20003874', '2104', 3454.06, 5); insert into edw_int_nisj (AGMT_NO, AGMT_SUB_NO, NEED_REPAY_INT, CURR_PERIOD) values ('20003874', '2104', 3616.41, 4); insert into edw_int_nisj (AGMT_NO, AGMT_SUB_NO, NEED_REPAY_INT, CURR_PERIOD) values ('20017143', '2104', 2350.86, 0); insert into edw_int_nisj (AGMT_NO, AGMT_SUB_NO, NEED_REPAY_INT, CURR_PERIOD) values ('20017143', '2104', 3566.55, 0); insert into edw_int_nisj (AGMT_NO, AGMT_SUB_NO, NEED_REPAY_INT, CURR_PERIOD) values ('20018273', '2104', 1639.46, 0); insert into edw_int_nisj (AGMT_NO, AGMT_SUB_NO, NEED_REPAY_INT, CURR_PERIOD) values ('20018273', '2104', 2080.49, 0); commit;

5、 说明:./表示当前文件夹;此例只是一个简单的可行性方案,根据实际情况,会有所改动及更新。

你可能感兴趣的:(脚本,table,null,insert)