Skip to end of metadata
Go to start of metadata

stub

Overview

DatabaseClone is meant to take the provided database and move its entire (or a selected subsection of tables) contents to a new database. This tool was written to allow us to run successive runs against a dataset without burdening production database servers with repeated or complex queries.

Usage

The tool is meant to clone select tables/views rather than the entire database. In fact, it is the intended use, not the special case, since most databases that the harvester would be harvesting from most likely have many tables that are unrelated to the desired information.

How to limit what tables/views to pull from – in your databaseclone.config.xml file;

<!--
<% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %>
<% %>
<% <Param name="tableName"> This parameter is one the name of the tables that is being harvested from. %>
<% %>
<% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %>
-->
<Param name="tableName">desiredTableName1Here</Param>
<Param name="tableName">desiredTableName2Here</Param>
<Param name="tableName">desiredTableName3Here</Param>

By default, DatabaseClone only pulls from Tables, so to allow additional types (like Views), you need to add the following:

<!--
<% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %>
<% %>
<% <Param name="validTableType"> This parameter is used to determine which types of tables are to be harvester from %>
<% Possible values (If the parameter is not present it uses the default value): %>
<% TABLE - If set to this then the DatabaseClone is expecting a table {DEFAULT} %>
<% VIEW - this setting expects a view generated from the database. %>
<% %>
<% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %>
-->
<Param name="validTableType">TABLE</Param>
<Param name="validTableType">VIEW</Param>

Note: If you specify any validTableType Param values, the specified types will be the only allowed types. In other words, if you specify VIEW as a type, but not TABLE, then you can’t clone Tables.

Another Note: DatabaseClone treats Views just like Tables… it grabs the rows and adds them to the destination… it does not copy the ‘view’ functionality or recreate the view using the same SQL query… it just copies the records.

By limiting what you are cloning, you can selectively grab the desired data and ignore the rest, hopefully speeding up your clone and improving the performance of the JDBCFetch as well!