Plugins

Table of Contents

Overview

Executing a Plugin

Logging Information for Plugins

Configure Plugins



Overview (back to top)

opendbcopy provides a set of standard plugins.

Runtime parameters are loaded from a central plugins.xml file, containing a plugin entry for each plugin with individual parameters. New plugins can easily be developed (see developer manual ).

The following plugins are distributed with opendbcopy:

  • Online Migration of databases (only logging records which cannot be processed)

  • Write dump files such as csv, tab delimited, ...

  • Write SQL data scripts

  • Comparing number of records for each database and write a nice report



Executing a Plugin (back to top)

To execute a plugin use opendbcopy's 'Execute' Tab or launch opendbcopy directly from a shell (see User Manual for details).

At the top select a plugin. Only plugins providing the current database mode are shown.

Click on 'Execute' to execute the plugin or 'Cancel' to cancel an already running plugin.



Logging Information for Plugins (back to top)

Every time when launching opendbcopy and executing a plugin a new log file, called opendbcopy_execution_log_file.log, is created. It only contains information or errors of plugins themselves. When relaunching opendbcopy, the old execution log file is overwritten.

To change this behaviour use another Log4j Appender.

To show less log information change the following line in log4j.properties file (conf directory)

# logs execution

log4j.logger.opendbcopy.plugin =INFO, STDOUT, EXECFILE

into something like

# logs execution

log4j.logger.opendbcopy.plugin =WARN, STDOUT, EXECFILE

If you like to receive email notifications regarding the status of a plugin's execution, add the email appender to above line, see the user manual for details.



Configure Plugins (back to top)

To modify or append new plugins modify the plugins.xml file in the plugins directory of opendbcopy.

There is a plugin element for each available plugin in plugins.xml.

To change a plugin's behaviour modify appropriate line(s). See comments within plugins.xml for available options.

To add a new plugin ensure that the following elements are available:

Element / Attribute Name

Description

Required

plugin

The central element for a plugin

Yes

db_mode

'single', 'dual' or 'bo th' can be specified

Yes

class

Complete Class Name to plugin

Yes

description

Description of plugin

Yes

author

Author's name

No

conf

Parent element for sub-elements

No, not for all plugins

Here an example

< plugin db_mode="dual" >

< class name="opendbcopy.plugin.standard.copy.CopyMapping" / >

< description value="Copy Tables according to defined Mapping" / >

< author name="Anthony Smith" / >

< conf >

< !-- path may be relative or absolute -- >

< path value="log/" / >

< file_type value="csv" / >

< !-- for a tab delimiter enter \n as value -- >

< delimiter value=";" / >

< log_error value="true" / >

< /conf >

< /plugin >