<project name="DBCreate" default="usage" basedir=".">
<property name="user" value="db2admin"/>
<property name="passwd" value="db2admin"/>
<property name="dbprefix" value=""/>
<property name="driver" value="COM.ibm.db2.jdbc.app.DB2Driver"/>
<property name="starturl" value="jdbc:db2:temp"/>
<property name="db2dir" location="${basedir}/../../../../.." />
<target name="CreateTestData" >
<echo message="in mydbs db2dir = ${db2dir}" />
<sql driver="${driver}" url="${starturl}" userid="${user}" password="${passwd}" autocommit="false" classpath="${db2dir}/core/lib/ext/db2/db2java.jar">
<transaction>
create database posa;
create database posb;
</transaction>
<transaction>
commit;
</transaction>
</sql>
</target>
</project>
------------ It is giving me following error ------------------------
------------ It is giving me following error ------------------------
------------ It is giving me following error ------------------------
E:\codebase\product\pos\stdpos\main\subsystems\pos common\db\scripts\db2\client>ant CreateTestData
Buildfile: build.xml
mydbs:
[echo] in mydbs db2dir = E:\codebase\product\pos\stdpos\main\subsystems
[sql] Failed to execute: CREATE DATABASE posa
BUILD FAILED
E:\codebase\product\pos\stdpos\main\subsystems\pos common\db\scripts\db2\client\build.xml:151: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Dri
r][DB2/NT] SQL0104N An unexpected token "DATABASE" was found following "CREATE ". Expected tokens may include: "TABLESPACE". SQLSTATE=
601
Total time: 2 seconds
Any help in this regard is appreciated.
|