db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hacking Bear" <hackingb...@gmail.com>
Subject No output from writeSchemaSqlTofile command
Date Sat, 24 May 2008 23:55:05 GMT
Hi,

I'm new to dbUtils and i cannot find answers to my question. Please help me.

I want to export my schema to SQL DDL from SQL Server but the output sql
file is empty (even though the XML schema file has valid data.) Apparently,
my task, connection, etc. works. Only the generated SQL file is empty. any
idea?

Thanks!


My Ant task is

    <target name="db-dump" description="Dumps the database structure">
      <taskdef name="databaseToDdl"
               classname="org.apache.ddlutils.task.DatabaseToDdlTask">
        <classpath refid="runtime-classpath"/>
      </taskdef>
      <databaseToDdl modelName="ss" schemapattern="dbo" verbosity="debug"
        databaseType="mssql">
        <database url="jdbc:sqlserver://localhost:1433;DatabaseName=avop"

driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
                  username="sa"
                  password="sa"/>
        <writeSchemaToFile outputFile="ss-schema.xml"/>
        <writeSchemaSqlToFile outputFile="ss.sql"/>
      </databaseToDdl>
    </target>

running from cygwin bash:

$ ant -lib dist -lib lib ; ls -l *.xml *.sql
Buildfile: build.xml

db-dump:
[databaseToDdl] May 24, 2008 4:50:56 PM
com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
[databaseToDdl] WARNING: Failed to load the sqljdbc_auth.dll
[databaseToDdl] Borrowed connection
org.apache.commons.dbcp.PoolableConnection@54a328 from data source
[databaseToDdl] Returning connection
org.apache.commons.dbcp.PoolableConnection@54a328 to data source.
[databaseToDdl] Remaining connections: None
[databaseToDdl] Written schema to d:\dbutils\ss-schema.xml
[databaseToDdl] Borrowed connection
org.apache.commons.dbcp.PoolableConnection@54a328 from data source
[databaseToDdl] Returning connection
org.apache.commons.dbcp.PoolableConnection@54a328 to data source.
[databaseToDdl] Remaining connections: None
[databaseToDdl] Written schema SQL to d:\dbutils\ss.sql

BUILD SUCCESSFUL
Total time: 7 seconds
---------- 1 me    mkpasswd 49959 May 24 16:51 ss-schema.xml
---------- 1 me    mkpasswd     0 May 24 16:51 ss.sql

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message