UniConnection via VPN (Oracle)

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Gloegg
Posts: 6
Joined: Sun 15 Apr 2007 10:52
Location: Germany

UniConnection via VPN (Oracle)

Post by Gloegg » Thu 02 Jul 2009 09:20

Hi,
I'm having a problem with a UniConnection via a VPN-Tunnel.

With a non-direct connection i am getting an ORA-12545: "CONNECT unsuccessful" at both runtime and designtime.
With a direct connection i can connect at designtime (Data Editor of a query also worked), but at runtime it throws the following exception:
Class N_26 "Net error 206"

The same project works fine with an oracle server in the local network.

The Oracle SQLDeveloper has no problem connecting to any of the servers.

UniDAC: 2.70.0.8
Delphi 2007 Prof.
Oracle 10g

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 03 Jul 2009 09:24

Please make sure that you have typed the value of Server property correctly.
If you have several Oracle clients installed, check that UniDAC uses the same client as SQLDeveloper.

Gloegg
Posts: 6
Joined: Sun 15 Apr 2007 10:52
Location: Germany

Post by Gloegg » Fri 03 Jul 2009 12:29

The Server value of my connection is like this:

hostname:port:SID

How can I determine which Client UniDAC is using and how do I change this?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 06 Jul 2009 08:37

At first try to connect using Oracle client (set the Direct option to False). In this case you should assign to Server the name of database alias from the tnsnames.ora file.

If you don't have an alias for your database, your should create one.

You can use the HomeName option in SpecificOptions of TUniConnection to select an Oracle client.

Gloegg
Posts: 6
Joined: Sun 15 Apr 2007 10:52
Location: Germany

Post by Gloegg » Mon 06 Jul 2009 13:25

OK , I have now uninstalled and installed (and uninstalled and installed and so on) all OracleClients. At the moment I have installed the Oracle Client 11.1.0 and I can connect to the Oracle Database in Designtime with the following Settings:

Code: Select all

Server='ORCL'; 
Username='User'; 
Password='xxx'
However, at Runtime, it throws an ORA-12154 TNS: Couldn't resolve the Connect Identifier.

When I change the HomeName-Property from an empty string to 'c:\oracle\product\11.1.0\Client' (where the oci.dll is located) The TUniConnection can't find the oci.dll.

BTW: The Connection is placed on a DataModule inside a DLL. If I put the TUniConnection on the Form there's no problem connecting at design- or runtime.

Gloegg
Posts: 6
Joined: Sun 15 Apr 2007 10:52
Location: Germany

Post by Gloegg » Mon 06 Jul 2009 14:46

Ah, shame on me, I was confusing my parameters at runtime. It does work now, thanks for your help.

Post Reply