Re: OCCI connect vs. sqlplus
Date: Thu, 30 Apr 2009 12:43:39 -0700 (PDT)
Message-ID: <dd318f54-2746-4dc0-9c9f-02366314b9bd_at_q33g2000pra.googlegroups.com>
On Apr 2, 1:31 am, usenet2..._at_zacek.de (Viktor Zacek) wrote:
> Shane <gshanemil..._at_verizon.net> wrote:
> > But connecting to the same db from the same box with this OCCI C++:
> > gives
> > ORA-01017: invalid username/password; logon denied
>
> Different ORACLE_HOME and therefore different tnsnames.ora?
>
> I don't know the way the C++ interface works, but hat this trivial case
> sometimes on notebooks.
> After renaming/moving databases, some of our notebooks where not able to
> connect, because for some ORACLE_HOME they had a local tnsnames.ora and
> not the central one.
>
> Simple thing, sometimes hard to find ;-)
>
> Best regards,
> Viktor
I am at my wits end on this. And the DBAs here are no help at all.
this command works great:
$ sqlplus smiller/mill_at_oradev
A OTL program with the connect string "smiller/mill_at_oradev" connected the first time I wrote and every time after that. Easy.
$tnsping oradev gives:
TNS Ping Utility for Solaris: Version 10.2.0.3.0 - Production on 30-
APR-2009 15:37:12
Copyright (c) 1997, 2006, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS =
(PROTOCOL = TCP)(HOST = sundev16)(PORT = 28538))) (CONNECT_DATA =
(SERVICE_NAME = oradev.bloomberg.com)))
OK (30 msec)
So it seems like a OCCI program which attempts to connect and disconnect ala:
env = Environment::createEnvironment(); conn = env->createConnection("smiller","mill99","oradev"); Environment::terminateEnvironment(env);
would work. but instead I get "database exception occurred: ORA-01017: invalid username/password; logon denied". If I do this too many times my account will be locked.
If I change conn line to:
conn = env->createConnection
("smiller","mill99","sundev16:28538");
I now get "database exception occurred: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor" and, weirdly, a file sqlnet.log is left in my CWD and it reads:
Fatal NI connect error 12514, connecting to: (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=sundev16.bloomberg.com)(CID= (PROGRAM=yagorcldb.sundev1.tsk)(HOST=sundev18)(USER=smiller)))(ADDRESS= (PROTOCOL=TCP)(HOST=172.17.5.23)(PORT=28538))) VERSION INFORMATION:
TNS for Solaris: Version 10.2.0.3.0 - Production TCP/IP NT Protocol Adapter for Solaris: Version 10.2.0.3.0 -Production
Time: 30-APR-2009 15:41:47
Tracing not turned on.
Tns error struct:
ns main err code: 12564
TNS-12564: TNS:connection refused
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
I cannot help but feeling that some network or .ora file is not setup right.
I've been trying to fix this on and off for over 3 weeks. Received on Thu Apr 30 2009 - 14:43:39 CDT