Can not load Oracle client. Check your PATH environment vari

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Niels Wijnja
Posts: 4
Joined: Wed 25 Aug 2010 10:45
Location: Zoetermeer, The Netherlands

Post by Niels Wijnja » Thu 26 Aug 2010 15:15

Shalex wrote:1. Please specify the exact error message.
2. Does your normal user have access to the PATH variable and to the registry?
1. See http://www.devart.com/forums/viewtopic.php?t=18830
detailed information available in that post.

2. Normal user has been given full control to the Oracle key in HKLM\Software; could you clarify your question about the path variable?
Ofcrouse the user can read the contents of the path variable, otherwise a lot of applications would've stopped working. It's a system variable so the normal user can't change it but definitely read it.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 26 Aug 2010 15:50

Niels Wijnja wrote:2. Normal user has been given full control to the Oracle key in HKLM\Software; could you clarify your question about the path variable?
Ofcrouse the user can read the contents of the path variable, otherwise a lot of applications would've stopped working. It's a system variable so the normal user can't change it but definitely read it.
We recommend you to find out what exactly your normal user is missing in the following way. Create a test project and execute using the "normal user" account

Code: Select all

string path = Environment.GetEnvironmentVariable("PATH");
to find out if your user is allowed to access the PATH variable, and

Code: Select all

RegistryKey keys = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\ORACLE");
to check if your user can access to registry.

Niels Wijnja
Posts: 4
Joined: Wed 25 Aug 2010 10:45
Location: Zoetermeer, The Netherlands

Post by Niels Wijnja » Tue 31 Aug 2010 08:56

Started this as a normal user.
Path returns:

Code: Select all

C:\oracle\10.2.0\client\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\IBM\Director\bin;C:\Program Files\Common Files\IBM\ICC\cimom\bin;C:\Program Files\Windows Imaging\;C:\Program Files\Citrix\System32\Citrix\IMA;C:\Program Files\Citrix\System32\Citrix\IMA\Subsystems;C:\WINDOWS\System32\Citrix\IMA;C:\Program Files\Citrix\system32;C:\Program Files\Common Files\Citrix\System32\;C:\Program Files\Common Files\Citrix\System32;C:\Program Files\Microsoft Application Virtualization Client;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Unit4\Unit 4 Multivers\bin\
Regkey returns:

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
I also have full control for all users on the ORACLE key, so we might want to exclude that.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 02 Sep 2010 15:54

Please make sure that your normal user has access to oci.dll (and to the folder where Oracle Client is installed). Refer to http://forums.asp.net/t/97914.aspx.

devart_mayur
Posts: 3
Joined: Wed 14 Dec 2011 21:35

Can not load Oracle client. Check your PATH environment vari

Post by devart_mayur » Wed 14 Dec 2011 22:07

I was initially getting the error Unable to load oci.dll. That was fixed by adding ASPNET user to the bin folder (security permission)

Now I am getting this error.
I executed these lines of code
string path = Environment.GetEnvironmentVariable("PATH");
RegistryKey keys = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\ORACLE");

path = "C:\FileNet\IDM;C:\FileNet\Shared;C:\ColdFusion8\verity\k2\_nti40\bin;C:\ColdFusion9\verity\k2\_nti40\bin;C:\Program Files\Java\jre6\bin;C:\Oracle\product\10.1.0\Client_1\bin;C:\Oracle\product\10.1.0\Client_1\jre\1.4.2\bin\client;C:\Oracle\product\10.1.0\Client_1\jre\1.4.2\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\WiFi\bin\;c:\Program Files\Borland\StarTeam SDK 10.0\Lib;c:\Program Files\Borland\StarTeam SDK 10.0\Bin;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\TortoiseSVN\bin;C:\FileNet\FNSW\CLIENT\BIN;C:\FileNet\FNSW\CLIENT\SHOBJ;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\CREDANT\Shield v7.1\"
keys = {HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE} Microsoft.Win32.RegistryKey


Code Fails on
return new OracleObject(objectTypeName, (OracleConnection)GetOpenConnection().Connection);

Error Message
Can not load Oracle client. Check your PATH environment variable and registry settings.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 19 Dec 2011 11:56

