Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Connection errors (ORA-12504) from .NET application
"ajmastrean" <ajmastrean_at_gmail.com> schreef in bericht
news:1166023687.571968.186760_at_j44g2000cwa.googlegroups.com...
> Folks,
>
> I have the Enterprise Library 2.0 (January 2006), C# .NET, and an
> Oracle database. I am trying to query the database using the Data
> Access Application Block (DAAB), but I get an ORA-12504 error. My
> connection string should be fine, as the
> DatabaseFactory.CreateDatabase("[dbname]") command runs without error.
>
> The connection string is...
> * * *
> <add name="[dbname]" connectionString="data
> source=[dbpath];Server=[serverpath];User
> ID=[userid];Password=[password];"providerName="System.Data.OracleClient"
> />
> * * *
>
> The error occurs on the ExecuteDataSet() function <ds =
> db.ExecuteDataSet(dbCommand);>. And reads...
>
> * * *
> Unhandled Exception: System.Data.OracleClient.OracleException:
> ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
> * * *
>
> I have the Oracle XE (10g Express Edition) client installed. And we are
> resolving the naming with LDAP. TNSPING for the database in question...
>
> * * *
> TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on
> 12-DEC-2
> 006 10:59:32
>
> Copyright (c) 1997, 2005, Oracle. All rights reserved.
>
> Used parameter files:
> C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
>
> Used LDAP adapter to resolve the alias
> Attempting to contact
> (DESCRIPTION=(SOURCE_ROUTE=OFF)(ADDRESS_LIST=(ADDRESS=(PRO
> TOCOL=TCP)(HOST=[hostaddress])(PORT=1521)))(CONNECT_DATA=(SID=[dbname])
> (SRVR=DEDICATED)))
> OK (50 msec)
> * * *
>
> Now, I am not an Oracle wizard (or even apprentice, for that matter).
> So, perhaps my Oracle setup is incorrect, but for now I am concerned
> that I the .NET side is doing something screwy.
>
Note that your SID should be XE and nothing but XE!
Received on Wed Dec 13 2006 - 11:57:08 CST
![]() |
![]() |