Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: OCIServerAttach returns ORA-12514
"Paul" <paul.flew_at_globaladdress.net> wrote in message
news:1155491394.373445.98770_at_m73g2000cwd.googlegroups.com...
> Hi
>
> I have a small C application which connects to an Oracle database using
> OCI. Please find a code snippet below. I currently have a problem that
> the code works when connecting to certain database instances but not to
> others (its all the same server version of Oracle). I have verified
> that the connection details are correct, and other applications are
> able to connect to the instance that my C program cannot.
>
> The error I get returned from OCIServerAttach is ORA-12512:
> TNS:listener does not currently know of the service requested in
> connect descriptor.
>
You are probably using an incorrect service name in your tnsnames.ora file. But you say that "other applications are able to connect" ? What other applications ? How do they connect ? Do they use the same tnsnames.ora file as the C application ? Have you tried connecting to the instance with sql*plus ?
$ sqlplus username/password_at_connect_identifier Received on Sun Aug 13 2006 - 14:29:54 CDT