I use Oracle.DataAccess.Client in Powershell to access Oracle database.
New-Object -TypeName Oracle.DataAccess.Client.OracleConnection($connstring)
If I run this script in an Administrator mode console, it works very well.
But if I run the script in the normal mode console, I get this error
"Exception calling ".ctor" with "0" argument(s): "The type initializer for'Oracle.DataAccess.Client.OracleConnection' threw an exception."
The inner exceptions, and statcktrace:
"Unable to load DLL 'OraOps12.dll': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))" at Oracle.DataAccess.Client.OpsInit.CheckVersionCompatibility(String version) at Oracle.DataAccess.Client.OracleInit.Initialize() at Oracle.DataAccess.Client.OracleConnection..cctor()
I have assgined the user the full control to Oraops12.dll, why I still get this error? What do I miss?
User contributions licensed under CC BY-SA 3.0