- 浏览: 154722 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
追求幸福:
每增加一个新的activity, 都要为这个activity指 ...
关于setContentView -
雨过天晴0521:
感谢第一位留言的网友, 我会坚持下去
ADB push的用法 -
小光棍:
謝謝。整理出來的東西真有用!!
ADB push的用法
同样的oracle dll脚本:
在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中运行为什么会找不到呢?
在网上查了一下,原来Ant默认使用分号来作为一条SQL语句结束, 所以原来的存储过程中的语句被分开执行了。我们希望SQL仍做为整体运行, 可以将delimiter为"/"或其他符号(:= . ( @ % ; not之一), 这样存储过程中就没有分隔符, SQL语句可以作为整体运行了.
注意, 只有oracle需要这样, 如果是sqlserver则不必加delimiter.当然加上也不会有问题.
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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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中运行为什么会找不到呢?
在网上查了一下,原来Ant默认使用分号来作为一条SQL语句结束, 所以原来的存储过程中的语句被分开执行了。我们希望SQL仍做为整体运行, 可以将delimiter为"/"或其他符号(:= . ( @ % ; not之一), 这样存储过程中就没有分隔符, SQL语句可以作为整体运行了.
注意, 只有oracle需要这样, 如果是sqlserver则不必加delimiter.当然加上也不会有问题.
<target name="cleanup.db.logging" depends="replace.db.password" description="Run ddl to cleanup commonlogging tables in external database for amx administrator"> <sql driver="${admin.db.driver}" url="${admin.db.url}" userid="${admin.db.username}" password="${plaintext.password}" print="yes" delimiter="/"> <classpath refid="jdbc.classpath"/> <transaction src="./${db.ddl.path}/drop_commonlogging.ddl"/> </sql> </target>
发表评论
-
Linux下安装SF oracle
2013-08-06 16:43 693在使用oracle enabler时需要在engine运行的系 ... -
ORA-01940 如何drop user
2013-03-27 19:28 1445使用drop user bpmuser cascade时遇到以 ... -
如何向apacheDS添加新的user
2013-03-01 12:24 19611.Right-click on the ou=users n ... -
如何导入apache DS的数据
2013-02-28 19:35 15451. 安装好ApacheDS后, 启动ApacheDS ser ... -
ORA-01119: error in creating database file ***
2013-02-20 19:24 6647case1.今天在运行amx-bpm deploy-bpm的脚 ... -
(转)Oracle用户、权限、角色管理介绍
2013-02-20 14:15 744转自:http://blog.csdn.net/jun ... -
about Teradata SQL
2012-11-09 14:37 923http://www.razorsql.com/docs/te ... -
How to change the password for a user in Oracle
2012-11-09 14:34 965Answer: To change a user's pas ... -
Modify password of an accnout in SQL Server
2012-11-09 14:32 765http://msdn.microsoft.com/en-us ... -
Ant执行SQL server 存储过程时的一个问题
2012-11-07 15:31 1453在ant上执行SQL server的存储过程, 事务不会自动提 ... -
How to forcely drop tables in SQL Server 2008
2012-11-01 17:25 820This script can drop a SQL Serv ... -
如何在ant中调用javascript
2012-05-25 20:30 1497在java6中内置了一个javascript的engine: ... -
如何创建SQL Server 2008的数据库
2012-05-09 19:56 1062step 1.打开SQL Server Managem ... -
如何创建oracle新用户(新schema)
2012-05-08 18:24 6766oracle中创建新的user, 也就相应地创建了一个新的sc ... -
详解Oracle用户解锁命令的两则实现方法
2011-08-10 18:58 850在安装完Oracle 10g之后,想打开sql*plus来学习 ... -
Oracle客户端连接数据库总结
2011-08-10 18:56 1088tnsnames.ora文件 这个文件类似于unix 的h ... -
oracle中几个配置文件的作用
2011-08-10 18:55 934tnsname.ora 是客户端用来查找,连接lis ... -
忘记oracle数据库密码怎么办
2011-08-10 18:49 1069很久不用的oralce数据库,如果忘记了密码,可以这样 ...
相关推荐
Ant执行脚本仅供自己参考Ant执行脚本仅供自己参考Ant执行脚本仅供自己参考
博文链接:https://liyanboss.iteye.com/blog/185093
java代码调用ant执行类,供参考java代码调用ant执行类,供参考
ant学习笔记之(ant执行命令的详细参数和Ant自带的系统属性)
ant ant ant antant ant ant antant ant ant ant
里面包括ant中文书籍,说明ant的使用。和ant1.7.1版本
ANT执行junit可运行
标签:ant-oracle-classes.jar.zip,ant,oracle,classes,jar.zip包下载,依赖包
我的ant脚本,用于打包文件,其中包含了常见的jar包工具,学习常用的ant命令
ant中文帮助文档 比较全面 对于刚开始学ant的同学很有帮助
ant ant下载 ant配置ant ant下载 ant配置ant ant下载 ant配置
NULL 博文链接:https://tiantiankaixin.iteye.com/blog/754861
官方版本,亲测可用
开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6...
非maven项目中的ANT打包可执行JAR包脚本,包括配置文件、第三方jar打包
主要介绍了配置Ant执行Jmeter脚本过程详解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
原因是安装的是ant1.105版本对应的jdk是1-8,而我项目环境是1.7,版本不一致导致的问题