Cast 'ManagedDataAccess.Client' to 'DataAccess.Client'

I get the error "Unable to cast object of type 'Oracle.ManagedDataAccess.Client.OracleConnection' to type 'Oracle.DataAccess.Client.OracleConnection'." when try to do something like
EntityConnectionStringBuilder myConn = new EntityConnectionStringBuilder();
myConn.Provider = "Oracle.ManagedDataAccess.Client";
myConn.ProviderConnectionString = "user id=****;password=*****;DATA SOURCE=****:1521/****";
myConn.Metadata = @"res://*/Model1.csdl|
res://*/Model1.ssdl|
res://*/Model1.msl";
new Entities1(myConn.ToString());
Suggestions?

If you have an .edmx model, there's a reference in it to Oracle.DataAccess near the top. You need to change that to Oracle.ManagedDataAccess in order to use the managed client with it.

Similar Messages

  • How to specifiy the provider to be Oracle.ManagedDataAccess.Client when creating a dynamic connection string with EF Code First from Database?

    I am trying to use the relatively new Code First from Database with the newest EF (6.x) and on an Oracle database (11g, but I have installed the newest ODTwithODAC). First of all, it works fine as long as the connection string is inside the App.Config file. But when I try to build it dynamically in the C# code (or rather, statically at the moment) it fails. I have it working with a dynamically built connection string when doing Model from Database though, so I'm at a loss right now.
    First, I have created a second constructor for the context class that takes a string and does base(connectionString). Then I build the connection string via
    OracleConnectionStringBuilder oracleBuilder = new OracleConnectionStringBuilder();
    oracleBuilder.DataSource = "TEST.BLA.COM";
    oracleBuilder.UserID = "ABC";
    oracleBuilder.Password = "abc";
    oracleBuilder.PersistSecurityInfo = true;
    string connection = oracleBuilder.ToStrin();
    Now trying to open an EntityConnection by giving to it this provider-specific connection string (or even the static one from the App.Config) doesn't work; I get "keyword not supported: user id"). Trying it by creating a context and giving this connection string doesn't work either. I'm pretty sure that this is because I didn't specify the provider to use; after all, it should use the Oracle.ManagedDataAccess.Client provider and not an SQL Server based one.
    I then tried to get around this by using an EntityConnectionStringBuilder on top and specifying the provider keyword there, but then I get "keyword not supported: provider" when using it in the context constructor, and "the 'metadata' keyword is always required" when using it with the EntityConnection constructor.
    As I said above: I bet it's the provider that I have to specify somehow, but I don't know how. The code that does work is the following:
    using (var context = new Model())
    context.Database.Connection.Open();
    context.Database.Connection.Close();
    When I read context.Database.Connection.ConnectionString, it is exactly the provider-specific connection string I created above, but I don't know where to specify the provider again. Do you know of any way to do this? Certainly there must be one.
    PS: I have also posted this question on http://stackoverflow.com/questions/27979454/ef-code-first-from-database-with-managed-oracle-data-access-dynamic-connection because it is quite urgent and I'd like to use Code First from Database. Otherwise I'd have to go "back" to using Model from Database again, which is not ideal because we have updatable views where the .edmx-file has to be edited after every reload of the model, while with Code First from DB inserting into the view automatically works.

    I am trying to use the relatively new Code First from Database with the newest EF (6.x) and on an Oracle database (11g, but I have installed the newest ODTwithODAC). First of all, it works fine as long as the connection string is inside the App.Config file. But when I try to build it dynamically in the C# code (or rather, statically at the moment) it fails. I have it working with a dynamically built connection string when doing Model from Database though, so I'm at a loss right now.
    First, I have created a second constructor for the context class that takes a string and does base(connectionString). Then I build the connection string via
    OracleConnectionStringBuilder oracleBuilder = new OracleConnectionStringBuilder();
    oracleBuilder.DataSource = "TEST.BLA.COM";
    oracleBuilder.UserID = "ABC";
    oracleBuilder.Password = "abc";
    oracleBuilder.PersistSecurityInfo = true;
    string connection = oracleBuilder.ToStrin();
    Now trying to open an EntityConnection by giving to it this provider-specific connection string (or even the static one from the App.Config) doesn't work; I get "keyword not supported: user id"). Trying it by creating a context and giving this connection string doesn't work either. I'm pretty sure that this is because I didn't specify the provider to use; after all, it should use the Oracle.ManagedDataAccess.Client provider and not an SQL Server based one.
    I then tried to get around this by using an EntityConnectionStringBuilder on top and specifying the provider keyword there, but then I get "keyword not supported: provider" when using it in the context constructor, and "the 'metadata' keyword is always required" when using it with the EntityConnection constructor.
    As I said above: I bet it's the provider that I have to specify somehow, but I don't know how. The code that does work is the following:
    using (var context = new Model())
    context.Database.Connection.Open();
    context.Database.Connection.Close();
    When I read context.Database.Connection.ConnectionString, it is exactly the provider-specific connection string I created above, but I don't know where to specify the provider again. Do you know of any way to do this? Certainly there must be one.
    PS: I have also posted this question on http://stackoverflow.com/questions/27979454/ef-code-first-from-database-with-managed-oracle-data-access-dynamic-connection because it is quite urgent and I'd like to use Code First from Database. Otherwise I'd have to go "back" to using Model from Database again, which is not ideal because we have updatable views where the .edmx-file has to be edited after every reload of the model, while with Code First from DB inserting into the view automatically works.

  • Oracle.ManagedDataAccess.Client Operating System Authentication

    Hi.
    I am trying to get OSA to work with Oracle.ManagedDataAccess.Client, is this not supported?
    I get the following Error: ORA-01017: invalid username/password; logon denied
    Here are some of the variations of connection string, I have been testing with.
    Data Source=BLA.BLA.COM;
    Data Source=BLA.BLA.COM;User Id=/;
    Data Source=BLA.BLA.COM;Integraded Security=SSPI;
    Data Source=BLA.BLA.COM;Trusted Connection=True;
    Data Source=BLA.BLA.COM;User Id=/;Integraded Security=SSPI;
    Data Source=BLA.BLA.COM;User Id=/;Trusted Connection=True;
    Integrated Security and Trusted Connection gives me, unknown or illegal connection string attribute errors.
    My first assumption would be that my Operating System Account doesn't have access to the Oracle Database I am trying to log on to.
    But I am fully capable of connecting to the database with OSA with sqlplus, sqldeveloper and toad.
    Can somebody explain to me why this isn't working? And what I may do to fix it?
    It may be worth mentioning that I am trying to use the 12c x86 ODP.NET Managed Provider, against 11g/11.2 Oracle Databases.

    That's correct. Kerberos is not currently supported by managed ODP.NET. We are working to support this feature, but don't have an ETA on when it will be available.
    What company or organization is requesting this feature?
    I believe there's an open feature request for Kerberos support in the Oracle .NET Feature Request Tool. Fee free to add your vote to this request.

  • Oracle.manageddataaccess.client with C# + Silverlight with Ria Services

    Hello guys.
    First of all, my project was ok before I formated my PC. (C# + Silverlight + Oracle)
    Now, when I try to run the project I receive a follow message:
    "The "CreateRiaClientFilesTask" task failed unexpectedly.
    System.Web.HttpException (0x80004005): Unrecognized configuration section oracle.manageddataaccess.client."
    My Web.config:
      <oracle.manageddataaccess.client>
        <version number="*">
          <settings>
            <setting name="TNS_ADMIN" value="C:\instantclient"/>
          </settings>
        </version>
      </oracle.manageddataaccess.client>
    </configuration>
    Any help?
    Thanks in advance.
    Luis Patroni

    Perfectly.
    I just put the follow code in my web.config file.
      <configSections>
        <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess" />
      </configSections>
    Thanks for your help.

  • Bug: in ManagedDataAccess while fetch from "Select .., NULL, ... From dual"

    Hi,
    I have the problem with the new managed ODP.Net driver.
    If I fetch data from a select which has column with a fixed value "NULL" the driver decides after a certain amount of data that the value is not null any more. Which causes a lot of problems especially if you try to hide not needed blob data.
    The Problem somehow depends on the FetchSize of the command. It seems like the error occurs if more than one db round trip to fetch the result is necessary.
    System: Windows 7 64 Bit
    Platform: .net 4.0 x86
    database: 11g Release 11.2.0.3.0 - 64bit Production
    Oracle.ManagedDataAccess Version: 4.112.350
    I created a small example to reproduce the problem.
    Thanks for your help
    Dominik
    Stored Proc:
    create or replace PROCEDURE TestNullField
      v_IntPara IN NUMBER DEFAULT NULL ,
      v_StrPara IN VARCHAR2 DEFAULT NULL,
      cv_1 OUT SYS_REFCURSOR
    AS
    BEGIN
          OPEN cv_1 FOR
            select rownum, v_StrPara, NULL from dual connect by level <= v_IntPara;
            --select IDX, NULL, DESCRIPTION FROM TEST_BLOBTABLE;
    END;C# Code:
    using System;
    using System.Text;
    using Oracle.ManagedDataAccess.Client;
    using System.Data;
    namespace OracleBlobTest
        class Program
            private static string _connectionString = @"User ID=YourUser;Password=YourPwd;Data Source=YourServer:YourPort/YourSchema;";
            private static string _spName = @"TestNullField";
            private static string _strPara = @" Long test string";
            private static int _intPara = 200;
            static void Main(string[] args)
                using (OracleConnection connection = new OracleConnection(_connectionString))
                    using (OracleCommand cmd = connection.CreateCommand())
                        cmd.CommandText = _spName;
                        cmd.CommandType = CommandType.StoredProcedure;
                        connection.Open();
                        string alongString = _strPara;
                        while (alongString.Length < 2000)
                            alongString += alongString;
                        alongString = alongString.Substring(0, 2000);
                        OracleCommandBuilder.DeriveParameters(cmd);
                        if (cmd.Parameters.Count > 0 && (cmd.Parameters[0]).Direction != ParameterDirection.ReturnValue)
                            cmd.Parameters[0].Value = _intPara;
                            cmd.Parameters[1].Value = alongString;
                        // change this to change the moment when it starts to go wrong
                        ///cmd.FetchSize = 5000;
                        using (OracleDataReader reader = cmd.ExecuteReader())
                            int count = 0;
                            while (reader.Read())
                                count++;
                                for (int idx = 0; idx < reader.FieldCount; idx++)
                                    if (reader.GetName(idx) == "NULL")
                                        if (!reader.IsDBNull(idx))
                                            //something is very wrong here - why is not not null any more???
                                            Console.WriteLine("Fix NULL Field[{0}] {1} is not null >{2}< in row {3} ", idx, reader.GetName(idx), reader[idx], count);
                            Console.WriteLine("Rows found: " + count);
                    connection.Close();
                Console.WriteLine("done press enter");
                Console.ReadLine();
    }Edited by: user540519 on 10.12.2012 15:11
    Edited by: user540519 on 19.12.2012 13:50

    Hello
    I ran the testcase here and reproduced the issue on 32 bit unmanaged beta v4.0.30319
    note: same testcase works with Oracle.DataAccess (but not with managed).
    This appears to match unpublished defect Bug 14666093 and is meant to be fixed in a later beta release.
    Some things I noticed when testing
    with the default fetchsize the breaking point is 67 iterations.
    e.g.
    private static int _intPara = 66;    // Works
    private static int _intPara = 67;  // Fails
    If I increase the fetchsize then it breaks at different values as you noticed..
    Hope this helps.
    Kind Regards
    John

  • Using CASE and CAST in a INSERT statment

    Can I have a CASE condition or a CAST condition within an INSERT statement?
    For example:
    Insert into table1 (
    Value1,
    Value2,
    Value3,
    Value4)
    Select
    Seq1.nextval,
    Case when (color.grade in (6,5,7,8) or color.grade2 in (6,5,7,8,11,12)
    Then 2
    Else 1
    End case,
    ‘GREAT’,
    CAST(color.client as varchar2)
    From color;
    Must I specify a column name in the CASE statement? If so, how can I do it if it is based on values from 2 columns?

    Satyaki_De wrote:
    Yes.
    A little modification in your query ->
    Insert into table1(
    Value1,
    Value2,
    Value3,
    Value4
    Select Seq1.nextval Value1,
    Case
    when color.grade in (6,5,7,8)
    or color.grade2 in (6,5,7,8,11,12) Then
    2
    Else
    1
    End case Value2,
    ‘GREAT’ Value3,
    CAST(color.client as varchar2) Value4
    From color;Regards.
    Satyaki De.I don't think that the "END CASE" is supported in SQL, it's the PL/SQL syntax of the CASE statement that requires an END CASE.
    In addition if you cast to VARCHAR2 you need to specify the length of the VARCHAR2, e.g. VARCHAR2(100).
    So the statement probably should look something like this (untested):
    Insert into table1(
                       Value1,
                       Value2,
                       Value3,
                       Value4
    Select Seq1.nextval Value1,
           Case
           when color.grade in (6,5,7,8)
             or color.grade2 in (6,5,7,8,11,12)
           Then
             2
           Else
             1
           End Value2,
           'GREAT' Value3,
           CAST(color.client as varchar2(100)) Value4
    From color;Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Exception ORA-12537: Network Session: End of file, Oracle.ManagedDataAccess

    My environment:
    > Oracle 11g expression edition in Win7 ("DevDB")
    > Oracle 11g in non-Windows platform ("ProDB")
    > Oracle.ManagedDataAccess.dll (file version is 4.121.1.0, product version is 4.121.1.20131211)
    > Instant client sqlplus
    If I use sqlplus to connect "DevDB" and "ProDB" with following command, both DBs can be connected successfully.
    > sqlplus someUser@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx.xxx.xxx)(PORT=1521))(CONNECT_DATA=(SID=DBSID)))
    If I use following codes with Oracle.ManagedDataAccess.dll to connect DBs.
    string connectionString = "User Id=someUser;Password=somePwd;Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx.xxx.xxx)(PORT=1521))(CONNECT_DATA=(SID=DBSID)))";
    OracleConnection con = new OracleConnection(connectionString);
    try{
      con.Open();
    } catch (Exception e) {
      Console.WriteLine(e.Message);
      Console.WriteLine(e.StackTrace);
    } finally {
      if (con != null)
      con.Dispose();
    It can connect to "DevDB" successfully. However, when I try to connect "ProDB", it throws following exception.
    ORA-12537: Network Session: End of file
       at OracleInternal.ConnectionPool.PoolManager`3.CreateNewPR(Int32 reqCount, Boolean bForPoolPopulation, ConnectionString csWithDiffOrNewPwd, String instanceName)
       at OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)
       at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)
       at OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword)
       at Oracle.ManagedDataAccess.Client.OracleConnection.Open()
    Any tips to fix this problem?
    Thanks

    I added following settings in app.config file
      <configSections>
        <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess" />
      </configSections>
      <oracle.manageddataaccess.client>
        <version number="*">
          <settings>
            <setting name="SQLNET.AUTHENTICATION_SERVICES" value="all"/>
            <setting name="NAMES.DIRECTORY_PATH" value="ezconnect"/>
          </settings>
        </version>
      </oracle.manageddataaccess.client>
    Still failed, sometimes it throws "ORA-12537: Network Session: End of file", sometimes throws "ORA-03135: Connection lost contact".
    As ORA-12537 after change to Oracle.ManagedDataAcess.dll mentioned, it works without any problem with the unmanaged library.Please advice, thx.

  • ManagedDataAccess OracleConnection.close is extremely slow

    In a vb.net app we use Oracle.ManagedDataAccess.dll (version version 4.112.3.50) to read 1000s of records of a ResultSet.  Once the records are read and processed, we call connection.close() which takes 15 minutes or more to complete.  The more records read the longer the close takes.
    Any insights into what might be causing the slowness would be greatly appreciated.
    This is a minimized code example:
    dbcon = New OracleConnection()
    dbcon.Open()
    cmd = New OracleCommand(sqlString, dbcon)
    reader OracleDataReader = cmd.ExecuteReader(CommandBehavior.SingleResult)
    While (reader.Read())
      'consume and process record
    End While
    reader.Dispose()
    cmd.Dispose()
    dbcon.Dispose()
    thank you,
    Stephen

    Are you saying that the the Con.Close call itself takes 15 minutes?    Or are you just stating the entire operation takes 15 minutes?
    How big are the records you're fetching, and what are the data types?
    I just tested the following, and total elapsed time was ~62 seconds.  That was against a remote database that is rather slow though.    Just for grins, I then ran it with against my local database, and elapsed time was ~3 seconds.
    It may be worth having your network guys look into the behavior to see if it may be just a slow network issue.
    Greg
    create table par_test as select rownum r, lpad('x',4000,'x') x , lpad('y',4000,'y') y , lpad ('z',1000,'z') z from dual connect by level<=10000;
    using System;
    using System.Data;
    using Oracle.ManagedDataAccess.Client;
    using Oracle.ManagedDataAccess.Types;
    public class SimpleReader
        public static void Main()
            OracleConnection con = new OracleConnection("user id=scott;password=tiger;data source=orcl");
            con.Open();
            OracleCommand cmd = new OracleCommand("select * from par_test", con);
            DateTime start = DateTime.Now;
            OracleDataReader rdr = cmd.ExecuteReader(CommandBehavior.SingleResult);
            while (rdr.Read())
                Console.Write(".");
            // Console.WriteLine(rdr[0].ToString() + rdr[1].ToString() + rdr[2].ToString(););
            Console.WriteLine("\n elapsed fetch : {0}s",(DateTime.Now - start).TotalSeconds);
            rdr.Dispose();
            cmd.Dispose();
            con.Dispose();
            Console.WriteLine("\n after dispose : {0}s",(DateTime.Now - start).TotalSeconds);

  • Oracle.ManagedDataAccess raise ORA-03135: Connection lost contact

    Hi,
    I am trying to connect to Oracle RAC using Oracle.ManagedDataAccess.dll 4.121.2.0 (latest release)
    All instances fail to run and raise the exception OracleInternal.Network.NetworkException (0x80004005): ORA-03135: Connection lost contact ---> System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
    Except one instance it works fine…, I want to know what is the difference that made it run…, also I was able to connect using the unmanaged driver and the old driver and using sqlplus..
    The DBA sees the connection with this error:
    opiodr aborting process unknown ospid (6904) as a result of ORA-609
    Below the code, App.config, and Trace result, I am showing both the bad connection (badConn) and good connection (goodConn)
    Code:
    string constr1 = "DATA SOURCE=badConn;"; // or GoodConn;
    string constr2 = "USER ID=scott;Password=tiger;";
    string constr3 = "persist security info=True;Self Tuning=True;Min Pool Size=3;Max Pool Size=12;Incr Pool Size=3;Decr Pool Size=1;Connection Timeout=20;Connection Lifetime=59;";
                Oracle.ManagedDataAccess.Client.OracleConnection conn1;
    string constr = constr1 + constr2;// +constr3; I tried with and without the third part
    using (conn1 = new Oracle.ManagedDataAccess.Client.OracleConnection(constr))
    try
                        conn1.Open();
    Console.WriteLine(constr1 + "  connected sucessfully...");
    catch (Exception e)
    Console.WriteLine(e.Message);
    //throw;
    Configuration file:
      <oracle.manageddataaccess.client>
        <version number="4.121.2.0">
          <dataSources>
            <dataSource alias="badConn" descriptor="(DESCRIPTION =
              (ADDRESS_LIST =(ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.x)(PORT=1593)))
              (CONNECT_DATA =(SERVICE_NAME= oclp1)))"/>
            <dataSource alias="GoodConn" descriptor="(DESCRIPTION = (ADDRESS_LIST =(ADDRESS=(PROTOCOL=TCP)(HOST=address.com)(PORT=1582)))(CONNECT_DATA = (SERVICE_NAME= oclp2)))"/>
          </dataSources>
          <settings>
            <setting name="TNS_ADMIN" value="D:\Oracle\product\product\12.1.0\client_1\Network\Admin\Sample\" />
            <setting name="ORACLE_HOME" value="D:\Oracle\product\product\12.1.0\client_1" />
            <setting name="TraceLevel" value="7" />
            <setting name="TraceFileLocation" value="D:\"/>
          </settings>
        </version>
      </oracle.manageddataaccess.client>
    Trace result
    Good connection:
    2015-04-20 19:51:38.231722 TID:11  (PRI) (ENT) (CP) PoolManager`3.CreateNewPRThreadFunc()
    2015-04-20 19:51:38.235722 TID:11  (PRI) (SVC) (ENT) OracleConnectionImpl.Connect() (oper=open) (aff=n/a) (inst=) (affmatch=n/a) (sessid=-1:-1) (F;F;F;;N) (pmid=23686174)
    2015-04-20 19:51:38.237722 TID:11  (PRI) (BUF) (COBP.CTOR) (poolid:1) (parentpoolid:31609076) (OracleConnectionImpl.Connect)
    2015-04-20 19:51:38.259725 TID:11  (PRI) (BUF) (ALLOCATION) (bufid:1)
    2015-04-20 19:51:38.324731 TID:11  (NET) (REC) 00 00 00 00 00 00 00 00   |........|
    2015-04-20 19:51:38.325731 TID:11  (PRI) (BUF) (ALLOCATION) (bufid:2)
    2015-04-20 19:51:38.325731 TID:11  (NET)      NS Handshake completed successfully
    2015-04-20 19:51:38.325731 TID:11  (NET)      Negotiated SDU size = 8192
    2015-04-20 19:51:38.326731 TID:11  (PRI) (BUF) (ALLOCATION) (bufid:3)
    2015-04-20 19:51:38.326731 TID:11  (PRI) (BUF) (OBP.GET) (poolid:31609076) (key:8192) (bufid:3) (count:0) (ConOraBufPool.Init)
    2015-04-20 19:51:38.327731 TID:11  (PRI) (BUF) (COBP.PUT) (poolid:1) (key:8192) (bufid:3) (count:1) (OracleConnectionImpl.Connect)
    2015-04-20 19:51:38.328732 TID:11  (PRI) (BUF) (COBP.PUT) (poolid:1) (key:8192) (bufid:10) (count:8) (OracleConnectionImpl.Connect)
    2015-04-20 19:51:38.330732 TID:11  (PRI) (BUF) (COBP.GET) (poolid:1) (key:8192) (bufid:10) (count:7) (OraBufWriter.Initialize)
    2015-04-20 19:51:38.331732 TID:11  (PRI) (SVC) (ENT) OracleConnectionImpl.DoProtocolNegotiation()
    2015-04-20 19:51:38.331732 TID:11  (PRI) (TTC) (ENT) TTCProtocolNegotiation.WriteMessage()
    2015-04-20 19:51:38.332732 TID:11  (PRI) (TTC) (ENT) TTCMessage.WriteTTCCode()
    2015-04-20 19:51:38.332732 TID:11  (PRI) (TTC) (EXT) TTCMessage.WriteTTCCode()
    2015-04-20 19:51:38.332732 TID:11  (PRI) (TTC) (EXT) TTCProtocolNegotiation.WriteMessage()
    2015-04-20 19:51:38.333732 TID:11  (NET) (SND) 00 1D 00 00 06 00 00 00   |........|
    2015-04-20 19:51:38.333732 TID:11  (NET) (SND) 00 00                     |..      |
    2015-04-20 19:51:38.333732 TID:11  (NET) (SND) 01 06 00 4F 44 50 2E 4E   |...ODP.N|
    2015-04-20 19:51:38.333732 TID:11  (NET) (SND) 45 54 5F 4D 61 6E 61 67   |ET_Manag|
    2015-04-20 19:51:38.333732 TID:11  (NET) (SND) 65 64 00                  |ed.     |
    2015-04-20 19:51:38.334732 TID:11  (PRI) (TTC) (ENT) TTCProtocolNegotiation.ReadResponse()
    2015-04-20 19:51:38.335732 TID:11  (PRI) (BUF) (COBP.GET) (poolid:1) (key:8192) (bufid:9) (count:6) (OraBufReader.GetDataFromNetwork)
    2015-04-20 19:51:38.336732 TID:11  (NET) (REC) New receive packet. Header:
    Bad connection: (The yellow part is exactly the same for both connection)
    2015-04-20 21:42:09.269759 TID:8   (CFG) (SQLNET)   SQLNET.ENCRYPTION_CLIENT : required
    2015-04-20 21:42:09.302763 TID:8   (CFG) (SQLNET)   SQLNET.AUTHENTICATION_SERVICES : (NTS)
    2015-04-20 21:42:09.302763 TID:8   (CFG) (SQLNET)   NAMES.DIRECTORY_PATH : (TNSNAMES, EZCONNECT)
    2015-04-20 21:42:09.302763 TID:8   (CFG) (SQLNET)   SQLNET.CRYPTO_SEED : ….
    2015-04-20 21:42:09.302763 TID:8   (CFG) (SQLNET)   SQLNET.ENCRYPTION_TYPES_CLIENT : (RC4_56, DES40, RC4_40, DES, AES256)
    2015-04-20 21:42:09.302763 TID:8   (CFG) (SQLNET)   SQLNET.EXPIRE_TIME : 0
    2015-04-20 21:42:09.302763 TID:8   (CFG) (SQLNET)   SQLNET.INBOUND_CONNECT_TIMEOUT : 500
    2015-04-20 21:42:09.302763 TID:8   (CFG) (SQLNET)   SSL_VERSION : 1.0
    2015-04-20 21:42:09.308763 TID:8   (CFG) (ENV)      Machine Name : abcd
    2015-04-20 21:42:09.308763 TID:8   (CFG) (ENV)      User Name : scott
    2015-04-20 21:42:09.308763 TID:8   (CFG) (ENV)      OS Version : Microsoft Windows NT 6.1.7601 Service Pack 1
    2015-04-20 21:42:09.308763 TID:8   (CFG) (ENV)      64-bit OS : True
    2015-04-20 21:42:09.308763 TID:8   (CFG) (ENV)      64-bit Process : True
    2015-04-20 21:42:09.308763 TID:8   (CFG) (ENV)      .NET Runtime Version : 4.0.30319.18444
    2015-04-20 21:42:09.308763 TID:8   (CFG) (VER)      Oracle Data Provider for .NET, Managed Driver Version : 4.121.2.0
    2015-04-20 21:42:09.308763 TID:8   (CFG) (VER)      Oracle Data Provider for .NET, Managed Driver Informational Version : 4.121.2.20141216 ODAC RELEASE 3
    2015-04-20 21:42:09.308763 TID:8   (CFG) (.NET)     SQLNET.INBOUND_CONNECT_TIMEOUT : 500
    2015-04-20 21:42:09.308763 TID:8   (CFG) (.NET)     PerformanceCounters : 4095
    2015-04-20 21:42:09.308763 TID:8   (CFG) (.NET)     SSL_VERSION : 1.0
    2015-04-20 21:42:09.308763 TID:8   (CFG) (.NET)     NAMES.DIRECTORY_PATH : (TNSNAMES, EZCONNECT)
    2015-04-20 21:42:09.308763 TID:8   (CFG) (.NET)     TraceFileLocation : D:\
    2015-04-20 21:42:09.308763 TID:8   (CFG) (.NET)     ORACLE_HOME : D:\Oracle\product\product\12.1.0\client_1
    2015-04-20 21:42:09.308763 TID:8   (CFG) (.NET)     SQLNET.ENCRYPTION_TYPES_CLIENT : (RC4_56, DES40, RC4_40, DES, AES256)
    2015-04-20 21:42:09.308763 TID:8   (CFG) (.NET)     SQLNET.AUTHENTICATION_SERVICES : (NTS)
    2015-04-20 21:42:09.308763 TID:8   (CFG) (.NET)     SQLNET.CRYPTO_SEED : ….
    2015-04-20 21:42:09.308763 TID:8   (CFG) (.NET)     TraceLevel : 7
    2015-04-20 21:42:09.308763 TID:8   (CFG) (.NET)     TNS_ADMIN : D:\Oracle\product\product\12.1.0\client_1\Network\Admin\Sample\ (I update it)
    2015-04-20 21:42:09.308763 TID:8   (CFG) (.NET)     SQLNET.ENCRYPTION_CLIENT : required
    2015-04-20 21:42:09.308763 TID:8   (CFG) (.NET)     SQLNET.EXPIRE_TIME : 0
    2015-04-20 21:42:09.316764 TID:8   (CFG) (TNSNAMES) OFSP : ….
    2015-04-20 21:42:09.350767 TID:8   (CFG) (SQLNET)   FilePath : D:\Oracle\product\product\12.1.0\client_1\Network\Admin\Sample\sqlnet.ora
    2015-04-20 21:42:09.350767 TID:8   (CFG) (TNSNAMES) FilePath : D:\Oracle\product\product\12.1.0\client_1\Network\Admin\Sample\tnsnames.ora
    2015-04-20 21:42:09.350767 TID:8   (PUB) (ENT) OracleConnection.ctor()
    2015-04-20 21:42:09.357768 TID:8   (PRI) (ENT) (CP) ConnectionString.GetCS()
    2015-04-20 21:42:09.362769 TID:8   (PRI) (ENT) (CP) ConnectionString.ctor()
    2015-04-20 21:42:09.375770 TID:8   (PRI) (ENT) (CP) ConnectionString.Parse()
    2015-04-20 21:42:09.388771 TID:8   (PRI) (ENT) (CP) ConnectionString.SetProperty()
    2015-04-20 21:42:09.389771 TID:8   (PRI) (EXT) (CP) ConnectionString.SetProperty()
    2015-04-20 21:42:09.389771 TID:8   (PRI) (ENT) (CP) ConnectionString.SetProperty()
    2015-04-20 21:42:09.389771 TID:8   (PRI) (EXT) (CP) ConnectionString.SetProperty()
    2015-04-20 21:42:09.389771 TID:8   (PRI) (ENT) (CP) ConnectionString.SetProperty()
    2015-04-20 21:42:09.389771 TID:8   (PRI) (EXT) (CP) ConnectionString.SetProperty()
    2015-04-20 21:42:09.389771 TID:8   (PRI) (EXT) (CP) ConnectionString.Parse()
    2015-04-20 21:42:09.390771 TID:8   (PRI) (EXT) (CP) ConnectionString.ctor()
    2015-04-20 21:42:09.390771 TID:8   (PRI) (EXT) (CP) ConnectionString.GetCS()
    2015-04-20 21:42:09.390771 TID:8   (PUB) (EXT) OracleConnection.ctor()
    2015-04-20 21:42:09.435776 TID:8   (PUB) (ENT) OracleConnection.Open() (conid=295723) (state=Closed) (sessid=0) (implid=0) (pooling=T) (txnid=n/a)
    2015-04-20 21:42:09.441777 TID:8   (PRI) (ENT) (CP) OracleConnectionDispenser`3..cctor()
    2015-04-20 21:42:09.442777 TID:8   (PRI) (EXT) (CP) OracleConnectionDispenser`3..cctor()
    2015-04-20 21:42:09.443777 TID:8   (PRI) (ENT) (CP) OracleConnectionDispenser`3.Get()
    2015-04-20 21:42:09.448777 TID:8   (PRI) (ENT) (CP) PoolManager`3.ctor()
    2015-04-20 21:42:09.449777 TID:8   (PRI) (EXT) (CP) PoolManager`3.ctor()
    2015-04-20 21:42:09.454778 TID:8   (PRI) (ENT) (CP) PoolManager`3.Initialize() (constr=DATA SOURCE=badConn;USER ID=Scott;)
    2015-04-20 21:42:09.457778 TID:8   (PRI) (ENT) (CP) ConnectionString.Secure()
    2015-04-20 21:42:09.457778 TID:8   (PRI) (EXT) (CP) ConnectionString.Secure()
    2015-04-20 21:42:09.474780 TID:8   (PRI) (EXT) (CP) PoolManager`3.Initialize() (pmid=48657371) (constr=DATA SOURCE=badConn;USER ID=scott;)
    2015-04-20 21:42:09.475780 TID:8   (PRI) (BUF) (OBP.CTOR) (poolid:55492274) (OracleConnectionDispenser`3.GetPM)
    2015-04-20 21:42:09.482781 TID:8   (PRI) (ENT) (CP) OraclePoolManager.Get()
    2015-04-20 21:42:09.499782 TID:8   (PRI) (ENT) (CP) PoolManager`3.Get() (txnid=n/a) (bForceMatch=F)
    2015-04-20 21:42:09.505783 TID:8   (PRI) (ENT) (CP) PoolManager`3.CreateNewPR() (txnid=n/a)
    2015-04-20 21:42:09.726805 TID:8   (PRI) (ENT) TimeStamp.GetLocalTZOffset()
    2015-04-20 21:42:09.726805 TID:8   (PRI) (EXT) TimeStamp.GetLocalTZOffset()
    2015-04-20 21:42:09.738806 TID:8   (PRI) (ENT) (CP) ConnectionString.GetStringFromSecureString()
    2015-04-20 21:42:09.738806 TID:8   (PRI) (EXT) (CP) ConnectionString.GetStringFromSecureString()
    2015-04-20 21:42:09.766809 TID:10  (PRI) (ENT) (CP) PoolManager`3.CreateNewPRThreadFunc()
    2015-04-20 21:42:09.780810 TID:10  (PRI) (SVC) (ENT) OracleConnectionImpl.Connect() (oper=open) (aff=n/a) (inst=) (affmatch=n/a) (sessid=-1:-1) (F;F;F;;N) (pmid=48657371)
    2015-04-20 21:42:09.782811 TID:10  (PRI) (BUF) (COBP.CTOR) (poolid:1) (parentpoolid:55492274) (OracleConnectionImpl.Connect)
    2015-04-20 21:42:09.827815 TID:10  (PRI) (BUF) (ALLOCATION) (bufid:1)
    2015-04-20 21:42:09.837816 TID:10  (NET) (SND) 00 3A 00 00 01 00 00 00   |.:......|
    2015-04-20 21:42:09.922825 TID:10  (NET) (REC) 00 00 00 00 00 00 00 00   |........|
    2015-04-20 21:42:09.925825 TID:10  (PRI) (BUF) (ALLOCATION) (bufid:3)
    2015-04-20 21:42:09.925825 TID:10  (NET)      NS Handshake completed successfully
    2015-04-20 21:42:09.925825 TID:10  (NET)      Negotiated SDU size = 8192
    2015-04-20 21:42:09.933826 TID:10  (PRI) (BUF) (ALLOCATION) (bufid:4)
    2015-04-20 21:42:09.934826 TID:10  (PRI) (BUF) (OBP.GET) (poolid:55492274) (key:8192) (bufid:4) (count:0) (ConOraBufPool.Init)
    2015-04-20 21:42:09.944827 TID:10  (PRI) (BUF) (COBP.GET) (poolid:1) (key:8192) (bufid:11) (count:7) (OraBufWriter.Initialize)
    2015-04-20 21:42:09.946827 TID:10  (PRI) (SVC) (ENT) OracleConnectionImpl.DoProtocolNegotiation()
    2015-04-20 21:42:09.947827 TID:10  (PRI) (TTC) (ENT) TTCProtocolNegotiation.WriteMessage()
    2015-04-20 21:42:09.948827 TID:10  (PRI) (TTC) (ENT) TTCMessage.WriteTTCCode()
    2015-04-20 21:42:09.948827 TID:10  (PRI) (TTC) (EXT) TTCMessage.WriteTTCCode()
    2015-04-20 21:42:09.949827 TID:10  (PRI) (TTC) (EXT) TTCProtocolNegotiation.WriteMessage()
    2015-04-20 21:42:09.953828 TID:10  (NET) (SND) 00 1D 00 00 06 00 00 00   |........|
    2015-04-20 21:42:09.953828 TID:10  (NET) (SND) 00 00                     |..      |
    2015-04-20 21:42:09.953828 TID:10  (NET) (SND) 01 06 00 4F 44 50 2E 4E   |...ODP.N|
    2015-04-20 21:42:09.953828 TID:10  (NET) (SND) 45 54 5F 4D 61 6E 61 67   |ET_Manag|
    2015-04-20 21:42:09.953828 TID:10  (NET) (SND) 65 64 00                  |ed.     |
    2015-04-20 21:42:09.957828 TID:10  (PRI) (TTC) (ENT) TTCProtocolNegotiation.ReadResponse()
    2015-04-20 21:42:09.962829 TID:10  (PRI) (BUF) (COBP.GET) (poolid:1) (key:8192) (bufid:10) (count:6) (OraBufReader.GetDataFromNetwork)
    2015-04-20 21:42:09.996832 TID:10  (PRI) (ENT) TTCProtocolNegotiation.ReadResponse()
    2015-04-20 21:42:09.999832 TID:10  (PRI) (TTC) (ERR) TTCProtocolNegotiation.ReadResponse() (txnid=n/a) OracleInternal.Network.NetworkException (0x80004005): ORA-03135: Connection lost contact ---> System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
       at OracleInternal.TTC.OraBufReader.GetDataFromNetwork()
       at OracleInternal.TTC.OraBufReader.Read(Boolean bIgnoreData)
       at OracleInternal.TTC.MarshallingEngine.UnmarshalUB1(Boolean bIgnoreData)
       at OracleInternal.TTC.TTCProtocolNegotiation.ReadResponse()
    2015-04-20 21:42:09.999832 TID:10  (PRI) (TTC) (ERR) TTCProtocolNegotiation.ReadResponse() (txnid=n/a) System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
    2015-04-20 21:42:09.999832 TID:10  (PRI) (EXT) TTCProtocolNegotiation.ReadResponse()
    2015-04-20 21:42:10.009833 TID:10  (PRI) (TTC) (EXT) TTCProtocolNegotiation.ReadResponse()
    2015-04-20 21:42:10.009833 TID:10  (PRI) (ENT) OracleConnectionImpl.DoProtocolNegotiation()
    2015-04-20 21:42:10.009833 TID:10  (PRI) (SVC) (ERR) OracleConnectionImpl.DoProtocolNegotiation() (txnid=n/a) OracleInternal.Network.NetworkException (0x80004005): ORA-03135: Connection lost contact ---> System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
       at OracleInternal.TTC.OraBufReader.GetDataFromNetwork()
       at OracleInternal.TTC.OraBufReader.Read(Boolean bIgnoreData)
       at OracleInternal.TTC.MarshallingEngine.UnmarshalUB1(Boolean bIgnoreData)
       at OracleInternal.TTC.TTCProtocolNegotiation.ReadResponse()
       at OracleInternal.ServiceObjects.OracleConnectionImpl.DoProtocolNegotiation()
    2015-04-20 21:42:10.009833 TID:10  (PRI) (SVC) (ERR) OracleConnectionImpl.DoProtocolNegotiation() (txnid=n/a) System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
    2015-04-20 21:42:10.009833 TID:10  (PRI) (EXT) OracleConnectionImpl.DoProtocolNegotiation()
    2015-04-20 21:42:10.018834 TID:10  (PRI) (SVC) (EXT) OracleConnectionImpl.DoProtocolNegotiation()
    2015-04-20 21:42:10.018834 TID:10  (PRI) (ENT) OracleConnectionImpl.Connect()
    2015-04-20 21:42:10.018834 TID:10  (PRI) (SVC) (ERR) OracleConnectionImpl.Connect() (txnid=n/a) OracleInternal.Network.NetworkException (0x80004005): ORA-03135: Connection lost contact ---> System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
       at OracleInternal.TTC.OraBufReader.GetDataFromNetwork()
       at OracleInternal.TTC.OraBufReader.Read(Boolean bIgnoreData)
       at OracleInternal.TTC.MarshallingEngine.UnmarshalUB1(Boolean bIgnoreData)
       at OracleInternal.TTC.TTCProtocolNegotiation.ReadResponse()
       at OracleInternal.ServiceObjects.OracleConnectionImpl.DoProtocolNegotiation()
       at OracleInternal.ServiceObjects.OracleConnectionImpl.Connect(ConnectionString cs, Boolean bOpenEndUserSession, String instanceName)
    2015-04-20 21:42:10.019834 TID:10  (PRI) (SVC) (ERR) OracleConnectionImpl.Connect() (txnid=n/a) System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
    2015-04-20 21:42:10.019834 TID:10  (PRI) (EXT) OracleConnectionImpl.Connect()
    2015-04-20 21:42:10.028835 TID:10  (PRI) (SVC) (EXT) OracleConnectionImpl.Connect() (oper=open) (aff=n/a) (inst=) (affmatch=n/a) (sessid=-1:-1) (F;F;F;;N) (pmid=48657371)
    2015-04-20 21:42:10.028835 TID:10  (PRI) (EXT) (CP) PoolManager`3.CreateNewPRThreadFunc()
    2015-04-20 21:42:10.045837 TID:8   (PRI) (ENT) PoolManager`3.CreateNewPR()
    2015-04-20 21:42:10.045837 TID:8   (PRI) (ERR) (CP) PoolManager`3.CreateNewPR() (txnid=n/a) OracleInternal.Network.NetworkException (0x80004005): ORA-03135: Connection lost contact ---> System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
       at OracleInternal.ConnectionPool.PoolManager`3.CreateNewPR(Int32 reqCount, Boolean bForPoolPopulation, ConnectionString csWithDiffOrNewPwd, String instanceName)
    2015-04-20 21:42:10.045837 TID:8   (PRI) (ERR) (CP) PoolManager`3.CreateNewPR() (txnid=n/a) System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
    2015-04-20 21:42:10.045837 TID:8   (PRI) (EXT) PoolManager`3.CreateNewPR()
    2015-04-20 21:42:10.056838 TID:8   (PRI) (EXT) (CP) PoolManager`3.CreateNewPR() (aff=n/a) (inst=) (affmatch=n/a) (sessid=-1:-1) (F;F;F;;N) (pmid=48657371)
    2015-04-20 21:42:10.056838 TID:8   (PRI) (EXT) (CP) PoolManager`3.Get() (txnid=n/a) PM.Get(aff=;force=F) returning (null)
    2015-04-20 21:42:10.056838 TID:8   (PRI) (ENT) OraclePoolManager.Get()
    2015-04-20 21:42:10.056838 TID:8   (PRI) (ERR) (CP) OraclePoolManager.Get() (txnid=n/a) OracleInternal.Network.NetworkException (0x80004005): ORA-03135: Connection lost contact ---> System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
       at OracleInternal.ConnectionPool.PoolManager`3.CreateNewPR(Int32 reqCount, Boolean bForPoolPopulation, ConnectionString csWithDiffOrNewPwd, String instanceName)
       at OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)
       at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)
    2015-04-20 21:42:10.056838 TID:8   (PRI) (ERR) (CP) OraclePoolManager.Get() (txnid=n/a) System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
    2015-04-20 21:42:10.056838 TID:8   (PRI) (EXT) OraclePoolManager.Get()
    2015-04-20 21:42:10.067839 TID:8   (PRI) (EXT) (CP) OraclePoolManager.Get() (txnid=n/a)
    2015-04-20 21:42:10.082841 TID:8   (PRI) (ENT) OracleConnectionDispenser`3.Get()
    2015-04-20 21:42:10.082841 TID:8   (PRI) (ERR) (CP) OracleConnectionDispenser`3.Get() (txnid=n/a) OracleInternal.Network.NetworkException (0x80004005): ORA-03135: Connection lost contact ---> System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
       at OracleInternal.ConnectionPool.PoolManager`3.CreateNewPR(Int32 reqCount, Boolean bForPoolPopulation, ConnectionString csWithDiffOrNewPwd, String instanceName)
       at OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)
       at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)
       at OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword)
    2015-04-20 21:42:10.082841 TID:8   (PRI) (ERR) (CP) OracleConnectionDispenser`3.Get() (txnid=n/a) System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
    2015-04-20 21:42:10.082841 TID:8   (PRI) (EXT) OracleConnectionDispenser`3.Get()
    2015-04-20 21:42:10.093842 TID:8   (PRI) (EXT) (CP) OracleConnectionDispenser`3.Get() (txnid=n/a)
    2015-04-20 21:42:10.093842 TID:8   (PRI) (ENT) OracleConnection.Open()
    2015-04-20 21:42:10.093842 TID:8   (PUB) (ERR) OracleConnection.Open() (txnid=n/a) OracleInternal.Network.NetworkException (0x80004005): ORA-03135: Connection lost contact ---> System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
       at OracleInternal.ConnectionPool.PoolManager`3.CreateNewPR(Int32 reqCount, Boolean bForPoolPopulation, ConnectionString csWithDiffOrNewPwd, String instanceName)
       at OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)
       at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)
       at OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword)
       at Oracle.ManagedDataAccess.Client.OracleConnection.Open()
    2015-04-20 21:42:10.093842 TID:8   (PUB) (ERR) OracleConnection.Open() (txnid=n/a) System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine
       at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
    2015-04-20 21:42:10.093842 TID:8   (PRI) (EXT) OracleConnection.Open()
    2015-04-20 21:42:10.110843 TID:8   (PUB) (EXT) OracleConnection.Open() (conid=11111) (state=Closed) (sessid=0) (implid=0) (pooling=T) (txnid=n/a)
    Cheers,
    Muhammad

    Hi,
    Please open the alert log and check for ora-600 or ora-7445 error. if you are getting then paste the query and call stack information.
    Sorry last time i, was not logged in :)
    Kind Regards,
    Rakesh Jayappa
    Edited by: user9243284 on Sep 15, 2010 5:30 AM

  • Oracle.ManagedDataAccess.dll v4.121.1.0 - System.FormatException when Command.BindByName = true on Command.ExecuteReader().

    A first chance exception of type 'System.FormatException' occurred in mscorlib.dll

    Hi,
    user5924091 wrote:
    A first chance exception of type 'System.FormatException' occurred in mscorlib.dll
    Do you have a sample reproducing the issue?
    I've tried the following simple test and I do not see any exceptions.
    NOTE: I've enabled all exception types by selecting Debug -> Exceptions... from the menu and then executed the test from VS2012.
    Regards,
    Mark
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Diagnostics;
    using System.Data;
    using Oracle.ManagedDataAccess.Types;
    using Oracle.ManagedDataAccess.Client;
    namespace ConsoleApplication1
      class Program
        static string constr = "Data Source=//localhost:1521/V121P1;" +
                               "User Id=demo;" +
                               "Password=demo;" +
                               "Pooling=false;" +
                               "Enlist=false;";
        static void Main(string[] args)
          OracleConnection con = new OracleConnection(constr);
          con.Open();
          OracleCommand cmd = con.CreateCommand();
          cmd.CommandText = "select employee_id from hr.employees";
          cmd.BindByName = true;
          OracleDataReader dr = cmd.ExecuteReader();
          while (dr.Read())
            Console.WriteLine("ID = {0}", dr[0]);
          dr.Dispose();
          cmd.Dispose();
          con.Dispose();
          if (Debugger.IsAttached)
            Console.Write("Any key to terminate...");
            Console.ReadKey(true);

  • ManagedDataAccess wants TNS listener

    Hi all;
    I am trying to connect using the connection string: "USER ID=hr;PASSWORD=hr;DATA SOURCE=mercury:1521/XE"
    My connector class is: "Oracle.ManagedDataAccess.Client" which I believe is the connector that does not require the Oracle fat client to be installed.
    And I am getting the error:
    Oracle.ManagedDataAccess.Client.OracleException occurred
      HResult=-2147467259
      Message=TNS:listener does not currently know of service requested in connect descriptor
      Source=Oracle Data Provider for .NET, Managed Driver
      ErrorCode=-2147467259
      DataSource=Oracle.ManagedDataAccess
      Number=12514
      Procedure=""
      StackTrace:
           at Oracle.ManagedDataAccess.Client.OracleException.HandleError(OracleTraceLevel level, OracleTraceTag tag, Exception ex)
           at OracleInternal.ServiceObjects.OracleConnectionImpl.Connect(ConnectionString cs, Boolean bOpenEndUserSession)
           at OracleInternal.ConnectionPool.PoolManager`3.CreateNewPR(Int32 reqCount, Boolean bForPoolPopulation, ConnectionString csWithDiffOrNewPwd)
           at OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd)
           at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword)
           at OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, Byte[] securedPassword, Byte[] securedProxyPassword)
           at Oracle.ManagedDataAccess.Client.OracleConnection.Open()
           at AutoTagCore.net.windward.autotag.datasource.ado.ConnectionDebugger.btnConnect_Click(Object sender, EventArgs e) in c:\src\jenova\Dev\Merge\AutoTag\AutoTagCore\net\windward\autotag\datasource\ado\ConnectionDebugger.cs:line 346
      InnerException: OracleInternal.Network.NetworkException
           HResult=12514
           Message=TNS:listener does not currently know of service requested in connect descriptor
           Source=Oracle.ManagedDataAccess
           ErrorCode=12514
           Number=12514
           StackTrace:
                at OracleInternal.Network.OracleCommunication.DoConnect(String tnsDescriptor)
                at OracleInternal.Network.OracleCommunication.Connect(String tnsDescriptor, Boolean externalAuth)
                at OracleInternal.ServiceObjects.OracleConnectionImpl.Connect(ConnectionString cs, Boolean bOpenEndUserSession)
           InnerException:
    Any idea why?
    thanks - dave

    While you only need to install the connector (ODP.NET, Managed Driver), you still need to configure Oracle DB server networking access. This requires setting up some configuration files or placing the configuration info in a .NET config file.
    Networking is generally done through TNS, Easy Connect, or LDAP.
    You can put the TNS or Easy Connect info right into the Data Source attribute of the connection string as well.

  • Oracle.ManagedDataAccess - ora-12537

    Hi,
    I have problems with .net 4.0 WPF application. Everything working ok on developer machine and on tests virtual machines. I have just problem on one laptop. I tried different approaches but nothing helping.
    I'm using connection string like:
    string conn = ser Id=secret_user;Password=secret_password;Data Source=" +
    "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.7.46)" +
    "(PORT=1523))(CONNECT_DATA=(SERVER=dedicated)(SERVICE_NAME=HDPROD)))";
    or publishing app with tnsnames.ora and sqlnet.ora files and using connections strings like:
    string conn = "User Id=secret_user;Password=secret_password;Data Source=HDPROD"
    And everything is ok on my developer pc, test virtual machines, but im keep getting error: ora-12537 on one of laptops.
    Any ways to fix it?
    Regards,
    Bart.

    I added following settings in app.config file
      <configSections>
        <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess" />
      </configSections>
      <oracle.manageddataaccess.client>
        <version number="*">
          <settings>
            <setting name="SQLNET.AUTHENTICATION_SERVICES" value="all"/>
            <setting name="NAMES.DIRECTORY_PATH" value="ezconnect"/>
          </settings>
        </version>
      </oracle.manageddataaccess.client>
    Still failed, sometimes it throws "ORA-12537: Network Session: End of file", sometimes throws "ORA-03135: Connection lost contact".
    As ORA-12537 after change to Oracle.ManagedDataAcess.dll mentioned, it works without any problem with the unmanaged library.Please advice, thx.

  • Edmx cannot mapped stored procedure column info not displaying

    Hi,
    I'm trying to follow the QBE on how to mapped stored proedure in EF.
    Everything works fine until I need to Add Import Function where I could not see the list of column info.
    I'm using .NET 4.5, EF 5.0, 11gR3 DB, VS 2012 & ODP 11.2.0.3.60 (beta)
    Below is my app.config.
    <oracle.dataaccess.client>
    <settings>
    <add name="HR.UPDATE_AND_RETURN_SALARY.RefCursor.NEW_SALARY" value="implicitRefCursor bindinfo='mode=Output'" />
    <add name="HR.UPDATE_AND_RETURN_SALARY.RefCursorMetaData.NEW_SALARY.Column.0" value="implicitRefCursor metadata='ColumnName=FIRST_NAME;BaseColumnName=FIRST_NAME;BaseSchemaName=HR;BaseTableName=EMPLOYEES;NATIVEDATATYPE=Varchar2;ProviderType=Varchar2'" />
    <add name="HR.UPDATE_AND_RETURN_SALARY.RefCursorMetaData.NEW_SALARY.Column.1" value="implicitRefCursor metadata='ColumnName=SALARY;NATIVEDATATYPE=Number;ProviderType=Int32'" />
    </settings>
    </oracle.dataaccess.client>
    As far as I can tell it seems like VS would use the tags above to figure out the return column info and create a complex type. I could not see why it is not recognizing it.
    Please note that I can access an Oracle table successfully and display rows in VS.
    Thanks in advance

    I'm not sure if you're the person that just logged a SR on this, but I just recently worked the same issue.
    It turns out that
    a) if you don't pay attention, adding a new Oracle Connection in Server Explorer defaults to the MANAGED ODP.NET (you can still create a connection using UnManaged though).
    b) the metadata for MANAGED ODP.NET is different than the metadata for UNManaged. Here's the correct mapping for MANAGED ODP:
    oracle.manageddataaccess.client>
        <version number="*">
          <implicitRefCursor>
            <storedProcedure schema="HR" name="UPDATE_AND_RETURN_SALARY">
              <refCursor name="NEW_SALARY">
                <bindInfo mode="Output" />
                <metadata columnOrdinal="0" columnName="FIRST_NAME" providerType="Varchar2" nativeDataType="Varchar2" />
                <metadata columnOrdinal="1" columnName="SALARY" providerType="Double" nativeDataType="Number" />
              </refCursor>
            </storedProcedure>
          </implicitRefCursor>
        </version>
      </oraclemanaged.dataaccess.client>

  • Sql server edmx to oracle edmx converstion

    in my project i migrate Edmx from sql to oracle: for this i did generated scripts from sql server to oracle using Database script generation in entity framework. In this i got number datatype for boolean,bit datatypes when i place this code                                                                                                                     
    <system.data>
        <DbProviderFactories>
          <remove invariant="Oracle.DataAccess.Client" />
          <remove invariant="Oracle.ManagedDataAccess.Client" />
          <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
        </DbProviderFactories>
      </system.data>
      <oracle.manageddataaccess.client>
        <version number="*">
          <settings>
            <setting name="TNS_ADMIN" value="D:\app\user\product\12.1.0\client_1\Network\Admin" />
          </settings>
          <edmMappings>
            <edmMapping dataType="number">
              <add name="bool" precision="1" />
              <add name="byte" precision="2" />
              <add name="int16" precision="5" />
            </edmMapping>
          </edmMappings>
        </version>
      </oracle.manageddataaccess.client>
    worked properly but when i am adding new table to edmx the existing mapping details in msdl are lost why?

    Kelly,
    The OMWB only supports inline data transfer of image types to LONG RAW via SQL*Loader.
    You should be ablr to use TO_LOB() to convert the LONG to LOB.
    The error you have is what you get when you try yo migrate to BLOB. TO use SQL*Loader
    with BLOB you would need to have unload each image into a seperate file and the OMWB
    doen't help you do this. bcp dumps the image data in hex (hence the HEXTORAW sql function),
    I don't know how bcp would dump this as binary.
    Jim.

  • Managed ODP: InvalidCastException when returning large number

    I get an InvalidCastException "Specified cast is not valid" when trying to get a value bigger than Decimal.MaxValue as a scalar result from a select.
    From the stack trace and inspection of the Oracle.ManagedDataAccess.dll code I would expect OracleDataReader to cast to OracleDecimal (or System.Numerics.BigInteger) instead of System.Decimal for large numbers.
    Is this a bug?
    Stack trace:
       at Oracle.ManagedDataAccess.Client.OracleDataReader.GetDecimal(Int32 i)
       at Oracle.ManagedDataAccess.Client.OracleDataReader.GetValue(Int32 i)
       at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteScalar()
       at Cora.Data.DBProvider.Tests.CoraParameterTest.BigIntegerOracleTest() in D:\svnroot\tech\lib\Cora.Data.DBProvider\Cora.Data.DBProvider.Tests\CoraParameterTest.cs:line 98
    How to reproduce:
    - create a table NUNITTEST_PARAM_SIMPLE with a column BIG of type NUMBER(38)
    - run sample code
                using ( OracleConnection conn = new OracleConnection(ORACONN) )
                    conn.Open();
                    using ( OracleCommand cmd = conn.CreateCommand() )
                        cmd.CommandText = "insert into NUNITTEST_PARAM_SIMPLE (BIG) values (1234567890123456789012345678901234567)";
                        cmd.ExecuteNonQuery();
                    using ( OracleCommand cmd = conn.CreateCommand() )
                        cmd.CommandText = "select BIG from NUNITTEST_PARAM_SIMPLE";
                        object result = cmd.ExecuteScalar();          // Exception
                    conn.Close();

    There is no safe type mapping for ExecuteScalar. It's an uncommon use case.
    Even if there was, making the correct conversion implicitly would lead to more work for the application developer. Let's assume ODP.NET performs the "right" conversion. Now, the app needs to manipulate the data. What data type does it treat the returned value as: string or decimal? It could be either. That means twice as much code. One set deals with the data if a decimal was returned. The second deals with the data if a string is returned.
    It would be much easier to write code for one scenario, rather than two. That is why ODP.NET safe type mapping is an explicit conversion the developer makes.

Maybe you are looking for