Question & Answer
Question
Cause
Answer
To configure a federation to access Netezza data source through JDBC wrapper, you must provide the federation with information about the data sources and objects that you want to access. Then create server, user mapping and nickname for the table in remote Netezza server.
Before you begin
Download the driver nzjdbc3.jar from Netezza vendor and put in a folder that could be accessed, for example, path $/INSTANCE_HOME/test_netezza
1. Enable Federation server and restart Db2.
# db2 update dbm cfg using federated YES
# db2stop force
# db2start
2. Test the connection to the Netezza and verify the service is started correctly.
telnet <netezza_ip> <port>
If the connection is successful, you receive the following similar output from the command.
$ telnet earlobe1.fyre.ibm.com 5480
Trying 9.30.219.171...
Connected to earlobe1.fyre.ibm.com.
Escape character is '^]'.
3. Create wrapper, server, user mapping, nickname, and query the nickname.
# CONNECT TO TESTDB
# CREATE SERVER jdbc_netezza TYPE JDBC OPTIONS (DRIVER_CLASS 'org.netezza.Driver', DRIVER_PACKAGE '/home/haijs/buckets/fedjdbc/data/nzjdbc3.jar', URL 'jdbc:netezza://earlobe1.fyre.ibm.com:5480/testdb')
# CREATE USER MAPPING FOR PUBLIC SERVER jdbc_netezza OPTIONS (REMOTE_AUTHID 'AD',REMOTE_PASSWORD 'test_pass')
# CREATE NICKNAME nk_jdbc_netezza for jdbc_netezza.test_timestamp
# select * from nk1
----------- -------------------------- -------- ----------
1 1999-12-31-23.59.59.123457 23:59:59 12/31/1999
2 1999-12-31-23.59.59.123456 23:59:59 12/31/1999
Was this topic helpful?
Document Information
Modified date:
06 April 2021
UID
ibm16431131