Connect Excel to Oracle - oracle

Can we connect from excel (excel-VBA) to oracle(in a remote server) without
installing oracle client in the client system... I tried all the options
below but it is throwing error as oracle client should be installed.
below is the connectionstring i have used
1)strConnection = "Provider=OraOLEDB.Oracle;Data Source=SourceName;User Id=Username;
Password=password;"
2)strConnection = "Provider=MSDAORA;Data Source=SourceName;UserId=Username;
Password=password;"
3)strConnection = "Provider=MSDAORA.1;User ID=Username/password;Data
Source=SourceName;Persist Security Info=False"
4)strConnection = "Driver={Microsoft ODBC for Oracle};SERVER=(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.6)(PORT=1521)
)(CONNECT_DATA (SERVICE_NAME=SERVICEName)));uid=Username;
pwd=password;Uid=Username;Pwd=password;"
5)strConnection = "SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.6)
(PORT=1521))(CONNECT_DATA =(SERVICE_NAME=SERVICEName)));
uid=Username;pwd=password;"

You need some form of client to connect to an Oracle database, local or remote.
You have two choices:
Install an Oracle SQL*Net client. If your server is Oracle 10g or higher you don't need the full-blown client: you can use the more lightweight Instant Client.
Buy an n-tier ODBC driver which supports generic connectivity. OpenLink is one, there are others.
".can we not connect to the oracle
database with only the Drivers or
providers present in our OS(Windows
XP).."
Think of it this way: the ODBC drivers do not connect to the database, they connect to SQLNet. Then SQLNet connects to the database.
"what is the difference between
Drivers,providers with the client. "
The Oracle provided drivers are better tuned for Oracle than the ones MS provides, but in this context they are the same: both require the presence of an Oracle client to work.

Related

Oracle instant client 12c EZConnect Using tcps instead of tcp

I download oracle instant client 12.2.0.1.0, I try to use sql loader to load csv data to the database. I can successfully load using following:
sqlLdr.exe userid=user/password#//192.9.200.228:1521/oracle ERRORS=4000 control=D:\temp\csma\xx_20190225.ctl log=D:\temp\csma\xx.log
However my production would only allow secured connection only (use tcps), can I use tcps by EZConnect? If not how can I connect using tcps using just the instant client (not full client)?
Instant Client based applications can connect using a Net Service Name from a tnsnames.ora file. The Instant Client installation instructions (eg. the instructions for Linux x64) tell you where to put the Oracle Net configuration files. Create the default location, put the files there, and update the connect string in your application.
With Oracle 19c, the Easy Connect syntax was extended to be 'Easy Connect Plus' so you specify things like the wallet location in-line, see the Understanding the Easy Connect Naming Method in the Oracle Net 19c documentation. No Instant Client 19c has been released yet.

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").

Error when adding Oracle DB to ODBC connection

Hi everyone here,
I am pretty new to Oracle DB configurations as I have been using SAS and Microsoft SQL all this while.
What i want to do is to add Oracle DB to ODBC(64-bit) in a new server.
This is the scenario:
Server A:- Existing Application server that has Oracle configured in ODBC(64-bit)(Been using for the past 3 years, configured by other people).
Server DB:- The Database server
Server B:- Brand new server that i want to configure Oracle DB in ODBC(64-bit)(Brand new).
I copy every single details of the server information in Server A ODBC for the same Oracle DB and put it in Server B ODBC. I have both Server A and Server B remote connection side by side and do "Test Connection".
Server A can connect successfully. However, Server B is giving me this error:
SQLState=08004
This is my first time trying to configure for ODBC to Oracle DB. I have previously configured many Microsoft SQL DB without any issue. Do take note that i have not installed any Oracle driver or any necessary-tool needed for ODBC to link with Oracle as i do not know of any. Is there anything i have to install for this to work or any necessary settings need to be done before configuring it?
All this while for Microsoft SQL connection to ODBC, i just put in the DB credentials and voila.
Your help is very much appreciated.

Accessing DB2 with SQL Developer via ODBC (not 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.

Need some inputs on Oracle instant client

Currently i am using ODP.Net.Is Oracle Instant client something to replace this or an addon.
Some sites talked about using this for both 64bit and 32 bit machines.
Thanks,
MY Findings:
Oracle Database Instant Client (ODIC) is not intended to replace ODP .Net or addon for .Net Apps;
ODP.Net is a client component of Oracle used to connect .Net apps to an Oracle database.
Oracle Instant Client is a method of installing Oracle client components (such as ODP.Net and OO4O) on a PC and is an alternative to the full client install.
Prior to Oracle 11g, ODP.Net was not included in Oracle Instant Client.
So we couldn't use Oracle Instant Client with applications that used ODP.Net. In Oracle 11g we can.
Other Explanation:
ODP.NET consists of two dll's: Oracle.DataAccess and OraOps. Oracle.DataAccess is the managed dll, which calls into OraOps which is the unmanaged dll that makes OCI calls into the Oracle client.
Instant Client consists of 3 or 4 dll's that constitute is a small footprint Oracle client that enables communication with the database from a client side application. Lots of middleware drivers can use Instant client: ODBC, OCI, OLEDB, ODP, etc.
ODP.NET relies on the Instant Client dlls to pass the OCI calls on to the database; it does not communicate with the database directly.
So..
ODP > Instant Client > Your Network > Listener/database/etc
You could certainly use Instant client with things besides ODP.NET.
You cannot use ODP.NET without some form of Oracle Client software (instant, or full).
Oracle Database Instant Client (ODIC) is not intended to replace your ODP .Net addon for .Net Apps; ODIC is used as Oracle Client to replace your TOAD or SQLDeveloper since you like the online-commands.
Nevertheless this ODIC can be used as an ODBC App client e.g. Querying your Oracle DB through Excel. I also use it from an USB key as OIC doesn't any OS registry operations.
Resources: Oracle Mini Site for Oracle Database Instant Client
Read on the mini site: I never used it but contains your ODP.NET
ODAC* Includes ODP.NET, Oracle Services for MTS, Oracle Providers for ASP.NET, Oracle Provider for OLE DB, and OO4O with Oracle Instant Client

Resources