Page 1 of 1

Oracle Connection with OCI Mode

Posted: Mon 20 Feb 2012 13:26
by eliseu_corrona
Hi, all fine friends?
I need to make a oracle connection with delphi in OCI mode. Connecting directly by Devart, works perfectly, however, the OCI could not do so yet.

I have an installation of Oracle 10g installed on our server. I need to do some testing mode OCI because our client has a redundant layout of the installation of Oracle, where the IP of Oracle server can change.

I need connect to the Alias ​​and not the server IP (directly).

In tests. I installed Oracle Client, configured it (environment variables), all right. But the moment I turn on the connection (TSQLConnection) the following error occurs:

"Can not initialize oci.dll. Error: -1"

Could anyone help me?

Posted: Tue 21 Feb 2012 09:44
by AlexP
Hello,

Please provide the following information:
- the exact version of dbExpress driver for Oracle;
- the exact version of your IDE;
- the exact version of your OS;
- the exact version of your Oracle client and Server;

Posted: Tue 21 Feb 2012 14:00
by eliseu_corrona
Hi AlexP, all fine?
Thanks for your answer.

I do to make the connection.
After several tests, could make a connection through OCI.
The problem was my version of windows, for some reason, was not loading the oci.dll.

After creating a new virtual machine (virtual box) the connection was successful.

Only for information, my settings are:

- Oracle DBExpress Driver (latest version);
- Windows XP;
- Delphi XE Update 2;
- Oracle "10.2g" and Oracle Client "11.02".

The Steps, for future view, the with connect in Oci mode is:

1) Installing (uncompress) Oracle Client in any Folder, in this sample, in "c:\Oracle\InstantClient"

2) In Enviroment Options of windows, in "Path" variable, set the Oracle Instant Client Folder.

2.1) Create a User Variable called "TNS_ADMIN" and set the Oracle Instant Client Folder.


Now everything is working perfectly.

Thanks and sorry for the inconvenience, it had already tried everything and could not connect.

Posted: Wed 22 Feb 2012 13:32
by AlexP
Hello,

Besides the steps you adjusted, for working with Oracle Instant Client, you also can add the following data to the registry

[HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\InstanctClient]
"ORACLE_HOME_NAME"="InstanctClient"
"ORACLE_HOME_KEY"="SOFTWARE\ORACLE\InstanctClient"
"ORACLE_HOME"="С:\Oracle\InstantClient"

and place the Oracle Instatnt Client libraries to С:\Oracle\InstantClient\Bin, and the tnsnames.ora file - to the С:\Oracle\InstantClient\Network\Admin
folder.

In addition, if you don't want to change the registry or the environment variables, you can just copy the Oracle Instatnt Client libraries and the tnsnames.ora file to the folder with an application

Posted: Wed 22 Feb 2012 18:43
by eliseu_corrona
Hi AlexP, fine?
Thanks for your tips. Very intersting.

I'm saved your sugesttions and will testing soon.

Thanks for your attention friend.

Regarsts,

Eliseu Corrona.
JB Software Ltda
Brazil.

Posted: Thu 23 Feb 2012 10:28
by AlexP
Hello,

If you have any other questions, feel free to contact us.

Re: Oracle Connection with OCI Mode

Posted: Fri 31 Aug 2012 04:07
by sharmavd1983
Hi

I am new to OCI mode. I have downloaded dbForge professional trial version.
On database connection screen, Direct checkbox is disabled.

When it can be enabled?
What I need to do to make OCI connection?

please provide me details how to setup OCI connection and how to configure oracle client with dbForge?

Many thanks in advance.....

Re: Oracle Connection with OCI Mode

Posted: Fri 31 Aug 2012 09:54
by alexa
Direct checkbox is disabled when Oracle client is not detected by dbForge. This can be due to Oracle client being not installed or when it's not properly installed. Please also make sure you are using 64-bit Oracle client but not a 32-bit one in case you are running 64-bit operating system.

Please refer to the following article explaining how to correctly configure your Oracle Instant Client so our tools can work with it: http://blogs.devart.com/dbforge/how-to- ... lient.html

Also, please add new posts concerning dbForge products to the relevant forum at: http://forums.devart.com/viewforum.php?f=40

Re: Oracle Connection with OCI Mode

Posted: Fri 31 Aug 2012 12:35
by sharmavd1983
Thank you so much....

Re: Oracle Connection with OCI Mode

Posted: Wed 04 May 2016 06:49
by jub@geb
Hi all,
Alex P mentioned that
AlexP wrote:you can just copy the Oracle Instatnt Client libraries and the tnsnames.ora file to the folder with an application
.
I installed Oracle Client 12 and am wondering which library files I have to copy?
Is it possible to run in OCI Mode on an other PC without installing the Oracle Client there if I copy those files?
This would save the overhead of installing and administering the Client on all PCs.

Hope you can help me
Greetings jub :)

Re: Oracle Connection with OCI Mode

Posted: Thu 05 May 2016 05:45
by AlexP
hello,

You can use Oracle Database Instant Client hhttp://www.oracle.com/technetwork/database/fea ... 97480.html that doesn't require installation. The detailed description about deployment and configuration of this client can be found on the developers' website or on our blog: http://blog.devart.com/how-to-configure ... lient.html .