Re: sqlplus v. OCI v. OCCI connect

From: Devi <deviprasadrk_at_gmail.com>
Date: Wed, 27 May 2009 06:06:38 -0700 (PDT)
Message-ID: <6a68a97e-f9c0-465a-9b47-a582d3d62328_at_v4g2000vba.googlegroups.com>



Hey Shane, I am facing exactly same scenario. OTL/OCI works but OCCI is not working. My build env is complex, not able to figure out what should i fix in build. Can you please guide me. I have this in my link options:
 "-L/oracle/oracle10/lib32 -lclntsh -lnbeq10 -lnhost10 -lnus10 - lnldap10 -lldapclnt10 -lnsslb10 -lntcp10 -lntcps10 -lnsslb10 - lntcp10 -lntns10 -lkstat -lnsl -lsocket -lgen -ldl -lsched -locci" Linker goes thru but can't login. Thanks a ton in advance. Devi

On May 1, 4:02 pm, Shane <gshanemil..._at_verizon.net> wrote:
> On Apr 30, 7:16 pm, Shane <gshanemil..._at_verizon.net> wrote:
>
>
>
> > this command connects to oracle:
>
> > $ sqlplus smiller/mill99_at_oradev
>
> > A OTL based program which uses smiller/mill99_at_oradev as a connection
> > string connects to Oracle.
> > A working OCI program here which was gutted to use user=smiller,
> > password=mill99, db=oradev connects to Oracle.
>
> > But an OCCI program with this code:
>
> >      52   Environment* const env = Environment::createEnvironment(
> >      53     Environment::DEFAULT);
> >      54
> >      55   // Open a connection to the database, then close it.
> >      56   //
> >      58   try
> >      59   {
> >      60     Connection* const con = env->createConnection(user, pass,
> > osid);
>
> > throws on line 60 giving:
>
> > Can't connect: ORA-01017: invalid username/password; logon denied
>
> > What in the heck is the deal with OCCI? My OTL code worked the first
> > time, no problem. I guess OTL is based on OCI, which works How is
> > connecting to the db with OCCI so different from OCI, OTL, sqlplus?
> > How can I fix this error?
>
> > tnsping oradev gives:
>
> >  $ tnsping oradev
>
> > TNS Ping Utility for Solaris: Version 10.2.0.3.0 - Production on 30-
> > APR-2009 19:11:28
>
> > 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 (10 msec)
>
> this entire thing turns out to be a build issue.
Received on Wed May 27 2009 - 08:06:38 CDT

Original text of this message