db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurent ROCHE <laurent_ro...@yahoo.com>
Subject Export data from alternate schema [Was: Re : schema mix up !]
Date Tue, 18 Sep 2007 09:56:49 GMT

I am still not managing to export data from tables on a schema other than public.
To avoid conflicts I have renamed the tables in xfrt_synch schema so now the writeDataToFile
task does not fail anymore ... but it does not export the tables from xfrt_synch schema it
exports tables from schema public.

The writeSchemaToFile though works well and export the tables definition from xfrt_synch schema.

Did anyone manage to make the writeDataToFile task to work with schemas ?

The Computing Froggy

----- Message d'origine ----
De : Laurent ROCHE <laurent_roche@yahoo.com>
À : ddlutils-user@db.apache.org
Cc : tomdzk@gmail.com
Envoyé le : Lundi, 17 Septembre 2007, 18h49mn 32s
Objet : Re: schema mix up !


I have tryed to get this working (exporting data using schemas) with no joy.

Here is the extract of biuld.xml defining the ant task
<target name="export-xfrt-data" description="Dumps db structure and data">
      <taskdef name="databaseToDdl"
         <classpath refid="classpath"/>

      <databaseToDdl modelName="fims_testsmall_land" sortforeignkeys="false"  verbosity="DEBUG"
         <database url="jdbc:postgresql://my_server/my_db"

         <writeSchemaToFile outputFile="schema_xfrt.xml" />
         <writeDataToFile outputFile="data_xfrt.xml" determineschema="true"/>

I get the following messages:
>ant export-xfrt-data
Buildfile: build.xml

[databaseToDdl] Borrowed connection org.apache.commons.dbcp.PoolableConnection@a761fe from
data source
[databaseToDdl] Returning connection org.apache.commons.dbcp.PoolableConnection@a761fe to
data source.
[databaseToDdl] Remaining connections: None

C:\apps\Ddlutils-test\build.xml:130: Could not read the schema from the specified database:
There are multiple column wi
th the name role_id in the table app_roles

Total time: 7 seconds

I must do something wrong ... but I can not find out what ? ! ?
I have 2 schemas on my database (containing tables with identical names): xfrt_synch and public

PS: I am following up an old thread !

----- Message d'origine ----
De : Thomas Dudziak <tomdzk@gmail.com>
� : ddlutils-user@db.apache.org
Envoy� le : Mardi, 2 Janvier 2007, 4h24mn 00s
Objet : Re: schema mix up !

On 12/26/06, Laurent ROCHE <laurent_roche@yahoo.com> wrote:

> There is a little problem when doing an export of a PostgreSQL database where there is
two schema (say public and queries).
> The generation of schema.xml is OK.
> But when generating data.xml DDL Utils will fail as it will try to read the content of
tab1 in QUERIES with the SQL:
> select * from tab1
> instead of
> select * from queries.tab1

Please update DdlUtils and use both the schemapattern parameter
and also set the new determineschema parameter to true

Have fun,
The Computing Froggy

Stockage illimité de vos mails avec Yahoo! Mail. Changez aujourd'hui de mail !

Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message