Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: OCIServerAttach returns ORA-12514

Re: OCIServerAttach returns ORA-12514

From: Matthias Hoys <anti_at_spam.com>
Date: Sun, 13 Aug 2006 21:29:54 +0200
Message-ID: <44df7db2$0$31457$ba620e4c@news.skynet.be>

"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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US