By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,589 Members | 2,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,589 IT Pros & Developers. It's quick & easy.

SQL0104N An unexpected token "DATABASE" was found following "CREATE ".

P: 2
<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.
Jul 18 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.