Languages

Frequently Asked Questions

print-friendly version
print-friendly
PDF

Questions

Answers

1. General Questions

1.1. Which SQL Types are supported?

Generally all which are supported by the JDBC specification. However we encountered problems with certain SQL Data Types in combination with certain drivers. This matrix might give you a rough overview whether your special copy needs are ought to work.

Note
Even if your combination is shown as FAILED don't hesitate to give it a try. Especially if the test allready failed during the setup phase.

How to read this result matrix?

Column Name Description
Source -> Target Shows the direction of the copy process in the way: FROM_DB_TYPE -> TO_DB_TYPE
Teststep Test which is executed. All test are single SQL Type test without copying PK, FK constraints and without defining any mapping rules. Only the PK_FK_TEST uses a VARCHAR column including PK,FK and mapping features.
Testresult Shows the final result of this test.
S [Setup]: If a [X] is shown the setup of this test, including the creation of the source table(s) was successfull.
C [Copy]: If a [X] is shown the call of the copy subroutine of DBCopy was successfull.
CC [Copy Count]: If a [X] is shown the item count of both tables is equal.
CD [Copy Data]: If a [X] is shown the values of the item copied are equal.
FK [Foreign Keys]: If a [X] is shown the foreign key constraints were successfull copied. NOT IMPLEMENTED YET!
PK [Primary Keys]: If a [X] is shown the primary key were successfull copied. NOT IMPLEMENTED YET!
T [Tear Down]: If a [X] is shown tear down method of the test including dropping the tables was successfull.

For a more detailed description how the unittests are setup and how the tests are done have a look at the Unittest Spezification in CVS which is provided as an XML file. Hope you can get your answers out of this ...

