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=""/>
<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: [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
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.