467,923 Members | 1,778 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,923 developers. It's quick & easy.

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

<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">
create database posa;
create database posb;

------------ 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

[echo] in mydbs db2dir = E:\codebase\product\pos\stdpos\main\subsystems
[sql] Failed to execute: CREATE DATABASE posa

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=

Total time: 2 seconds

Any help in this regard is appreciated.
Jul 18 '07 #1
  • viewed: 3192

Post your reply

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

Similar topics

8 posts views Thread by situ | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.