Oracle provider error! Please help!

B

Bruce Whitehouse

I've developed some code on my laptop and all works fine. So I know its not
the code.

I've since installed the Oracle provider for .NET on our server and I've
used the copy project (in VS.NET) to move all the code over. However, as
soon as I try to open a connection to Oracle I get the following error....

-------------------------------------------------------------------

System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. ---> System.Exception: Could not create an
environment: OCIEnvCreate returned -1.
at System.Data.OracleClient.DBObjectPool.GetObject(Object owningObject,
Boolean& isInTransaction)
at
System.Data.OracleClient.OracleConnectionPoolManager.GetPooledConnection(Str
ing encryptedConnectionString, OracleConnectionString options,
OracleConnection owningObject, Boolean& isInTransaction)
at
System.Data.OracleClient.OracleConnection.OpenInternal(OracleConnectionStrin
g parsedConnectionString, Object transact)
at System.Data.OracleClient.OracleConnection.Open()
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo
culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo
culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.VisualBasic.CompilerServices.LateBinding.FastCall(Object o,
MethodBase method, ParameterInfo[] Parameters, Object[] args, Type objType,
IReflect objIReflect)
at
Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object
o, Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack, Boolean IgnoreReturn)
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack)
at readAS400s.clsErrorLog.LogError(String strIdsConnectionString, String
strTerminalName, String strErrorDescription) in
C:\Inetpub\ALFA\readAS400s\classes\clsErrorLog.vb:line 24
at readAS400s.clsPopulate.clearIDS(String strConnectionString, String
strTerminalName) in C:\Inetpub\ALFA\readAS400s\populate.asmx.vb:line 108

-------------------------------------------------------------------

Has anyone seen this before or have any idea why I'm getting this error?

regards,
Bruce
 
M

Miha Markic

Hi Bruce,

Did you install Oracle Client of server?
Is your app asp.net?
In that case make sure that aspnet user has access to bin folder of Oracle.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

Bruce Whitehouse said:
I've developed some code on my laptop and all works fine. So I know its not
the code.

I've since installed the Oracle provider for .NET on our server and I've
used the copy project (in VS.NET) to move all the code over. However, as
soon as I try to open a connection to Oracle I get the following error....

-------------------------------------------------------------------

System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. ---> System.Exception: Could not create an
environment: OCIEnvCreate returned -1.
at System.Data.OracleClient.DBObjectPool.GetObject(Object owningObject,
Boolean& isInTransaction)
at
System.Data.OracleClient.OracleConnectionPoolManager.GetPooledConnection(Str
ing encryptedConnectionString, OracleConnectionString options,
OracleConnection owningObject, Boolean& isInTransaction)
at
System.Data.OracleClient.OracleConnection.OpenInternal(OracleConnectionStrin
g parsedConnectionString, Object transact)
at System.Data.OracleClient.OracleConnection.Open()
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo
culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo
culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.VisualBasic.CompilerServices.LateBinding.FastCall(Object o,
MethodBase method, ParameterInfo[] Parameters, Object[] args, Type objType,
IReflect objIReflect)
at
Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object
o, Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack, Boolean IgnoreReturn)
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack)
at readAS400s.clsErrorLog.LogError(String strIdsConnectionString, String
strTerminalName, String strErrorDescription) in
C:\Inetpub\ALFA\readAS400s\classes\clsErrorLog.vb:line 24
at readAS400s.clsPopulate.clearIDS(String strConnectionString, String
strTerminalName) in C:\Inetpub\ALFA\readAS400s\populate.asmx.vb:line 108

-------------------------------------------------------------------

Has anyone seen this before or have any idea why I'm getting this error?

regards,
Bruce
 
B

Bruce Whitehouse

Miha,
Did you install Oracle Client of server?

Do you mean 'Oracle Client or server?'? It's on the same server as
Oracle itself. I've created an ODBC conenction and can connect locally
through SQL Runner and perform queries. So I can only assume that the
Oracle Client is correctly installed.
Is your app asp.net?
Yes it is.
In that case make sure that aspnet user has access to bin folder of
Oracle.
The ASPNET user has access to the bin folder with the following
permisions...
Read & Execute
List Folder Contents
Read

I still get the exact same error.

Bruce


Miha Markic said:
Hi Bruce,

Did you install Oracle Client of server?
Is your app asp.net?
In that case make sure that aspnet user has access to bin folder of Oracle.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

Bruce Whitehouse said:
I've developed some code on my laptop and all works fine. So I know its not
the code.

I've since installed the Oracle provider for .NET on our server and I've
used the copy project (in VS.NET) to move all the code over. However, as
soon as I try to open a connection to Oracle I get the following error....

-------------------------------------------------------------------

System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. ---> System.Exception: Could not create an
environment: OCIEnvCreate returned -1.
at System.Data.OracleClient.DBObjectPool.GetObject(Object owningObject,
Boolean& isInTransaction)
at
System.Data.OracleClient.OracleConnectionPoolManager.GetPooledConnection(Str
ing encryptedConnectionString, OracleConnectionString options,
OracleConnection owningObject, Boolean& isInTransaction)
at
System.Data.OracleClient.OracleConnection.OpenInternal(OracleConnectionStrin
g parsedConnectionString, Object transact)
at System.Data.OracleClient.OracleConnection.Open()
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo
culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo
culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.VisualBasic.CompilerServices.LateBinding.FastCall(Object o,
MethodBase method, ParameterInfo[] Parameters, Object[] args, Type objType,
IReflect objIReflect)
at
Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object
o, Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack, Boolean IgnoreReturn)
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack)
at readAS400s.clsErrorLog.LogError(String strIdsConnectionString, String
strTerminalName, String strErrorDescription) in
C:\Inetpub\ALFA\readAS400s\classes\clsErrorLog.vb:line 24
at readAS400s.clsPopulate.clearIDS(String strConnectionString, String
strTerminalName) in C:\Inetpub\ALFA\readAS400s\populate.asmx.vb:line 108

