Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Ora-12154 while debugging proc with Visual c/c++
The compiled program(.exe) is generated from the source code with
Visualc/c++. The precompilation of proc goes OK. In fact, during
precompilation, a connection to the DB takes place (to check tables,
procedures, semantics, etc.) and it works fine. The .exe that is generated
after compilation also connects fine. The strange thing is that when I run
the source code (the same as the one that I have compiled) in debug mode (in
the same Visual c/c++ environment) the connection error appears.
In my search for a solution, I found out that it probably has to do with the
fact that the machine where I'm having the problem has more than one oracle
home (I have Oracle forms developer 6i and oracle 9i Db installed). As
strange as it sounds, apparently this problem can appear when you have
different settings for the different NLS_LANG entries in the windows
registry.
Well that is my case so I have set
all NLS_LANG entries to the same value (AMERICAN_AMERICA.WE8ISO8859P1).
After
this changes the connection problem still persists: The .exe file connects
without any problem but when I run the program from the development
environment
(debugging mode), I get the connection error ORA-12538 (before the nls_lang
changes it was ORA-12154). Although the error is still there, this ORA-12538
makes me sure that the program is using the correct tnsnames.ora, because
when I use an invalid connection string the ORA-12154 connection error.
If anybody can think of anything else on how can I solve this please tell
me.
Thanks,
Miguel
"Ronald" <devnull_at_ronr.nl> escribió en el mensaje
news:67ce88e7.0303040918.6e9a22e8_at_posting.google.com...
> "MPG" <pg_miguel_at_hotmail.com> wrote in message
news:<JQY8a.924515$Ye7.6054961_at_telenews.teleline.es>...
> > - When I run the compiled program (.exe) it connects to the DB fine
fine.
> > - But when I run the program through the MSVisualc/C++ (for debugging)
the
> > connection error ora-12154 apears.
> >
> > - The OS is windows XP
> > - The DB is Oracle 9.2
> > - TNSNAMEs.ora LOOKS LIKE
>
> Miguel,
> I don't know much about the tools you use but first thing to check:
> is ORACLE_HOME known at debugging time ? if not make sure it is.
> Where did you put tnsnames.ora ?
> If not in ORACLE_HOME/network/admin make sure you have TNS_ADMIN
> pointing to the correct location.
>
> Ronald.
> -----------------------
> http://ronr.nl/unix-dba
Received on Wed Mar 05 2003 - 01:54:05 CST