I am having issues with this package. When Dapper tries to open connection (or I try to open it manually in debug mode), Visual Studio 2017 (under Windows 10) fires this exception:
OracleException: Could not allocate the Oracle environment.
System.Data.OracleClient.Oci.OciGlue.CreateConnection(OracleConnectionInfo conInfo)
System.Data.OracleClient.OracleConnectionPoolManager.CreateConnection(OracleConnectionInfo info)
System.Data.OracleClient.OracleConnectionPool.GetConnection()
System.Data.OracleClient.OracleConnection.Open()
Dapper.SqlMapper+<QueryImpl>d__136.MoveNext() in SqlMapper.cs
System.Collections.Generic.List.AddEnumerable(IEnumerable<T> enumerable)
System.Linq.Enumerable.ToList<TSource>(IEnumerable<TSource> source)
So it seems CreateConnection method is firing an error.
Connection string:
string connectionString = "Data Source=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.227)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = MYSERVICENAME)));User ID=myuser;Password=mypass;Unicode=True";
con = new OracleConnection(connectionString); //ok here
con.Open(); //fails
Oracle client 12c is already installed here, other clients and software can connect to Oracle without any issues.
Not sure if this is related to environment variables. I have set all known oracle variables (TNS_ADMIN, ORACLE_HOME, ORACLE_BASE). I also had run Visual Studio as administrator but the exception keeps showing up.
The oracle platform seems to be really old and disheartening. 😞
I am having issues with this package. When Dapper tries to open connection (or I try to open it manually in debug mode), Visual Studio 2017 (under Windows 10) fires this exception:
So it seems CreateConnection method is firing an error.
Connection string:
Oracle client 12c is already installed here, other clients and software can connect to Oracle without any issues.
Not sure if this is related to environment variables. I have set all known oracle variables (TNS_ADMIN, ORACLE_HOME, ORACLE_BASE). I also had run Visual Studio as administrator but the exception keeps showing up.
The oracle platform seems to be really old and disheartening. 😞