Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle connection through ASP
gururuud_at_hotmail.com (Ruud) wrote in message news:<4db2e9a.0209190222.1db59b55_at_posting.google.com>...
> Hello,
>
> I'm using an ASP script to connect to an ORACLE database. I'm trying
> to connect with the following script:
>
> <%
> Set cnnOracle = Server.CreateObject("ADODB.Connection")
> strConn = "Provider=MSDAORA.1; Data Source=myDataSource; User
> ID=myUserID; Password=myPassword"
> cnnOracle.Open strConn
> %>
>
> However, i'm receiving the following error message all the time:
>
> Error Type:
> Microsoft OLE DB Provider for Oracle (0x80004005)
> Error while trying to retrieve text for error ORA-12154
> /FundPartners/Corporate/crm/index7.asp, line 8 (LINE 2 IN THE LINES
> SHOWN)
>
> The SQLnet.log gives the following:
>
> Fatal NI connect error 12560, connecting to:
> (DESCRIPTION=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGV0=oracleORCL)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(CONNECT_DATA=(SID=ORCL)(CID=(PROGRAM=C:\WINNT\System32\dllhost.exe)(HOST=EXCHANGE)(USER=IWAM_EXCHANGE))))
>
> VERSION INFORMATION:
> TNS for 32-bit Windows: Version 8.1.7.0.0 - Production
> Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version
> 8.1.7.0.0 - Production
> Time: 18-SEP-2002 16:42:18
> Tracing not turned on.
> Tns error struct:
> nr err code: 0
> ns main err code: 12560
> TNS-12560: Message 12560 not found; No message file for
> product=NETWORK, facility=TNS
> ns secondary err code: 0
> nt main err code: 530
> TNS-00530: Message 530 not found; No message file for
> product=NETWORK, facility=TNS
> nt secondary err code: 126
> nt OS err code: 0
>
>
> Also by connecting through ORACLE ODBC I'm getting the ORA-12154
> error. Using MS ODBC for ORACLE gives all kind of MS errors...
>
> Any suggestions??!?!?!?
>
> Thanx
ORA-12154 is "TNS:Could not resolve service name". This means that
1) There is a mismatch between the connect string in your DSN and
tnsnames.ora file.
2) Oracle is not reading the right tnsnames.ora file due to multiple
Oracle homes.
Check tnsnames.ora file for correct entry or use TNS_ADMIN system variable to point to one config file location.
Also, use sqlplus to connect to the database e.g. C:\> sqlplus user/password@<service_name> If your connection is successful, use same <service_name> in your DSN host string.
/Rauf Sarwar Received on Thu Sep 19 2002 - 12:15:25 CDT