You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by "Madhu Krishna (JIRA)" <ji...@apache.org> on 2008/10/30 16:35:44 UTC

[jira] Created: (DDLUTILS-229) writedatatofile Ant task not using the database model and retrieves all db objects ignoring the schema pattern

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

                 Key: DDLUTILS-229
                 URL: https://issues.apache.org/jira/browse/DDLUTILS-229
             Project: DdlUtils
          Issue Type: Bug
          Components: Ant Tasks
    Affects Versions: 1.0
         Environment: Windows/Linux
            Reporter: Madhu Krishna
            Assignee: Thomas Dudziak



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());
        }
    }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DDLUTILS-229) writedatatofile Ant task not using the database model and retrieves all db objects ignoring the schema pattern

Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DDLUTILS-229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Dudziak updated DDLUTILS-229:
------------------------------------

    Fix Version/s: 1.1

> writedatatofile Ant task not using the database model and retrieves all db objects ignoring the schema pattern
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: DDLUTILS-229
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-229
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Ant Tasks
>    Affects Versions: 1.0
>         Environment: Windows/Linux
>            Reporter: Madhu Krishna
>            Assignee: Thomas Dudziak
>             Fix For: 1.1
>
>
> 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());
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DDLUTILS-229) writedatatofile Ant task not using the database model and retrieves all db objects ignoring the schema pattern

Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DDLUTILS-229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Dudziak resolved DDLUTILS-229.
-------------------------------------

    Resolution: Fixed

> writedatatofile Ant task not using the database model and retrieves all db objects ignoring the schema pattern
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: DDLUTILS-229
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-229
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Ant Tasks
>    Affects Versions: 1.0
>         Environment: Windows/Linux
>            Reporter: Madhu Krishna
>            Assignee: Thomas Dudziak
>             Fix For: 1.1
>
>
> 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());
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.