1. Please move the existing "C:\Oracle\product\10.1.0\Client_1\bin;" entry to the first position in your PATH.
2. Tell us the installation type of your Oracle client (Administrator, Instant Client, etc).
3. Try hints from http://forums.asp.net/t/97914.aspx.

devart_mayur
Posts: 3
Joined: Wed 14 Dec 2011 21:35

The path issue was resolved. But now I get TNS error

Post by devart_mayur » Wed 21 Dec 2011 00:42

I was able to resolve by following the steps at the following link
http://forums.asp.net/p/1012052/1353494.aspx

After restart I above error was resolved. Now however I am getting another error

ORA-12154: TNS:could not resolve the connect identifier specified

Complete message
Devart.Data.Oracle.OracleException was unhandled by user code
Message=ORA-12154: TNS:could not resolve the connect identifier specified
Source=Devart.Data.Oracle
ErrorCode=-2147467259
Code=12154
Offset=0
StackTrace:
at Devart.Data.Oracle.bo.b(Int32 A_0)
at Devart.Data.Oracle.ap.d(Int32 A_0)
at Devart.Data.Oracle.ap.a(t A_0, at A_1)
at Devart.Data.Oracle.OracleInternalConnection..ctor(t connectionOptions, OracleInternalConnection proxyConnection)
at Devart.Data.Oracle.b0.a(j A_0, Object A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, j A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionPoolGroup.a(DbConnectionPool A_0, DbConnectionBase A_1)
at Devart.Common.DbConnectionPool.a(DbConnectionBase A_0)
at Devart.Common.DbConnectionPool.GetObject(DbConnectionBase owningConnection)
at Devart.Common.DbConnectionFactory.a(DbConnectionBase A_0)
at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at Devart.Common.DbConnectionBase.Open()
at Devart.Data.Oracle.OracleConnection.Open()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetNewOpenConnection()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetWrappedConnection()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetOpenConnection()
at Devart.Data.Oracle.EnterpriseLibrary.OracleDatabase.CreateOracleObject(String objectTypeName) in C:\StarTeam\Cash_CWF\Credits Workflow UI\src\lib\DevartEnterpriseLibrary\OracleDatabase.cs:line 251
at Davita.RevenueOperations.CreditsWorkflow.DataAccess.RuleRepository..ctor() in C:\StarTeam\Cash_CWF\Credits Workflow UI\src\Davita.RevenueOperations.CreditsWorkflow.DataAccess\RuleRepository.cs:line 23
at BuildUp_Davita.RevenueOperations.CreditsWorkflow.DataAccess.RuleRepository(IBuilderContext )
at Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context)
at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
InnerException:

I am able to connect to the database using PLSQL developer Devart's Entity Developer and also Visual Studio's Server Explorer.

I am trying to resolve this error for the past one week but with no success. Any idea what could be wrong.

Mayuresh
PS: The same code works on other developers machine.

devart_mayur
Posts: 3
Joined: Wed 14 Dec 2011 21:35

Post by devart_mayur » Wed 21 Dec 2011 17:41

This is very strange. The problem was with my tnsnames.ora.
We have it configured so that the local tnsnames.ora. points to a tsname file on a share drive.

This setup for some reason is not working when I try to connect using the devart dlls. But all other application including PLSQL dev, VS 10. and entity dev are working fine.

When I copied the actual tnsnames containing database connection details locally, the issue was resolved

Just wanted to put it out there for someone having the same setup and problem


Mayuresh

ever;last88az
Posts: 4
Joined: Mon 24 Aug 2015 21:51

Re: Can not load Oracle client. Check your PATH environment vari

Post by ever;last88az » Mon 24 Aug 2015 21:53

Hey Dev Art it shouldn't take 50 responses to get your worthless client working. Maybe we'll switch our company to a provider that doesn't suck so bad.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Can not load Oracle client. Check your PATH environment vari

Post by Pinturiccio » Tue 25 Aug 2015 10:26

Thank you for your feedback. We would be very much obliged to you if you explain what should be improved in our product.

Please give us details about the issue you have encountered:
1. Specify the exact message of the error and its call stack.
2. Which steps should we follow to reproduce it in our environment? A test project will be appreciated.

Looking forward to your reply.

Post Reply