Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I connect to Oracle with SSIS? I am getting the error: "tns listener was not given the service_name in connect_data"

I am trying to connect to an Oracle DB through the Oracle Provider for OLE DB in SSIS, but am getting the following error when testing the connection: "tns listener was not given the service_name in connect_data". I am not too familiar with Oracle, so could someone provide me some direction for how to fix this error?

like image 931
user1603734 Avatar asked Nov 02 '12 16:11

user1603734


People also ask

How do you connect to Oracle in SSIS?

Connecting to Oracle in SSIS is a two-step process. First you install the Oracle client software, and then you use the OLE DB provider in SSIS to connect to Oracle. To be sure, the Microsoft Data Access Components (MDAC) that comes with the operating system include an OLE DB provider for Oracle.

What is an Oracle TNS connection?

What is a TNS? It is an alias. Like a hostname is an alias for an IP address, a TNS is an alias for an OCI (Oracle Call Interface) connection string. This string identifies the database server and database instance to connect to.


2 Answers

You can add the service name after the host name with a forward slash between them. This has worked in both the Microsoft and Oracle OLE DB providers.

Oracle SQL Developer Connection Properties

Visual Studio Connection Properties

IP/Service_Name also works, "12.12.123.123/Server1.domain.com"

like image 111
rtev Avatar answered Sep 25 '22 15:09

rtev


First of all, always use Oracle driver. Not the Microsoft one.

Then, when connecting, supply the TNSNAME, USERNAME and PASSWORD to a OLEDB Connection.

That's all!

like image 25
Dominic Goulet Avatar answered Sep 24 '22 15:09

Dominic Goulet