Note for myself:
build.xml extract which ensures we only query data from a specific schema in this case HR schema. DDLUtils has issues with Oracle unless you clearly specify which schema to use.
<target name="writeDDLToXML" description="Dumps the database structure">
<taskdef name="databaseToDdl"
classname="org.apache.ddlutils.task.DatabaseToDdlTask">
<classpath refid="runtime-classpath"/>
</taskdef>
<databaseToDdl verbosity="debug" schemapattern="HR">
<database url="jdbc:oracle:thin:@172.16.101.70:1521/linux11gr2"
driverClassName="oracle.jdbc.OracleDriver"
username="hr"
password="hr" />
<writeSchemaToFile outputFile="db-schema1.xml" failonerror="false" />
<!-- Comment line below if the source DB is too big -->
<writeDataToFile outputFile="data.xml" determineschema="false"/>
</databaseToDdl>
</target>
No comments:
Post a Comment