Welcome 微信登录

首页 / 数据库 / MySQL / Ant中执行Oracle存储过程

同样的Oracle dll脚本:
  1. declare c intbegin  
  2. select count(*) into c from user_tables where table_name = upper"ACTIVESTARTTIMES");if c = 1 then execute immediate "drop table "ACTIVESTARTTIMES" cascade constraints";c:=0;end if;   
  3. select count(*) into c from user_tables where table_name = upper"BASEEVENTFORMAT_CLASSIFIERS");if c = 1 then execute immediate "drop table "BASEEVENTFORMAT_CLASSIFIERS" cascade constraints";c:=0;end if;   
  4. select count(*) into c from user_tables where table_name = upper"BASEEVENTFORMAT_PAYLOADIDS");if c = 1 then execute immediate "drop table "BASEEVENTFORMAT_PAYLOADIDS" cascade constraints";c:=0;end if;   
  5. select count(*) into c from user_tables where table_name = upper"BASEEVENTFORMAT");if c = 1 then execute immediate "drop table "BASEEVENTFORMAT" cascade constraints";c:=0;end if;   
  6. select count(*) into c from user_tables where table_name = upper"CLASSIFIERBEFMAP");if c = 1 then execute immediate "drop table "CLASSIFIERBEFMAP" cascade constraints";c:=0;end if;   
  7. select count(*) into c from user_tables where table_name = upper"CLASSIFIERGROUPS");if c = 1 then execute immediate "drop table "CLASSIFIERGROUPS" cascade constraints";c:=0;end if;   
  8. select count(*) into c from user_tables where table_name = upper"CLASSIFIER");if c = 1 then execute immediate "drop table "CLASSIFIER" cascade constraints";c:=0;end if;   
  9. select count(*) into c from user_tables where table_name = upper"CLQUERYMODEL");if c = 1 then execute immediate "drop table "CLQUERYMODEL" cascade constraints";c:=0;end if;   
  10. select count(*) into c from user_tables where table_name = upper"ECOMPID");if c = 1 then execute immediate "drop table "ECOMPID" cascade constraints";c:=0;end if;   
  11. select count(*) into c from user_tables where table_name = upper"LGGINGPOLICYMESSAGE_PROPERTIES");if c = 1 then execute immediate "drop table "LGGINGPOLICYMESSAGE_PROPERTIES" cascade constraints";c:=0;end if;   
  12. select count(*) into c from user_tables where table_name = upper"LOGGINGPOLICYMESSAGE");if c = 1 then execute immediate "drop table "LOGGINGPOLICYMESSAGE" cascade constraints";c:=0;end if;   
  13. select count(*) into c from user_tables where table_name = upper"LOGGINGPOLICYMODEL_MESSAGES");if c = 1 then execute immediate "drop table "LOGGINGPOLICYMODEL_MESSAGES" cascade constraints";c:=0;end if;   
  14. select count(*) into c from user_tables where table_name = upper"LOGGINGPOLICYPROPERTY");if c = 1 then execute immediate "drop table "LOGGINGPOLICYPROPERTY" cascade constraints";c:=0;end if;   
  15. select count(*) into c from user_tables where table_name = upper"LOGSERVICE");if c = 1 then execute immediate "drop table "LOGSERVICE" cascade constraints";c:=0;end if;   
  16. select count(*) into c from user_tables where table_name = upper"OTHERSITUATION_ANY");if c = 1 then execute immediate "drop table "OTHERSITUATION_ANY" cascade constraints";c:=0;end if;   
  17. select count(*) into c from user_tables where table_name = upper"PAYLOADDATA");if c = 1 then execute immediate "drop table "PAYLOADDATA" cascade constraints";c:=0;end if;   
  18. select count(*) into c from user_tables where table_name = upper"PAYLOAD");if c = 1 then execute immediate "drop table "PAYLOAD" cascade constraints";c:=0;end if;   
  19. select count(*) into c from user_tables where table_name = upper"REPORTINGCOMPONENTID");if c = 1 then execute immediate "drop table "REPORTINGCOMPONENTID" cascade constraints";c:=0;end if;   
  20. select count(*) into c from user_tables where table_name = upper"SITUATIONTYPE");if c = 1 then execute immediate "drop table "SITUATIONTYPE" cascade constraints";c:=0;end if;   
  21. select count(*) into c from user_tables where table_name = upper"STATSCLASSIFIERS");if c = 1 then execute immediate "drop table "STATSCLASSIFIERS" cascade constraints";c:=0;end if;   
  22. select count(*) into c from user_tables where table_name = upper"STATSCLASSIFIERS");if c = 1 then execute immediate "drop table "STATSCLASSIFIERS" cascade constraints";c:=0;end if;   
  23. end;  
在Ant中运行出现错误如下 06/08/12 14:22:59.800 INFO: [ProcessWrapper] [STDOUT] cleanup.db.logging:
06/08/12 14:23:00.232 INFO: [ProcessWrapper] [STDOUT]       [sql] Executing resource: /root/installation/DSEngine/work/silver-ion-ui-1/scripts/cleanupDDL/oracle/drop_commonlogging.ddl
06/08/12 14:23:00.247 INFO: [ProcessWrapper] [STDERR]       [sql] Failed to execute:  declare c int; begin select count(*) into c from user_tables where table_name = upper("ACTIVESTARTTIMES");if c = 1 then execute immediate "drop table "ACTIVESTARTTIMES" cascade constraints";c:=0;end if
06/08/12 14:23:00.267 INFO: [ProcessWrapper] [STDERR]
06/08/12 14:23:00.268 INFO: [ProcessWrapper] [STDERR] BUILD FAILED
06/08/12 14:23:00.268 INFO: [ProcessWrapper] [STDERR] java.sql.SQLException: ORA-06550: line 1, column 201:
06/08/12 14:23:00.268 INFO: [ProcessWrapper] [STDERR] PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
06/08/12 14:23:00.268 INFO: [ProcessWrapper] [STDERR]
06/08/12 14:23:00.268 INFO: [ProcessWrapper] [STDERR]    ; 从错误上看是一行结尾没有";", 可是检查了一下, 每一行结尾, 还有文件结尾的确都有";", 把脚本放到DbVisualizer中执行没有问题, 但在Ant中运行为什么会找不到呢?
  • 1
  • 2
  • 下一页
Oracle数据库短时间磁盘空间占用超过88%问题分析如何创建Oracle新用户(新schema)相关资讯      Oracle存储过程 
  • Oracle存储过程拼接in语句 & 自定  (今 09:21)
  • 【PL/SQL系列】Oracle存储过程使用  (04月23日)
  • Oracle存储过程及Java调用  (05/28/2015 20:29:33)
  • Java调用Oracle存储过程返回多条结  (04月29日)
  • Oracle中的存储过程简单应用  (04月10日)
  • 判断点是否落在面中的Oracle存储过  (05/09/2015 09:39:30)
本文评论 查看全部评论 (0)
表情: 姓名: 字数


评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容