In order to connect to IBM DB2 from either Excel or a C# .net application, which driver do I need in order to also get the data acceleration? (set current query acceleration all;) Are there drivers that are portable (don't need admin rights to install)?
If they do need admin, I can always ask IT support to install it for me..
Have been using JDBC drivers for my Squirrel SQL client, and they support IBM IDAA (acceleration), but these won't work with Excel nor C#. Obviously.
Any pointers?
To access Db2-for-Z/OS from either Excel or C# .net you will need a CLI driver for Db2 with matching bitness.
Depending on how your Db2-for-Z/OS subsystems are licensed you may also need a license-file on the Microsoft-windows workstation, becase IBM supplied CLI drivers are not free for accessing Db2-fo-Z/OS. Speak with your Z-DBA or passport-advantage-coordinator to get the license-file (and the correct version of it to match your version of Db2-for-Z/OS) or to determine if the target subsystem has already db2connectactivate enabled ( meaning no workstation based licenses are required).
IBM and other companies offer CLI drivers for Db2 for various operating systems including Microsoft Windows.
IBM offers different sizes of CLI driver, depening on how much functionality you need.
Any of these should work with IDAA as long as they are "current", and the keywords needed for IDAA exploitation should be common between the IBM supplied CLI drivers.
The smallest footprint, minimal function, zero install CLI driver from IBM is the "ODBC and CLI" driver, which is a zipfile (just unzip and register it per the docs). Get it via this link, and then install it per this documentation. Note that this driver gets frequently updated, as it is used by all CLI/ODBC based tools (perl, python, r, c#, ruby, c++, ...). It's also possible to use wget to download it. google for that.
A larger driver is the "Db2 runtime client", which has more functionality and the clpplus interface. This is available via the IBM Passport Advantage website , or via fix central for latest fixpacks.
The full Db2 client is a large image, and has all functionality that IBM offers for client side use. Get this via the IBM Passport Advantage website, or via fix central for latest fixpacks.
Related
I am trying to connect to a client's DB2 v7.2 database in Linux.
I am pretty new to DB2 and could not find 7.2 odbc driver in IBM site. The earliest is 9.1 odbc driver. Is this compatible with v7.2 ?
IBM does not make such old legacy drivers publicly available, for good reasons.
Genuine IBM customers always have a way to acquire legacy drivers however, although this is wholly dependent on who you know.
The v9.1 ODBC driver might have trouble accessing v7.2. It rather depends on which fixpacks are deployed (client and server), which operating-system (for client), and what authorization level you have for the target instance, and what rights you have at the workstation end, apart from the level of competence needed. This is not work for beginners.
Keep in mind that legacy drivers may not be able to install on modern workstation operating-system versions (for example , they might need the workstation operating system to be also a legacy version).
Another approach is to have a detailed understanding of exactly how (with which versions and tools) the client currently connects to that legacy database, and then seek to emulate that mix of versions, possibly by cloning.
This is not a programming question so stackoverflow may not be the correct forum. There are IBM specific forums run by IBM which may help.
I need to connect to an Oracle 9i server from my machine using SQLDeveloper. I already have a functioning version of SQLDeveloper 18.2 + Oracle Client 12 for more modern databases, but for this connection I want a separate older version of SQLDeveloper.
I've installed SQLDeveloper 3.2.20.09 in a separate folder on my machine and can launch it, but it defaults to finding the ojdbc6.jar file from Oracle Client 12. if I go to Help > About and select properties, the jdbc.library says jdbc.library /C:/app/client/product/12.1.0/client_1/jdbc/lib/ojdbc6.jar
and if I try to connect I get the error ORA-01460: unimplemented or unreasonable conversion requested
I tried putting the path to the SQL Developer 3.2 install first in the PATH variable, but no difference. Is there a way to tell SQL Developer which jdbc driver to use for Oracle ? (maybe in sqldeveloper.conf)
The official answer is:
use the jar (driver) we ship with the product OR
use a Thick Client, and we'll pull the jdbc driver from an Instant Client or Oracle HOME on your machine
The 2nd option will work so long as you don't try to go back back or forward in time to the point that the software will recognize/support the driver.
In other words, you can't tell SQL Developer 18.x to use a 9i Home, we have a hard dependency to require at least a 11gR2 client (I believe, it could actually be a 12c based client which is required).
You'd be better off getting your data out of that ancier 9i Database and into a modern 12 or 19c Oracle instance.
but it defaults to finding the ojdbc6.jar file from Oracle Client 12.
Sounds like you've managed to get a thick connection defined, go into preferences and disabled on the advanced page any reference to OCI or Thick, then it will use the jdbc driver shipped with SQLDev.
I am having Oracle 10g installed on my laptop and have downloaded ojdbc14.jar driver for the same. The problem is, my operating system is Windows 7, and I'm not having option to create a Data Source for Oracle since I m not having oracles driver installed. I m having option to create a Data Source for SQL server 6, but I want to get connected to Oracle. Please Help.
By 'Data Sources', I'm guessing that you mean Data Sources (ODBC), under Control Panel > Administrative Tools. Is this correct?
I've set up ODBC Data Sources that connect to Oracle databases before, but to do that I've needed the Oracle client to be installed. However, if you're having the full database installed on your laptop (as your question suggests), you won't need the client - that's only used to connect to databases running on other machines. I believe the full database contains everything in the client, so you should be able to set up an ODBC Data Source pointing to the database on your laptop once the database has been installed.
The ojdbc14.jar just contains the JDBC classes to talk to an Oracle database, and only programs written in Java (and other languages that run on the JVM such as Scala, Groovy or Clojure) can use it. This jar on its own not enough to be able to set up an ODBC data source.
Oracle currently has 1 version that is certified for windows 7. That version is 11.2. They have indicated that they plan to certify 10.2.0.5 if this happens there will likely be a patch that will be needed.
This is probably why the Data Source does not work, either ODBC or OLEDB.
Another possibility is that you have installed the 32bit version of Oracle and your OS is 64bit then you would need to use the 32bit Data Source administrative tools.
I have figured out the solution for my problem. All that I needed to do is put ojdbc14.jar file in my class path and then I was able to use it. Though by doing so, I needed to make some change in the code. I was no more able to use Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") instead I needed to use Class.forName("oracle.jdbc.OracleDriver") also instead of using my data source as "jdbc:odbc:somename" I needed to use jdbc:oracle:thin:#localhost:1521:xe.
I'm looking for an ADO.net 2.0 or later provider for Sybase database which seems to be known as Sybase ASE. To clarify, I'm interested in ASE, and not SQL Anywhere. Hopefully the provider will be included with the database, or free.
I can find mention of an ADO.net 1.1 provider; that's not what I want.
I can find mention of ODBC drivers and OLEDB providers; that's not what I want.
I've found the DataDirect ADO.net providers which are paid for; I guess that's the fallback position.
Thanks for your help
Having recently been down this road myself, I can only suggest that you wont find the answer through searching the net. If you are connecting to an ASE server, then you have a customer technical contact. Use that person, asking them to download the earlier mentioned Sybase 15 #ESD10.
From my experience (which I freely admit, was a bad one);
Sybase makes this sort of developer resource available to paying customers only.
The download, once you have it, will include a whole bunch of extras that you wont need. I still think that PowerDesigner is a great utility, but I think that what is included is a trial version, of limited long term value. I believe that what you want from the set is the OpenClient install, selecting the ADO.NET features.
I found the whole experience, from acquiring the developer resources (just identifying the right download was a struggle), to isolating out the two files necessary from the hundreds of installed files, to the fact that the install broke my existing RapidSql and DbArtisan installs, and finally that the current version goes no further than ADO.NET 2 provider support (you wont get EF wiring for example), to be truly frustrating.
No surprise then that I have not been able to find much support for ASE using nHibernate or subsonic either.
This question is fairly old but it seems to have gotten easier to get the ADO Connector.
Download the "Get a Free "Developer" Edition" from
http://scn.sap.com/community/developer-center/oltp-db
Choose Custom Install when given the option.
Only install the .Net ADO package from the custom install.
Reference the Sybase.AdoNet4.AseClient.dll in your solution from where the install put the files.
You should then be able perform queries, updates etc. in .NET by following the directions from here:
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.sdk_12.5.1.adonet/html/adonet/DAFJEFIF.htm
As an alternative to the SAP/Sybase driver, we developed our own ADO.NET Core driver for ASE:
https://github.com/DataAction/AdoNetCore.AseClient
.NET Core was a key technology for us - in particular for AWS Lambda - and there is still no ADO.NET Core driver available from SAP/Sybase.
Our driver supports most of the SAP/Sybase ADO.NET features, aims to be a drop in replacement to the SAP/Sybase one for easy transition, and supports all of the .NET Frameworks you would care about.
You can get it on Nuget:
https://www.nuget.org/packages/AdoNetCore.AseClient
Sybase 15 #ESD10 has support for ADO.NET 2.0, according to this link at Sybase:
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc20155.1500/html/newfesd/CBHJAABF.htm
New Features Open Server 15.0 and SDK 15.0 for Microsoft Windows, Linux, UNIX, and Mac OS X
ADO.NET 2.0 support
ASE ADO.NET Data Provider 2.0 is shipped with this SDK release. The ADO.NET 2.0 features supported in this version are:
* Provider factories
* Provider statistics
* Bulk update
* Bulk copy
* Asynchronous commands
* Extended pooling support to clear pools
* Common base classes
* Database metadata
For more information on the supported ADO.NET 2.0 features, see What’s New in ADO.NET 2.0.
From the sybase website:
Sybase support for ADO.NET, OLE DB, and ODBC
Adaptive Server version 15.0 contains new ODBC and OLE DB drivers developed by Sybase. The third-party rebranded ODBC and OLE DB Driver Kits included with previous versions are no longer shipped.
The retired ODBC Driver Kit was installed in %SYBASE%\ODBC, and registered with the ODBC Driver Manager as “Sybase ASE ODBC Driver”. The new ASE ODBC Driver by Sybase is installed in %SYBASE%\DataAccess\ODBC, and registered as “Adaptive Server Enterprise”. The version shipping with Adaptive Server and SDK 15.0 is version 15.0.0.50.
The retired OLE DB Driver Kit was installed in %SYBASE%\OLEDB, and used the provider short name of “Sybase.ASEOLEDBProvider” and the long name of “Sybase ASE OLE DB Provider”. The new ASE OLE DB Provider by Sybase is installed in %SYBASE%\DataAccess\OLEDB, and uses provider short name “ASEOLEDB”. The version shipping with SDK 15.0 is version 15.0.0.51.
Sybase recommends that you start your migration process the new ODBC and OLE DB drivers as soon as possible. New features introduced in Adaptive Server 15.0 are supported only by the new drivers.
See “New Features for OpenServer 15.0 and SDK 15.0 for Windows, Linux and UNIX”, for instructions on migrating to the new drivers.
Where can I find the redistributable version of the IBM DB2 Type 4 driver?
I suppose this is the driver I would use to connect from a Java app (on windows) to DB2 on the mainframe?
You will not be able to connect to the mainframe with any redistributable JDBC driver. The driver pack consists of the actual type 4 driver (db2jcc.jar) and any number of license files of the form:
db2jcc_license_cisuz.jar
where the cisuz bit is variable, indicating the platforms that you're allowed to run on (iSeries, pSeries, System z, LUW and so on).
You're only likely to get cu with any freely distributable pack. You need the z to access DB2 on the mainframe and that's jealously guarded so you'll need to purchase a specific edition of DB2 Connect to get it. I think both PE and EE, the personal and enterprise editions, have this licence file.
Without that license file, the type 4 driver won't even try to talk to the server, you'll get an exception.
IBM's Fix pack site has the "IBM Data Server Driver for JDBC and SQLJ" which is nothing but the JDBC type 4 driver. Though the page I pointed to above happens to be the windows page, it's the same type 4 driver for all platforms, as should be expected.
I don't think any user/password is required.
There is no need to download the JDBC driver separately it is already shipped with your DB2 product.
You can easily find it at this location : C:\Program Files\IBM\SQLLIB\java\db2jcc.jar
db2jcc.jar is the driver name
You can get the drivers from the IBM site. You will need to have IBM ID and password to login (which you can obtain here). Zip file is about 7 MBs, in contains DB2 9.5 JDBC (type 2/4) and SQLJ drivers. Type 4 drivers are in db2jcc4.jar.
However, you won't be able to connect to mainframes with this driver if mainframe is running DB2 for z/OS. To do so, you need at least to purchase DB2 Connect product, which will cost you about $500 minimum.
If you're running on an AS/400 (or iSeries, or whatever the heck IBM is calling it these days), you'll probably want to get it from JTOpen.
Their toolbox replaces the old Java Toolbox and includes the JDBC drivers.
If I need any IBM JARs for DB2 or MQ, I usually just add it to the instructions that DB2 or MQ needs to be installed as a prerequisite along with a URL to download it.
The same goes for Java and many other not easily redistributable products as well.
This eliminates the need to worry about licensing issues as it would be on the onus of the user rather than the vendor to obtain the proper licenses.