Azure Data Factory Oracle connection through self Hostes IR using TNSNAMES

Bell, Bo 1 Reputation point
2021-10-28T12:51:31.603+00:00

Hi,

We are trying to connect an Asure Data factory pipeline to an On-prem Oracle database server. The server is "hidden" behind network gateways, and need a specific connection string setup to work.

To do this we install the Oracle client driver and set up a TNSNAMES.ORA file with the correct connection string. This works fine locally on the SHIR machine ( the Oracle tnsping are able to connect ) but failes when we try to make the connection from Data Factory.

msg:
ERROR [08001] [Microsoft][ODBC Oracle Wire Protocol driver]Connection refused. Verify Host Name and Port Number. ERROR [08001] [Microsoft][ODBC Oracle Wire Protocol driver][Oracle]ORA-12203: unable to connect to destination

The Tnsnames ora file looks like :

144539-capture.png

We have tried several configuration of the connection , but it seems like its always the Microsoft driver responding; is there any way to force the SHIR to use the Oracle native driver (which is used by tnsping) ? or any other suggestion to make this work ?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Cornelius Munz 81 Reputation points
    2022-11-21T11:22:53.513+00:00

    Hi @Bell, Bo , @Raine Holm

    i have had the same issue and was able now to solve it with adding an additional connection property "alternateservers" Here you can provide multiple additional servers for you connection.

    Property name: AlternateServers
    Property value: (HostName=<secondary host>:PortNumber=<secondary port>:ServiceName=<secondary service name>)

    Or if you use a SID connection type
    Property value: (HostName=<secondary host>:PortNumber=<secondary port>:SID=<secondary SID name>)

    You can even add mutliple additional servers only by concatenating the entries with addtional ":"

    I found that this solution is already described in the documentation in the section "Linked service properties" :
    https://learn.microsoft.com/en-us/azure/data-factory/connector-oracle?tabs=data-factory

    Here you can find a screenshot, how to add that additional parameter:

    262661-oracle-alternateservers.png

    1 person found this answer helpful.

  2. ShaikMaheer-MSFT 38,546 Reputation points Microsoft Employee Moderator
    2021-11-01T05:16:39.65+00:00

    Hi @Bell, Bo ,

    Thank you for posting query in Microsoft Q&A Platform.

    Above error may occur because of any of following reasons.

    • Specified Host Name is incorrect or resolves to the wrong machine
    • Specified IP-address is unreachable
    • Specified port number is incorrect
    • Database service is not up and running
    • Firewall / Virus scanner on the client / server / network is blocking communication
    • Client and Server machine are on different subnets and a router blocks communication
    • Unsupported database version.
    • Wrong user name and/or password
    • Corrupted ODBC Data Source Name (DSN) entry

    Could you please cross check your case with above possibility of error causes?

    Please Note, Oracle connector in Azure data factory supports below oracle database versions. Click here to know more about Oracle connector in Azure data factory.

    • Oracle 19c R1 (19.1) and higher
    • Oracle 18c R1 (18.1) and higher
    • Oracle 12c R1 (12.1) and higher
    • Oracle 11g R1 (11.1) and higher
    • Oracle 10g R1 (10.1) and higher
    • Oracle 9i R2 (9.2) and higher
    • Oracle 8i R3 (8.1.7) and higher
    • Oracle Database Cloud Exadata Service

  3. Daniel Guardieiro 0 Reputation points
    2023-05-31T13:39:53.2966667+00:00

    Hello,

    I'm preparing a new connection from ADF to a oracle 19c database via Integration runtime.

    Before I start, I would like to know if is mandatory have a oracle client in the Server I have the integration runtime running.

    Thank you in advance.

    Have a nice day

    0 comments No comments

  4. pgb 15 Reputation points
    2023-10-27T17:54:10.0966667+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.