Hi,
i have a problem exporting the database structure of ONE schema (called ags)
from a db2 database (v8) via ant.
The database contains different schemata. If I set the schemapattern parameter
to "ags" the result is an empty .xml oder *.sql file.
if i don´t set the parameter, the task tries to receive data form all tables of
all schemas, but
appends the username "extranet" instead of the right schema prefix. which leads
to an error as this schema doesnt exist and the tables
are realy in other schemas.
C:\sources\ags_extranet\build.xml:299: Could not read the schema from the
specified database: COM.ibm.db2.jdbc.DB2Exception:
[IBM][CLI Driver][DB2/NT] SQL0204N "EXTRANET.ACT_DYN_DATE_CURVE" ist ein nicht
definierter Name. SQLSTATE=42704
("ist ein nicht definierter Name" german for non-defined name)
if anybody has an idea, i would be very thankfull!
wbr
jens ihrig
<target name="dump-database" description="Dumps the database structure">
<echo message="Dump the database structure"/>
<tstamp>
<format property="fileNamePrefix"
pattern="yyyy-MM-dd_HH-mm-ss_" />
</tstamp>
<echo message="using java libraries from: ${java.lib.path}"/>
<path id="runtime-classpath">
<fileset dir="${java.lib.path}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</path>
<taskdef classname="org.apache.ddlutils.task.DatabaseToDdlTask"
name="databaseToDdl"
classpathref="runtime-classpath"
/>
<databaseToDdl
verbosity="DEBUG"
modelname="ags"
tabletypes="TABLE"
schemapattern="ags"
>
<database url="jdbc:db2:ags_ex"
driverClassName="COM.ibm.db2.jdbc.app.DB2Driver"
username="extranet"
password="********"
/>
<writeSchemaToFile
outputFile="${database-dump.path}${fileNamePrefix}db_schema.xml"/>
<writeSchemaSqlToFile
outputFile="${database-dump.path}${fileNamePrefix}db_schema.sql"/>
</databaseToDdl>
</target>
Jens Ihrig
Key-Work Consulting GmbH | Kriegsstr. 100 | 76133 Karlsruhe | Germany |
www.key-work.de
Fon: +49-721-78203-15 | E-Mail: [EMAIL PROTECTED] | Fax: +49-721-78203-10
Key-Work Consulting GmbH Karlsruhe, HRB 108695, HRG Mannheim
Geschäftsführer: Andreas Stappert, Tobin Wotring