-------------------------------------------------------------------

Has anyone seen this before or have any idea why I'm getting this error?

regards,
Bruce
 
M

Miha Markic

Hi Bruce,

Bruce Whitehouse said:
Miha,


Do you mean 'Oracle Client or server?'? It's on the same server as
Oracle itself. I've created an ODBC conenction and can connect locally
through SQL Runner and perform queries. So I can only assume that the
Oracle Client is correctly installed.

I did mean Client *on* server.
Actually you need to instal OleDb Oracle provider explicitly if I remember
correctly.
Can you check?
Your app uses OleDb while you've tested only with ODBC.
 
B

Bruce Whitehouse

Miha

We've checked the Oracle install and according to the Oracle Setup
(installer) we do have the OLE DB driver installed.

Bruce
 
M

Miha Markic

Oracle.
The ASPNET user has access to the bin folder with the following
permisions...
Read & Execute
List Folder Contents
Read

I still get the exact same error.

Does it have access to all folders in path?
I can't stop thinking of ntfs security issues..
 
L

Lyndon Hills

Does it have access to all folders in path?
I can't stop thinking of ntfs security issues..
It's also going to need access to /oracle_home/network/admin.

Depending on the method you use to locate your databases sqlnet.ora
and tnsnames.ora live here. There are other folders with messages,
although maybe these are only need with tools like sqlplus...
 
B

Bruce Whitehouse

Miha

Yes - the ASP.NET user has the persmissions on all folders in the Oracle
directory.

Bruce
 
T

Todd

I'm getting the same problem as described below. ASPNET
has full access to c:\Oracle\ORA817\bin directory. I just
tried to download Oracle's provider software for .NET from
Oracle around 11/25. I could not get it working. But
after, I was using "Microsoft OLE DB Provider for Oracle"
and things worked fine. Now, 12/01, I get this error as
soon as a try a .Fill on the OracleDataAdapter??? Also,
now TOAD is not working!

HELP!

Thanks!

Todd

-----Original Message-----
Miha,
Did you install Oracle Client of server?

Do you mean 'Oracle Client or server?'? It's on the same server as
Oracle itself. I've created an ODBC conenction and can connect locally
through SQL Runner and perform queries. So I can only assume that the
Oracle Client is correctly installed.
Is your app asp.net?
Yes it is.
In that case make sure that aspnet user has access to
bin folder of
Oracle.
The ASPNET user has access to the bin folder with the following
permisions...
Read & Execute
List Folder Contents
Read

I still get the exact same error.

Bruce


Miha Markic said:
Hi Bruce,

Did you install Oracle Client of server?
Is your app asp.net?
In that case make sure that aspnet user has access to
bin folder of
Oracle.
--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

fine. So I know its
not
code over. However,
as the following
error.... Exception has been thrown
by (Object
owningObject,
System.Data.OracleClient.OracleConnectionPoolManager.GetPo oledConnection(Str
System.Data.OracleClient.OracleConnection.OpenInternal (OracleConnectionStrin
System.Reflection.RuntimeMethodInfo.InternalInvoke(Object
obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo
culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
at
System.Reflection.RuntimeMethodInfo.InternalInvoke(Object
obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo
culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke
(Object obj,
BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at
Microsoft.VisualBasic.CompilerServices.LateBinding.FastCall
(Object
o,
MethodBase method, ParameterInfo[] Parameters, Object
[] args, Type
objType,
IReflect objIReflect)
at
Microsoft.VisualBasic.CompilerServices.LateBinding.Interna lLateCall(Object
o, Type objType, String name, Object[] args, String[]
paramnames,
Boolean[]
CopyBack, Boolean IgnoreReturn)
at
Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall
(Object
o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack)
at readAS400s.clsErrorLog.LogError(String
strIdsConnectionString,
String
strTerminalName, String strErrorDescription) in
C:\Inetpub\ALFA\readAS400s\classes\clsErrorLog.vb:line 24
at readAS400s.clsPopulate.clearIDS(String strConnectionString, String
strTerminalName) in C:\Inetpub\ALFA\readAS400s\populate.asmx.vb:line 108

------------------------------------------------------ -------------

Has anyone seen this before or have any idea why I'm getting this error?

regards,
Bruce


.
 
L

Lyndon Hills

I'm getting the same problem as described below. ASPNET
has full access to c:\Oracle\ORA817\bin directory. I just
tried to download Oracle's provider software for .NET from
Oracle around 11/25. I could not get it working. But
after, I was using "Microsoft OLE DB Provider for Oracle"
and things worked fine. Now, 12/01, I get this error as
soon as a try a .Fill on the OracleDataAdapter??? Also,
now TOAD is not working!

HELP!

Thanks!

Todd
Do you now have more than one oracle_home? this is workable, at least
if everything is from oracle, but maybe tricky if you're using bits
from oracle and bits from microsoft. Oracle's .NET provider requires
the 9.2 client to be installed, and perhaps this has caused your
problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top