DB2 database in Oracle SQL developer - database

I've heard it's possible to connect to a mainframe DB2 database with a client like Oracle SQL developer. I've looked on-line and can't seem to find the connector files needed to do this in SQL developer. Can anyone direct me to a link to make this work? Or tell me if im just looking for the wrong thing to begin with. I've got the connector working with MySQL databases in Oracle, so I assumed it would be similar for a DB2 database.

To enable DB2 in SQL Developer, you need to pull out the db2jcc.jar
Go to "Oracle SQL Developer" - "Tools" - "Preferences" - > Third Party JDBC Driver
My ORACLE SQL Developer Version is 4.1.1.19 (it mostly works for many versions)
After adding that jar to third party JDBC Drivers. Click on "New Connection".
You should be able to find DB2 Option.

The easiest way to connect to Db2 is through their JDBC Type 4 JCC driver. This driver uses two JARs:
db2jcc4.jar, which is the JDBC 4 driver (The db2jcc.jar JDBC 3 driver has been deprecated.)
db2jcc_license_cisuz.jar, which permits the driver to connect to all Db2 server platforms, including z/OS
Your mainframe DBA should be able to provide you with both of these JARs, and assist you in building a connect string with the proper JDBC driver options.
More information about JDBC drivers for Db2 can be found here: https://www.ibm.com/support/pages/db2-jdbc-driver-versions-and-downloads

SQL Developer supports the following JDBC drivers.
IBM DB2: You need the binary driver jar files db2jcc.jar and db2jcc_license_cu.jar. Search for DB2 Universal JDBC Drivers. https://www.ibm.com/support/pages/location-db2jcclicensecisuzjar-file
Microsoft Access:No additional driver is required. Access uses the JDBC/ODBC bridge
Microsoft SQL Server and Sybase: jTDS driver version 1.2. Download here. The binary driver is located within the jtds-1.2-dist.zip. This jar file is called jtds-1.2.jar.
MySQL: MySQL JDBC Driver, version 5.04. Download here. The binary driver is located within the mysql-connector-java-5.0.4.tar.gz (or .zip). The jar file is called mysql-connector-java-5.0.4-bin.jar.
Teradata: Use Teradata JDBC Driver 12.0 or above. Both the Teradata JDBC Driver 12.0 and 13.0 use the jar files terajdbc4.jar and tdgssconfig.jar. https://www.teradata.com/downloadcenter/

Related

Why does AWS Schema Conversion Tool use the JAR format for for MS SQL Server?

During a demo in a recent AWS webinar, a JAR file was specified as a driver for the Schema Conversion Tool to connect to an MS SQL Server db (I am providing a screenshot from the webinar). Why was JDBC chosen? Was this optional, and was a choice made by the person who presented the webinar? If so, what other options would be available as a driver?
From Schema Conversion Tool documentation:
For the AWS SCT to work correctly, you must install the JDBC drivers
for your source and target database engines.

How to figure out ODBC Driver name based on SQL Server Version installed in machine?

I am a Database Developer and currently working in SQL Server Technology. I am trying to find out the ODBC driver name based on the installed SQL Server Version. Here is what I mean - Example,
We are using SQLCMD.exe to execute some scripts through our custom MSI. SQLCMD fails if it doesn't find the correct ODBC driver. Hence we need to be able to identify the correct ODBC version based on the SQL version installed, so that we can check this before installation and prompt the user to install the correct ODBC version as a prerequisite.
I have already explored the below -
Windows Registry - I did not get a clear cut idea of how to identify ODBC drivers based on versions. ODBC drivers and SQL Server versions are mentioned at multiple places and either they do not match amongst themselves or with the installed SQL Server Version.
Admistrative Tools -> ODBC Admistrator -> Drivers Tab
SQL Server Version here do give some idea but we are unable to decode odbcad32.exe. Link - https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/check-the-odbc-sql-server-driver-version-windows?view=sql-server-2017
If anyone knows anything then please render help. We need a solution using C# ( recommended ), however, if any other technology then we can have a look for its feasibility.
Thanks in advance.
Windows registry is the best way to go, I'm not sure why you're seeing inconsistencies. There are two main places to look:
For 64bit: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers
For 32bit: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ODBC\ODBCINST.INI\ODBC Drivers
If you want the specific version, you will need to go up a level into the registry keys that have the same name as those listed in ODBC Drivers. For exmaple, under ODBC Drivers you have the key "ODBC Driver 17 for SQL Server" listed as installed, under ODBCINST.INI you will have a entry called "ODBC Driver 17 for SQL Server" where you can find further details.
ODBC driver versions aren't intrinsically linked to the version of SQL installed. It's absolutely possible the ODBC driver has been updated separately, and/or multiple versions are installed.

