帮我写一个打开Oracle数据库并且执行“update esb_config t set t.val = (case when substr(t.val,0,8)=to_char(sysdate,'YYYYMMDD') then t.val + 2 else (to_number(to_char(sysdate,'YYYYMMDD')||'001')) end) where t.mdl = 'db' and name = 'msgDefVerDt'; update esb_config t set t.val = to_char(sysdate,'yyyyMMddHH24miss') where t.mdl = 'db' and name = 'versionDate'; commit;”命令的bat脚本程序
时间: 2023-05-23 07:05:55 浏览: 97
@echo off
sqlplus username/password@database_name <<-EOF
update esb_config t set t.val = (case when substr(t.val,0,8)=to_char(sysdate,'YYYYMMDD') then t.val 2 else (to_number(to_char(sysdate,'YYYYMMDD')||'001')) end) where t.mdl = 'db' and name = 'msgDefVerDt';
update esb_config t set t.val = to_char(sysdate,'yyyyMMddHH24miss') where t.mdl = 'db' and name = 'versionDate';
commit;
exit;
EOF
pause
阅读全文