Uploaded image for project: 'DdlUtils'
  1. DdlUtils
  2. DDLUTILS-229

writedatatofile Ant task not using the database model and retrieves all db objects ignoring the schema pattern

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.1
    • Ant Tasks
    • None
    • Windows/Linux

    Description

      The database model <database> specified with schema pattern <databaseToDdl> is never used in <writedatatofile> Ant task code.
      Instead, the whole database is read again ignoring the vital parameters like schemapattern as below. (WriteDataToFileCommand.java - Line 88)

      getDataIO().writeDataToXML(getPlatform(),
      new FileOutputStream(_outputFile), _encoding);

      This creates many problems in Oracle db by retrieving all user objects.

      Suggested Fix: The database model should be passed invoking the right method as shown below
      ~~~~~~~~~~~~
      public void execute(DatabaseTaskBase task, Database model) throws BuildException
      {
      try

      { //getDataIO().setDetermineSchema(_determineSchema); //getDataIO().setSchemaPattern(task.getPlatformConfiguration().getSchemaPattern()); getDataIO().writeDataToXML(getPlatform(), model, new FileOutputStream(_outputFile), _encoding); _log.info("Written data XML to file" + _outputFile.getAbsolutePath()); }

      catch (Exception ex)

      { handleException(ex, ex.getMessage()); }

      }

      Attachments

        Activity

          People

            tomdz Thomas Dudziak
            g_madhu_krishna@yahoo.co.in Madhu Krishna
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: