Connect Oracle Without installing Oracle Client

General discussion forum about all databases other than SqlBase.
ozmenbetul
Turkey
Posts: 292
Joined: 28 Aug 2019, 08:57
Location: Turkey

Connect Oracle Without installing Oracle Client

Post by ozmenbetul » 17 Jan 2012, 13:25

Hello,
We are using Oracle 10.2 or 11g at the server side. For all client pc we are installing oracle client. but its taking soo much time when installing new pc. Our costumer dont want to install anything except teamdeveloper depoloyment.

is it possible to connect oracle without installing Oracle Client

Thank You

Jeff Luther

Re: Connect Oracle Without installing Oracle Client

Post by Jeff Luther » 17 Jan 2012, 23:37

Hmm, I don't think so. Let me ask... I left a v/m with our router developer. If I hear something like "Yes, you can!" from him, I will let you know. But as far as I am aware, you need an oracle client to talk to an oracle server.

Christof
Germany
Posts: 191
Joined: 06 Mar 2017, 07:27
Location: Frankfurt, Germany

Re: Connect Oracle Without installing Oracle Client

Post by Christof » 18 Jan 2012, 08:06

It is definitely possible to install the Oracle client on a network drive. Client applications just need a proper PATH environment to gain access to the Oracle client.
Path settings can be done from within the application, so no client installation is necessary.

hth,
Christof

ozmenbetul
Turkey
Posts: 292
Joined: 28 Aug 2019, 08:57
Location: Turkey

Re: Connect Oracle Without installing Oracle Client

Post by ozmenbetul » 18 Jan 2012, 10:32

@Christof could you explain more please, did you use by this way before?

Thank You So Much

Sincerly Yours
Betul OZMEN

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3384
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Connect Oracle Without installing Oracle Client

Post by Dave Rabelink » 18 Jan 2012, 15:20

You can also use Oracle Instant Client.

It is a smaller install package which can be deployed using xcopy. So no setup needed.
You can add the runtime files to you app folder during install of your app.

https://www.oracle.com/technetwork/datab ... 00365.html
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Christof
Germany
Posts: 191
Joined: 06 Mar 2017, 07:27
Location: Frankfurt, Germany

Re: Connect Oracle Without installing Oracle Client

Post by Christof » 19 Jan 2012, 08:23

Dave's suggestion is also a good option.

But if your customer does prefer a central client installation on a network drive, your application needs to ensure following:
- the PATH environment variable has to be extended with 'bin'-directory of the Oracle installation,
- the environment variable ORACLE_HOME has to point to the Oracle Client directory,
- the variable NLS_LANG should be set with a proper value, e.g. GERMAN_GERMANY.WE8ISO8859P1 (for a German environment)

All can be done by the application using the APIs SetEnvironmentVariableA/W and GetEnvironmentVariableA/W in kernel32.dll.

Greetings
Christof

mina
Finland
Posts: 27
Joined: 21 Apr 2018, 07:36
Location: Finland

Re: Connect Oracle Without installing Oracle Client

Post by mina » 06 Feb 2012, 12:36

@Christof,
Your solution in that case is the most interesting proposal.
Have you a working sample using these APIs?

Thanks in advance!

Christof
Germany
Posts: 191
Joined: 06 Mar 2017, 07:27
Location: Frankfurt, Germany

Re: Connect Oracle Without installing Oracle Client

Post by Christof » 07 Feb 2012, 08:35

Ok, here you are:

Declare external functions:

Code: Select all

Library name: Kernel32.dll
    ThreadSafe: No
    Function: SetEnvironmentVariableA
        Description:
        Export Ordinal: 0
        Returns
            Boolean: BOOL
        Parameters
            String: LPCSTR
            String: LPCSTR
    Function: GetEnvironmentVariableA
        Description:
        Export Ordinal: 0
        Returns
            Number: DWORD
        Parameters
            String: LPCSTR
            Receive String: LPSTR
            Number: DWORD
(These are the ANSI versions of these APIs. Ensure the correct types for the string parameters, wenn dealing with the Unicode world.)

Setup the environment for current application:

Code: Select all

! Get the Oracle installation path from somewhere...
Set sOraclePath = "L:\\Oracle\\Win"
! Get current PATH environment
Call SalStrSetBufferLength( sPath, 1001 )
Set nSize = GetEnvironmentVariableA( "PATH", sPath, 1000 ) 
! Ensure correct internal string representation
Set sPath = SalStrLeftX( sPath, nSize )
! Expand PATH
Set sPath = sOraclePath || "\\bin;" || sPath
Call SetEnvironmentVariableA( "PATH", sPath )
! Set Oracle Home
Call SetEnvironmentVariableA( "ORACLE_HOME", sOraclePath )
! Set required language support
Call SetEnvironmentVariableA( "NLS_LANG", "GERMAN_GERMANY.WE8ISO8859P1" )
Greetings
Christof

mina
Finland
Posts: 27
Joined: 21 Apr 2018, 07:36
Location: Finland

Re: Connect Oracle Without installing Oracle Client

Post by mina » 10 Feb 2012, 19:18

Thanks - very useful !!

We also have german enviroment with some engl and some german xp pc's.
Every oracle client installation added GERMAN_GERMANY.WE8MSWIN1252
and not WE8ISO8859P1 in the registry.
Should we replace it?

ozmenbetul
Turkey
Posts: 292
Joined: 28 Aug 2019, 08:57
Location: Turkey

Re: Connect Oracle Without installing Oracle Client

Post by ozmenbetul » 01 Mar 2012, 08:45

@Christof 's answer solve all problem. Thank you soo much

micsto
Germany
Posts: 986
Joined: 07 Mar 2017, 16:07
Location: Germany

Re: Connect Oracle Without installing Oracle Client

Post by micsto » 01 Mar 2012, 13:00

We are using a combination of Oracle Instant Client and setting the appropriate environment variables on startup.
Works like a charm, and there's no need to perform an oracle client installation. A simple network folder with the Oracle Instant Client files + a tnsnames.ora is sufficient.

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests