Consider a situation that i need to connect to a remote oracle database using a ASP.NET interface. I dont have the access to change the TNSname.ora file. In that case, how can i connect to oracle using the following information:
1. Network Address
2. Port
3. SID
4. User Id
5 Password

Java does allow this. But the .NET connection string using both ORAClient or Microsoft's Oracle native driver, doesnt allow me to do that.

Any body who can help me on this.?

---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.

Re: C# oracle connectivity by Cowboy

Cowboy
Mon Apr 26 08:51:06 CDT 2004

I would try the ODP from http://otn.oracle.com.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
"DotNetJunkies User" <User@-NOSPAM-DotNetJunkies.com> wrote in message
news:u19FtN4KEHA.2784@TK2MSFTNGP09.phx.gbl...
> Consider a situation that i need to connect to a remote oracle database
using a ASP.NET interface. I dont have the access to change the TNSname.ora
file. In that case, how can i connect to oracle using the following
information:
> 1. Network Address
> 2. Port
> 3. SID
> 4. User Id
> 5 Password
>
> Java does allow this. But the .NET connection string using both ORAClient
or Microsoft's Oracle native driver, doesnt allow me to do that.
>
> Any body who can help me on this.?
>
> ---
> Posted using Wimdows.net NntpNews Component -
>
> Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup
engine supports Post Alerts, Ratings, and Searching.



Re: C# oracle connectivity by David

David
Mon Apr 26 11:05:00 CDT 2004


"DotNetJunkies User" <User@-NOSPAM-DotNetJunkies.com> wrote in message
news:u19FtN4KEHA.2784@TK2MSFTNGP09.phx.gbl...
> Consider a situation that i need to connect to a remote oracle database
using a ASP.NET interface. I dont have the access to change the TNSname.ora
file. In that case, how can i connect to oracle using the following
information:
> 1. Network Address
> 2. Port
> 3. SID
> 4. User Id
> 5 Password
>
> Java does allow this. But the .NET connection string using both ORAClient
or Microsoft's Oracle native driver, doesnt allow me to do that.
>
> Any body who can help me on this.?

The entry in TNS.ORA is an alias for the junk that comes after the '='. The
MS driver has a bug limiting the length of the DataSource, but the Oracle
driver ODP.NET will allow you to put the whole TNS string into the
DataSource.


eg
for

mydb =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dbservice)
)
)

use

(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dbservice)
)
)

David



RE: C# oracle connectivity by anonymous

anonymous
Tue Apr 27 03:21:05 CDT 2004

Oracle is poor, largely due to that stupid Tnsnames.ora file. SQL server is a much better alternative.

Re: C# oracle connectivity by Al

Al
Tue Apr 27 06:34:17 CDT 2004

Bonj,

Still anti-Oracle. I see you moved to .NET so you must have an open mind. Try Oracle before you put it down.

Just to be clear, given a choice I would use MSSQL, but not every developer has a choice.

--
Al Reid

"It ain't what you don't know that gets you into trouble. It's what you know
for sure that just ain't so." --- Mark Twain

"B0nj" <anonymous@discussions.microsoft.com> wrote in message news:AD8A859E-F733-47F6-897F-AB7DBC4AA212@microsoft.com...
> Oracle is poor, largely due to that stupid Tnsnames.ora file. SQL server is a much better alternative.



Re: C# oracle connectivity by Roy

Roy
Fri Apr 30 22:15:40 CDT 2004

David,

You don't need the ADDRESS_LIST. And the spaces are there just for
readability, they can go as well...

This works just as well:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbhost)(PORT=1521)))(CONNECT_DATA=
(SERVICE_NAME=dbservice))

regards
roy fine

"David Browne" <davidbaxterbrowne no potted meat@hotmail.com> wrote in
message news:uvzw7g6KEHA.556@TK2MSFTNGP10.phx.gbl...
>
> "DotNetJunkies User" <User@-NOSPAM-DotNetJunkies.com> wrote in message
> news:u19FtN4KEHA.2784@TK2MSFTNGP09.phx.gbl...
> > Consider a situation that i need to connect to a remote oracle database
> using a ASP.NET interface. I dont have the access to change the
TNSname.ora
> file. In that case, how can i connect to oracle using the following
> information:
> > 1. Network Address
> > 2. Port
> > 3. SID
> > 4. User Id
> > 5 Password
> >
> > Java does allow this. But the .NET connection string using both
ORAClient
> or Microsoft's Oracle native driver, doesnt allow me to do that.
> >
> > Any body who can help me on this.?
>
> The entry in TNS.ORA is an alias for the junk that comes after the '='.
The
> MS driver has a bug limiting the length of the DataSource, but the Oracle
> driver ODP.NET will allow you to put the whole TNS string into the
> DataSource.
>
>
> eg
> for
>
> mydb =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = dbhost)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = dbservice)
> )
> )
>
> use
>
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = dbhost)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = dbservice)
> )
> )
>
> David
>
>