Accessing DB2 with SQL Developer via ODBC (not JDBC) - jdbc

Due to company constraints, I cannot read my DB2 tables using the Oracle SQL Developer.
I could do it via JDBC, but I don’t have enough information to configure the connection (e.g. the port is missing).
I found in my local Windows ODBC list a system DNS ( IBM DB2 ODBC DRIVER – DEFAULT_DB2) that I can use with Microsoft Access.
I mean, tables are accessible via MS Access through an ODBC DNS.
I’d like to do the same with SQL Developer too. Is it possible?
May I use my local ODBC system DNS in SQL Developer or something like this?
I see that ODBC connections are possible with SQL Server, MySql, Sybase and other databases but I cannot find anything about DB2.
Additionally, if it helps, I can see my DB2 server via QMF (already registered by the company software distribution) but I don’t think this is useful for me.

Related

What Protocol does Oracle client use when connecting PowerBI to oracle database?

I have installed the Oracle client on my server & configured the TNS as per the database hosters instructions.
Powerbi can now connect to the Oracle datasource.
Id like clarity regarding what method PowerBI is connecting to the oracle source.
For example, I can connect to oracle via ODBC without using the Oracle Client.
Id like to know what protocol the oracle client is using and what are the benefits of using it over ODBC?
It looks like Power BI recommends installing the ODAC runtime for your environment. There is no alternative option. You might be asking why Power BI uses the Oracle ODP drivers instead of the Oracle ODBC driver - I'm pretty sure the answer is that it's faster and supports more Oracle features, since it doesn't have to implement a bridge.
If you're frustrated with the large size of the Oracle Client or full ODAC developer downloads, you might be able to just install the ODAC XCopy runtimes, which are much smaller. (32-bit, 64-bit)
To answer your question about protocols, as far as I know, every client uses the Oracle Net component of the proprietary Oracle Net Services network stack to connect the client to the server.
Then the client sends commands over the network connection. Again, as far as I know, most clients use the low-level OCI library to do this.
There are a lot of different clients built on top of OCI:
SQL*Plus
SQL*Loader
Datapump
Oracle Instant Client
Oracle Client (ie, "Thick Client")
Oracle JDBC OCI driver
Oracle ODBC driver, and other drivers for Microsoft products (ODP.NET unmanaged, ASP.NET, OLE DB)
There's a few exceptions:
Oracle JDBC Thin driver (entirely Java code)
Oracle ODP managed driver (entirely .NET code)
There is also a Microsoft ODBC driver for Oracle, although Microsoft explicitly says to use the Oracle driver instead. It doesn't support most modern Oracle data features ("Unicode data types, BLOBs, CLOBs, and so on").

Export Database connection to Oracle Developer

I have a database Connection established in odbcad and Microsoft Access (aswell as working in Excel) via ODBC and want to also get it working in Oracle SQL developer.
It is a Windows SQL Server as far as i know and I have tried several Settings, of which None works. I have also installed Driver for ODBC. I would like to Import Settings into SQL developer as applied in MS Access, is there any possibility?
No, SQL Developer is a Java application and uses a JDBC driver.
But if you look at the odbc properties for your connection, those should largely translate to what you need to define a basic connection.
Oracle:
Server name or IP address of the DB, port # for the listener, and the name of the SID or Service, plus a valid username and password is all you need to connect to Oracle.
What error do you get when you try to connect?
Show us what you're trying.
Update:
You're trying to connect to SQL Server but you're getting"
Native SSPI library not loaded
You're trying to use OS Authentication for your connection. For this to work with the jTDS driver, you need to copy a DLL file named ntlmauth.dll (which is for NT authentication) under the jtds-x.x.x-dist\x86\SSO\ or jtds-x.x.x-dist\x64\SSO\, to any directories in the PATH environment.
Please update your question such that's it's clear you're connecting to SQL Server and share the error message so others can find it.
I imagine this question is a duplicate of many previous iterations of the same challenge.

Discover oracle connection data (Host, SID/Service, Port) from an ODBC connection

I'm not an Oracle guy, but I find that I need to touch on some oracle resources to respond to a new report request. I'm working at an office where the connection to an oracle server uses LDAP and I can't get to the connection info. I do have an ODBC connection on my machine, so I can get into the database through MS Access. But I'd like to be able to connect with SQL Developer so I can do more useful profiling on the tables.
Is there any way to use my ODBC connection through Access to tease out Hostname, Port, and SID/Service name so I can connect through SQL Developer?
It seems I do not have permissions to the UTL_INADDR functions.
Since you have an ODBC connection defined already, you can open the ODBC Data Source Administrator on your computer (Goto the start menu and type ODBC in to search for it).
In the ODBC Data Source Administrator select the data source for the database in question (it may be on the User, System or File DSN tab) and click the Configure button.
From the Configuration screen you will be able to see the TNS Service Name for the connection.
The TNS Service Name should be all you'll need to supply to SQL Developer when creating the connection. Aside from your account credentials of course.
You can query SID and Hostname like this:
select instance_name, host_name from v$instance;
Afaik there is no way to query the port name from the database, see also this article on Ask TOM on this subject:
You cannot get the port -- the port is not necessarily known to the
database. The listener need not be running on the same machine with
the database, a single listener might be servicing many databases. A
database may have many listeners servicing it.

Connect from SSIS to Oracle using ODBC with Kerberos

We have a large SSIS solution with many connection managers pointing to Oracle. Provider is ODBC, data sources are set to defined system DSNs. So far we use user names and passwords and everything works fine. Now we want to switch to Kerberos authentication.
I can already successfully query the Oracle database using sqlplus with Windows authentication.
I'm having hard time achieving the same from SSIS using ODBC connection managers.
Is it possible to reconfigure the ODBC connection managers so they will use Windows authentication? How should be the connection manager configured?
The question is specifically about ODBC, please avoid answers like "use Attunity".
We use MS SQL Server 2016 Enterprise edition, Oracle 12.2.
I finally made it working, hope it helps someone.
I created a new DSN
as User ID I put [OracleUserName]
beware the square brackets! Those are necessary
the OracleUserName is user name configured on Oracle side (I do not know much about Oracle). The DBA configured the AD account to be able to login as this user.

Is Oracle Instant Client an actual database?

I want to create a small dev database just to use for developing my application. I've downloaded the Oracle Instant client and followed the directions to "install" (ie, copy/paste and set up some environment variables), but I can't find any information on how to connect, login, create database, etc, or even exactly what Instant Client is, specifically. So, a few specific questions:
Is Instant client just a set of drivers and components that allow you to connect to an existing database, or can you use Instant Client to create and administer a completely new database?
If it CAN be used to create a new database:
How do you "start" (or similar concept) the database so that it is ready for connections.
Because there is no installation, and no default configuration, I haven't set up a default schema, port, etc. So, what is the default connection information to connect to the database for the first time?
For example, I use SQL Developer to connect to and administer my remote database, so how could I connect to Instant Client from SQL Developer?
The client is JUST a client.
You'll want to download the Oracle Database installs. The easiest would be the XE (Express Edition) - it's free, and gets going on windows or linux pretty quick.
You'll then install the server software and THEN create a database. Then you can use your client to connect to said database. You can use your client now to connect to any Oracle database running on any server that you can see on your network.
There are more alternatives.
I talk about this in more detail here.

Resources