Source -> Target Teststep Testresult S C CC CD FK PK T
MYSQL_TEST -> MYSQL_TEST [SMALLINT_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> MYSQL_TEST [INTEGER_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> MYSQL_TEST [FLOAT_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> MYSQL_TEST [REAL_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> MYSQL_TEST [DOUBLE_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> MYSQL_TEST [NUMERIC_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> MYSQL_TEST [DECIMAL_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> MYSQL_TEST [CHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> MYSQL_TEST [VARCHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> MYSQL_TEST [DATE_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> MYSQL_TEST [TIME_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> MYSQL_TEST [TIMESTAMP_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> MYSQL_TEST [BLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
MYSQL_TEST -> MYSQL_TEST [CLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
MYSQL_TEST -> MYSQL_TEST [FK_PK_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> QED_TEST [SMALLINT_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> QED_TEST [INTEGER_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> QED_TEST [FLOAT_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> QED_TEST [REAL_TEST ] FAILED [ ][ ][ ][ ][ ][ ][ ]
MYSQL_TEST -> QED_TEST [DOUBLE_TEST ] FAILED [ ][ ][ ][ ][ ][ ][ ]
MYSQL_TEST -> QED_TEST [NUMERIC_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> QED_TEST [DECIMAL_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> QED_TEST [CHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> QED_TEST [VARCHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> QED_TEST [DATE_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> QED_TEST [TIME_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> QED_TEST [TIMESTAMP_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> QED_TEST [BLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
MYSQL_TEST -> QED_TEST [CLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
MYSQL_TEST -> QED_TEST [FK_PK_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> DB2_TEST [SMALLINT_TEST ] FAILED [X][X][X][ ][ ][ ][X]
MYSQL_TEST -> DB2_TEST [INTEGER_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> DB2_TEST [FLOAT_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> DB2_TEST [REAL_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> DB2_TEST [DOUBLE_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> DB2_TEST [NUMERIC_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> DB2_TEST [DECIMAL_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> DB2_TEST [CHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> DB2_TEST [VARCHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> DB2_TEST [DATE_TEST ] FAILED [X][X][X][ ][ ][ ][X]
MYSQL_TEST -> DB2_TEST [TIME_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> DB2_TEST [TIMESTAMP_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
MYSQL_TEST -> DB2_TEST [BLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
MYSQL_TEST -> DB2_TEST [CLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
MYSQL_TEST -> DB2_TEST [FK_PK_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> MYSQL_TEST [SMALLINT_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> MYSQL_TEST [INTEGER_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> MYSQL_TEST [FLOAT_TEST ] FAILED [X][X][X][ ][ ][ ][X]
QED_TEST -> MYSQL_TEST [REAL_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> MYSQL_TEST [DOUBLE_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
QED_TEST -> MYSQL_TEST [NUMERIC_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> MYSQL_TEST [DECIMAL_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> MYSQL_TEST [CHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> MYSQL_TEST [VARCHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> MYSQL_TEST [DATE_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
QED_TEST -> MYSQL_TEST [TIME_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
QED_TEST -> MYSQL_TEST [TIMESTAMP_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
QED_TEST -> MYSQL_TEST [BLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
QED_TEST -> MYSQL_TEST [CLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][ ]
QED_TEST -> MYSQL_TEST [FK_PK_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> QED_TEST [SMALLINT_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> QED_TEST [INTEGER_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> QED_TEST [FLOAT_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> QED_TEST [REAL_TEST ] FAILED [X][X][X][ ][ ][ ][X]
QED_TEST -> QED_TEST [DOUBLE_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
QED_TEST -> QED_TEST [NUMERIC_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> QED_TEST [DECIMAL_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> QED_TEST [CHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> QED_TEST [VARCHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> QED_TEST [DATE_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
QED_TEST -> QED_TEST [TIME_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
QED_TEST -> QED_TEST [TIMESTAMP_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
QED_TEST -> QED_TEST [BLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
QED_TEST -> QED_TEST [CLOB_TEST ] FAILED [X][X][ ][ ][ ][ ][X]
QED_TEST -> QED_TEST [FK_PK_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> DB2_TEST [SMALLINT_TEST ] FAILED [X][X][X][ ][ ][ ][X]
QED_TEST -> DB2_TEST [INTEGER_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> DB2_TEST [FLOAT_TEST ] FAILED [X][X][X][ ][ ][ ][X]
QED_TEST -> DB2_TEST [REAL_TEST ] FAILED [X][X][X][ ][ ][ ][X]
QED_TEST -> DB2_TEST [DOUBLE_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
QED_TEST -> DB2_TEST [NUMERIC_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> DB2_TEST [DECIMAL_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> DB2_TEST [CHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> DB2_TEST [VARCHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
QED_TEST -> DB2_TEST [DATE_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
QED_TEST -> DB2_TEST [TIME_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
QED_TEST -> DB2_TEST [TIMESTAMP_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
QED_TEST -> DB2_TEST [BLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
QED_TEST -> DB2_TEST [CLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][ ]
QED_TEST -> DB2_TEST [FK_PK_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> MYSQL_TEST [SMALLINT_TEST ] FAILED [X][X][X][ ][ ][ ][X]
DB2_TEST -> MYSQL_TEST [INTEGER_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> MYSQL_TEST [FLOAT_TEST ] FAILED [X][X][X][ ][ ][ ][X]
DB2_TEST -> MYSQL_TEST [REAL_TEST ] FAILED [X][X][X][ ][ ][ ][X]
DB2_TEST -> MYSQL_TEST [DOUBLE_TEST ] FAILED [X][X][X][ ][ ][ ][X]
DB2_TEST -> MYSQL_TEST [NUMERIC_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> MYSQL_TEST [DECIMAL_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> MYSQL_TEST [CHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> MYSQL_TEST [VARCHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> MYSQL_TEST [DATE_TEST ] FAILED [X][X][X][ ][ ][ ][X]
DB2_TEST -> MYSQL_TEST [TIME_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
DB2_TEST -> MYSQL_TEST [TIMESTAMP_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
DB2_TEST -> MYSQL_TEST [BLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
DB2_TEST -> MYSQL_TEST [CLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][ ]
DB2_TEST -> MYSQL_TEST [FK_PK_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> QED_TEST [SMALLINT_TEST ] FAILED [X][X][X][ ][ ][ ][X]
DB2_TEST -> QED_TEST [INTEGER_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> QED_TEST [FLOAT_TEST ] FAILED [X][X][X][ ][ ][ ][X]
DB2_TEST -> QED_TEST [REAL_TEST ] FAILED [X][X][X][ ][ ][ ][X]
DB2_TEST -> QED_TEST [DOUBLE_TEST ] FAILED [X][X][X][ ][ ][ ][X]
DB2_TEST -> QED_TEST [NUMERIC_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> QED_TEST [DECIMAL_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> QED_TEST [CHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> QED_TEST [VARCHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> QED_TEST [DATE_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> QED_TEST [TIME_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
DB2_TEST -> QED_TEST [TIMESTAMP_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
DB2_TEST -> QED_TEST [BLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
DB2_TEST -> QED_TEST [CLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][ ]
DB2_TEST -> QED_TEST [FK_PK_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> DB2_TEST [SMALLINT_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> DB2_TEST [INTEGER_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> DB2_TEST [FLOAT_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> DB2_TEST [REAL_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> DB2_TEST [DOUBLE_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> DB2_TEST [NUMERIC_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> DB2_TEST [DECIMAL_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> DB2_TEST [CHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> DB2_TEST [VARCHAR_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> DB2_TEST [DATE_TEST ] SUCCESS [X][X][X][X][ ][ ][X]
DB2_TEST -> DB2_TEST [TIME_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
DB2_TEST -> DB2_TEST [TIMESTAMP_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
DB2_TEST -> DB2_TEST [BLOB_TEST ] FAILED [ ][ ][ ][ ][ ][ ][X]
DB2_TEST -> DB2_TEST [CLOB_TEST ] FAILED [X][X][ ][ ][ ][ ][X]
DB2_TEST -> DB2_TEST [FK_PK_TEST ] SUCCESS [X][X][X][X][ ][ ][X]

1.2. Which Databases are supported?

Generally all which are supported by the JDBC specification. However we encountered problems with certain SQL Data Types in combination with certain drivers. Here is a list of databases we have tested so far (work is in progress).

Note
This list needs to be updated.
Database Vendor Version JDBC Driver Version Comments
DB2 / NT IBM V 7.01 V 7.01
MySQL / Win MySQL AB V 4.0.4 beta V 3.0.8
QED (Quadcap Embeddable Database) Quadcap Software V 3.1 V 3.1

Other tests are on the way.

^

2. Errors / Common Problems

2.1. I get an java.lang.ClassNotFoundException:COM.ibm.db2.jdbc.app.DB2Driver (or simular), whats wrong?

Usally in 98% of this cases such a stack trace might be caused by an inproper path or file name of your JDBC driver. Be sure that the entries are correct.

Sometimes there might be difficulties with the dynamic class loading right after the setup of a DB location; just try to restart eclipse.

Problems with accesing the driver on an firewall (due to the use of URLClassLoader) has been reported as well. The "easiest" way to solve such problems is to configure the plugin direct with your JDBC libraries needed.

  • 1) Put you JDBC driver in the /lib directory of the plugin itself $ECLIPSE_HOME/plugins/DBCopy_Vx.x.x/lib
  • 2) Adjust the plugin.xml in the DBCopy home directory by adding an entry for your desired JDBC driver in a way like: <runtime> <library name="lib/db2java.zip"/> ... <library name="lib/log4j-1.2.6.jar"/> <library name="dbcopy.jar"/> </runtime>

If the problems consist further, just place a support request on the plugin home page.

2.2. I can't get the plugin to work with QED, what's wrong?

QED Version 3.1 needs a JVM 1.4 to run and the antlr.jar file needs to be in the classpath or in the JDBC driver setup as well

Try following:

  • 1) let eclipse run with a java 1.4 vm (for qed 3.1)
  • 2 [possibility 1]) put antlr.jar and qed.jar in one jar and setup the jdbc driver for this new combined jar file OR
  • 2 [possibility 2]) setup antlr.jar and qed.jar as 2 JDBC driver and make sure that antlr.jar is in front of qed.jar

(1)
In order to let it run out of the same vm as Eclipse you need to start eclipse with j2sdk 1.4.x because QED version 3.1 needs version 1.4 to run correctly. Older QED versions may work with vm 1.3 ar older as well.
%JAVA_HOME%\bin\java -cp startup.jar org.eclipse.core.launcher.Main
... whereby JAVA_HOME needs to be a vm 1.4 directoryn and the command is issued in the eclipse home dir.

Connection Settings =================== DRIVER=com.quadcap.jdbc.JdbcDriver URL=jdbc:qed:qeddb;create=true USERID=test PWD=test DATABASE=qeddb MAX_COL_SIZE=255

2.3. I get an error like "Can't find table xyz" or no tables are retrieved but there are defineatly someone in the database.

Usally this is a problem (if the connection setup is OK), of an inproper [DB Name/Table Schema] name and/or the UID/PWD combination you are using.

The table_schema is that what you have to put in front of a table in your SQL statement (sorry DB admins for this "easy" adaption of a quite complex theme ;-)) If you dont specify one, sometimes your userid or a standard schema defined by the DB itself get used for this.

Try to get closer to the problem by trying this:

Keep in mind, that the provided JDBC URL may contain a database or process entry which might have an influence on your tables you see with the used ID/PWD combination.
You should try to get closer to the problem by using the SQL Editor provided by the dbcopy plugin to invoke manually an SQL command with your configured DB Location.
Try to do the same as you want to do with your copy process. Saying you got an USER table and want to copy this data to another database.
1st you have to do something like "select * from $DATABASENAME.USER". Try this with the editor and see if the statement fails. Try it without $DATABASE name. Vary your coniguration setting UID/PWD/URL to get the result is in a way you would expect this. And then use the copy wizard.
This might not be an problem related to DBCOPY but to the JDBC driver (and/or) setup. If you cant get the desired SQL statements to work out of the SQL Editor AND the same SQL stamenent works in an separate $DB - JDBC application, then it is definiatly a problem of dbcopy.

2.4. I don't get any columns or to many columns shown in the mapping dialog.

Some DB are case-sensitive some aren't. E.G. DB/2 just uses UPPER CASES for all DB related actions. Be sure that your [DB Name/Table Schema] property is specified in a way your DB expect it.

If you get more columns than you would expect (usally the same columns more than once) then you have usally the same table in more Catalog/Table Schema definitions of your database and your setup didn't possibly specify a [DB Name/Table Schema] entry. Each DB Location setup should be done in a way, that exactly one [Catalog/Table Schema] combination is defined.

^
^