Can't connect to remote Oracle server using ADO.Net | Connection string error?

3k views Asked by At

I have been trying to connect to an Oracle server using the following connection string:

            OracleConnection conn = new OracleConnection();
            conn.ConnectionString = @"Data Source=
(DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.206.0.23)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = ORCLWEX3)
    )
 )
;User Id= RAMNIVAS_CI;Password= RAMNIVAS_CI;Persist Security Info=True;";
            conn.Open();

But getting the following error:

System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.

Although I have already installed it.

I have been able to connect to that server using Oracle Sql Developer. The settings are :
Oracle SQL Developer Settings The TNSNAMES files is like this:

# tnsnames.ora Network Configuration File: F:\app1\product\11.1.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORCLWEX1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = oracle-db.newvisionsoftware.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = ORCLWEX1)
    )
  )

ORCLWEX2 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = oracle-db2.newvisionsoftware.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = ORCLWEX2)
    )
  )

ORCLWEX3 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.206.0.23)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = ORCLWEX3)
    )
  )

I have been told to use the last one: ORACLEWEX3.
I know there is some problem in the connection string and would be grateful if someone could help me.

1

There are 1 answers

1
Phil On BEST ANSWER

I don't think you need to use 'Persist Security info' if you're using username/password. Take a look at: http://connectionstrings.com/oracle for more examples.

Additionally, you could try using Oracle's own .net provider: http://www.oracle.com/technetwork/topics/dotnet/index-085163.html see if that works better for you.