Derby DBMS Notes |
|
ODBC Driver
IBM DB2 ODBC Driver 9.01.00.356
- No rows for SQLTables SQL_ALL_SCHEMAS or SQL_ALL_TABLE_TYPES so a default Tables
comparison is not added by CompareData to a new DBMS comparison but rather must
be added by user
SetUp
You can use IBM DB2 ODBC driver to connect to Derby
using DB2 runtime client. In the following example Derby is installed to c:\db-derby-10.5.3.0
- Database folder must be nested under Derby network server folder. Example
c:\db-derby-10.5.3.0\bin\MyDbTest
- Database
name must be 8 or less characters in order to bind Derby database to DB2
runtime client database alias.
- Derby must be running as a network server. Follow instructions in
Derby Tutorial on how to set up
Derby Network Server
bin>setNetworkServerCP
bin>startNetworkServer
2010-03-06 16:54:22.625 GMT : Security manager installed using the Basic server
security policy.
2010-03-06 16:54:25.328 GMT : Apache Derby Network Server - 10.5.3.0
- (802917)
started and ready to accept connections on port 1527
- Verify that you can connect to Derby network server database using ij
bin>set DERBY_INSTALL=C:\db-derby-10.5.3.0
bin>set CLASSPATH=%DERBY_INSTALL%\lib\derbyclient.jar;%DERBY_INSTALL%\lib\derbytools.jar;.
bin>ij
ij version 10.5
ij> connect 'jdbc:derby://localhost:1527/MyDbTest;create=true';
ij> disconnect;
-
Install DB2 runtime client, if not already installed, and follow
instructions on how to catalog a Derby network server and database using DB2
catalog
command.
Example:
db2 => catalog tcpip node cns remote localhost server 1527
DB20000I The CATALOG TCPIP NODE command completed successfully.
DB21056W Directory
changes may not be effective until the directory cache is refreshed.
db2 => catalog db mydbtest at node cns authentication server
DB20000I The CATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is refreshed.
Use DB2 uncatalog
command, if necessary, to uncatalog a Derby network server or
database. Example:
db2 => uncatalog database mydbtest
DB20000I The UNCATALOG DATABASE command completed successfully.
DB21056W Directory
changes may not be effective until the directory cache is refreshed.
db2 => uncatalog node cns
DB20000I The UNCATALOG NODE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is refreshed.
db2 =>
- Use Windows ODBC Administrator to set up an ODBC data source using IBM DB2 ODBC
DRIVER
See Also
DBMS Notes