Does using the ADO.NET Provider that a DB vendor wrote eliminate the need to have any database drivers installed on the machine?
I'm a bit confused on how ADO.NET actually works.
An ADO.Net provider is a database driver.
However, ADO.Net providers are (hopefully) purely managed, so they don't need any installation.
It depends on how they wrote the provider. The provider can be written to include any driver, but it could also be written to expect to talk to a driver that is installed on the machine separately.
For example, Microsoft's own Sql Server provider still expects you to have the "native client" installed on each machine. But system.data.sqlite includes all that as part of the provider for the sqlite database.
There are Ado.NET providers specific to database which are tailored versions of DB drivers.
Eg: SQLClient -tailored version for SQL server family
iAnywhere -tailored version for Sybase db.
And we have ODBC drivers in Ado.NET which is not specific rather generic driver available out of the box.
Related
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. "
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/
What is the difference between SQL Server Native Client connection and ODBC connection? What are the pros and cons of these two?
Huh? ODBC is officially dead? Someone might want to let Microsoft know that:
Microsoft is Aligning with ODBC for Native Relational Data Access
From the above link:
ODBC is the de-facto industry standard for native relational data access...
and
The commercial release of Microsoft SQL Server, codename 'Denali' will be the last release to support OLE DB.
and finally,
"We encourage you to adopt ODBC in the development of your new and future versions of your application. You don’t need to change your existing applications using OLE DB, as they will continue to be supported on Denali throughout its lifecycle. While this gives you a large window of opportunity for changing your applications before the deprecation goes into effect, you may want to consider migrating those applications to ODBC as a part of your future roadmap. Microsoft is fully committed to making this transition as smooth and easy as possible.""
(emphasis added)
ODBC is useful for times when the underlying database might change but you don't want your code to (assuming the SQL stays the same across technologies). You could connect to an Oracle database one day and switch out to a SQL server database the next. The disadvantage is that you don't get the optimizations that having specific drivers affords you. The SQL Server Native client driver has been proven to be much faster than just using a standard ODBC driver.
What is the difference between SQL Server Native Client connection and ODBC connection?
ODBC is a standardized API.
ODBC drivers are shared libraries that use native protocols (like SQL Server shared memory, or SQL Server TCP/IP) to implement the ODBC interface.
In other words, ODBC is an abstraction that enables code to work against multiple database technologies.
It's similar to Java's JDBC, or Python's DB-API, or GO's database/sql, except ODBC drivers use C functions. Also, they are more frequently installed at a system level.
ODBC has the usual pros and cons of any abstraction.
Pros: Makes code more flexible/portable.
Cons: Adds performance overhead and has fewer features.
It sounds like you know that you will use SQL Server and will always use SQL Server.
In that case, I'd use a native client library if it's available.
SQL Server Native Client is a single dynamic-link library (DLL) containing both the SQL OLE DB provider and SQL ODBC driver for Windows.
SNAC 11 is a single dynamic-link library (DLL) containing both the SQL
OLE DB provider and SQL ODBC driver for Windows. It contains run-time
support for applications using native-code APIs (ODBC, OLE DB and ADO)
to connect to Microsoft SQL Server 2005, 2008, 2008 R2, and SQL Server
2012. A separate SQL ODBC-only driver is available for Linux.
https://blogs.msdn.microsoft.com/sqlreleaseservices/snac-lifecycle-explained/
is it possible to import a MS access database (.mdb) in a seam project using JBoss tools within Eclipse (Ganymede)?
Starting a new seam project, I cannot see any field which uses ms access as database type.
Any answer is appreciated.
Java programs generally talk to databases through JDBC drivers. To my knowledge there is no JDBC driver for Access MDB files. You can use the JDBC-ODBC bridge to create a connection to the Access database with a little help from the Access ODBC driver. How to set up this construction is explained here
You have to create a database connection in the JBoss application server that uses that connection, how this is done can be found here.
I have access to an Oracle server that has some databases that I would like to access. However, the machine that I have access from has none of the oracle client software. Is there any alternative to oracle's client software the provides the functionality of something like MySQL's mysql or Postgres' psql? I'd like to be able to poke around a bit in the database before writing software against it.
If you download the free Oracle Instant Client you'd be able to use any JDBC or ODBC Database tool such as DbVisualizer or SquirrelSQL. Those are GUI tools; I've not come across a JDBC command line tool but there may be one out there.
Alternatively, there is an Instant Client version of SQL*Plus which will give you an Oracle sqlplus command line without a full Oracle install.
Oracle's free PL/SQL IDE SQL Developer can use Type 4 JDBC drivers to connect to a number of different types of databases, obviously including Oracle. You can use that without doing any sort of Oracle client install if you so desired.
You could try the Oracle IDE SQL Developer which is a free download. It is written in Java and is available for both windows and linux. It is self contained and doesn't require the Oracle client be installed.
SQLPal (http://www.sqlpal.com/) is a lightweight SqlPlus like application for Windows that does not require the oracle client.