db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pablo-adrian.gonza...@nxbp.fr
Subject Using DDLUtils with Oracle BFile Type
Date Thu, 28 Sep 2006 15:14:44 GMT
Hello,

I have a problem exporting a database schema with a column of BFILE type.

The Oracle BFILE type is not supported by DDL Utils.

so, I have a couple of questions :
1. Is there a way to specify to the ant task databaseToDdl to ignore some
tables (in order to export all tables minus the one with BFILE type ?).
I looked at JdbcModelReader class, method setDefaultTablePattern there's a
way to specify a pattern table but no way to access it from an ANT Script.
2. Is there a way to handle Oracle BFILE types with DDLUtils ?

Here's the error :
Could not read the schema from the specified database: Unknown JDBC type
code -13
This exception is thrown from the method setTypeCode of class
org.apache.ddlutils.model.Column

Thank you for your help.

Here is the ant script I use :

<?xml version="1.0"?>
<project name="CopyDb" basedir="." default="copy">

  <!-- These properties can be overriden on the commandline using -D -->
  <property name="schemafiles" value="testmodel.xml"/>
  <property name="datafile" value="testmodel.sql"/>

      <!--
      CLASSPATH des drivers Jdbc et ddlutils
       -->
   <path id="classpath">
    </path>

   <target name="export-source-db" description="Dumps db structure and
data">
      <taskdef name="databaseToDdl"
              classname="org.apache.ddlutils.task.DatabaseToDdlTask">
         <classpath refid="classpath"/>
    </taskdef>

      <databaseToDdl modelName="EDES" schema="EDES" databaseType="oracle9">
             <database url="jdbc:oracle:thin:@myserver:1521:MYINSTANCE"
                 driverClassName="oracle.jdbc.OracleDriver"
                 username="user"
                 password="pass"/>
         <writeSchemaToFile outputFile="${schemafiles}"/>
          <writeDataToFile outputFile="${datafile}"/>
      </databaseToDdl>

   </target>

   <target name="copy">
            <antcall target="export-source-db">
        </antcall>
   </target>

</project>


Ensemble, faisons un geste pour l'environnement : n'imprimons nos mails que si nécessaire.

L'integrite de ce message n'etant pas assuree sur internet, Natexis
Banques Populaires ne peut etre tenu responsable de
son contenu. Toute utilisation ou diffusion non autorisee est
interdite. Si vous n'etes pas destinataire de ce message, merci de le
detruire et d'avertir l'expediteur.


Let us mind the environment : let's print our mails only when necessary

The integrity of this message cannot be guaranteed
on the Internet. Natexis Banques Populaires can not therefore be
considered responsible for the contents.Any unauthorized use or dissemination is prohibited.
If you are not the intended recipient of this message, then please delete it and
notify the sender.


Mime
View raw message