Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> c.d.o.misc -> Re: C# Oracle Q (from a SQL Server point of view)

Re: C# Oracle Q (from a SQL Server point of view)

From: Niall Litchfield <>
Date: Tue, 02 Oct 2007 16:56:51 +0100
Message-ID: <> wrote:
> Hi,
> I am currently using OleDb in c# .net to connect to an Oracle
> database.
> I do this by referencing a 'data source', this data source is an alias
> to a .ora file which contains the connection details.

>>From what i understand, you need to do an Oracle installation in order

> for this whole process to work.
> I want to be able to connect to the Oracle DB without having to make
> any installations (would like to just use the dll's instead).
> My question is, how can i get rid of the .ora file dependency? Like in
> SQL server, the data is all held in the connection string.

You've actually asked two questions. The first is 'do you need an Oracle client to talk to an Oracle database?' to which the answer is - unsurprisingly - yes. It's exactly the same situation with sqlserver by the way except that microsoft supply the client with the OS (in the form of MDAC). The most appropriate client for you is probably the Instant Client.

The second I haven't seen addressed and that is 'do you need a .ora file to resolve Oracle database names?' The answer to that is no - the file is a convenience. If you look at the structure you will see that it is

<name> = <very long connection details>

conventionally you supply the name, but nothing except syntax nightmares stops you supplying the connection details directly (say in a machine.config file) In addition Oracle clients can use other naming resolution methods - notably for you Active Directory - but setting those up is beyond the scope of a usenet post.

Me i'd go with tnsnames.ora and a full client, but there are other options for you.

Niall Litchfield
Oracle DBA
Received on Tue Oct 02 2007 - 10:56:51 CDT

Original text of this message