How to connect to DB2 Database from a non-DB2 system using vba with out DB2 native driver

I would like to know how can I connect to DB2 database on a remote server from my machine which does not have db2.
I know that if I have db2 installed on my local system I can make use of the native DB2 OLEDB/ODBC drive to connect to the DB2 database on remote server.
Even with JDBC you would still need (as for any DMBS) the DB2 JDBC driver installed.
You will always need one of the clients installed:
http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.swg.im.dbclient.install.doc/doc/c0022612.html?cp=SSEPGG_10.5.0%2F2-0-2-0&lang=en
In particular you are probably looking for the "IBM Data Server Driver for ODBC and CLI" which is "... a lightweight solution that is designed for ISV deployments. This driver, also referred to as the CLI driver, provides runtime support for applications using the ODBC API or CLI API, without the need to install the Data Server Client or the Data Server Runtime Client. "

Derby Database ODBC Connection

I have a Derby Database in Netbeans with connection string
jdbc:derby://localhost:1527/MyDatabase
Can this be used with ODBC? If so, how could I transform this or configure my Derby Database to be compliant with ODBC
The end goal is to get the Derby Database migrated to MySQL. Using the migrating wizard in MySQL Workbench appears to be the easiest way. However I do need ODBC connectivity.
Do you want to use ODBC because MySQL Workbench uses it to migrate database?
I migrated some databases between various engines and my favorite technology is to convert DDL schema (CREATE TABLE, CREATE VIEW etc) using specialized Python program. Then I use JDBC with getObject()/setObject() methods to copy data. You can see such copy database Jython program (Jython is a Python language that works using JVM and can use JDBC drivers) in my response to Blob's migration data from Informix to Postgres .
BTW Quick search shows that IBM have ODBC driver to Derby (they bought Informix that earlier bought Cloudscape): http://www.ibm.com/developerworks/data/library/techarticle/dm-0409cline2/
Use OpenDBCopy, which is an opensource database utility to migrate data from and to any database via JDBC connection.
You can copy table structures as well as data from any supported database.

Connecting to SQL Server 2008 from a Mac

Office for Mac 2011 has better support for Pivot Tables in Excel, including external data.
I need an ODBC connection on a Mac to SQL Server 2008. Microsoft recommends using a JDBC driver, but the documentation for it is very, very, very weak.
Here is the link to the JDBC driver: http://msdn.microsoft.com/en-us/sqlserver/aa937724
Now, once that is downloaded and extracted, you can add the JDBC driver via the Apple ODBC Administrator.
.
Finally, you can add the ODBC connection, but it won't let me edit the keyword or values.
:
A few questions:
Am I using the right driver/do I have it installed correctly?
Is there a way to change the keyword values in the ODBC Administrator?
Thanks
Just to help those who stumble across this problem:
Control + Click to edit both Keyword and Value fields in Mac OS X ODBC Administrator.
Alternatively, Command + Return
Tab-bing through the fields work as well.
I'm not sure where you found the recommendation to use a JDBC driver with MS Office 2011. I am sure it won't work out.
However -- ODBC drivers for Mac do exist, for MS SQL Server and other DBMS, and these are fully compatible with MS Office 2011. My employer makes a number of these drivers.
For your specific need, I'd start here.
Good luck!
Edited to clarify: All versions of Microsoft Office are built with ODBC client capabilities. None have JDBC client capabilities. If you're to use Microsoft Office against an JDBC driver, you'll also need an ODBC Driver for JDBC Data Sources ... such as this one from my employer.

Resources