Path: news.cambrium.nl!textnews.cambrium.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!198.186.194.249.MISMATCH!news-out.readnews.com!transit3.readnews.com!postnews.google.com!p6g2000pre.googlegroups.com!not-for-mail
From: Shane <gshanemiller@verizon.net>
Newsgroups: comp.databases.oracle.server
Subject: sqlplus v. OCI v. OCCI connect
Date: Thu, 30 Apr 2009 16:14:29 -0700 (PDT)
Organization: http://groups.google.com
Lines: 46
Message-ID: <2bf13ad2-f03e-4980-ae7b-ef6e553dd3ea@p6g2000pre.googlegroups.com>
NNTP-Posting-Host: 199.172.169.33
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1241133269 24978 127.0.0.1 (30 Apr 2009 23:14:29 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 30 Apr 2009 23:14:29 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: p6g2000pre.googlegroups.com; posting-host=199.172.169.33; 
 posting-account=cJK_5AoAAAAlZBaeYrm0hOf2dYJ9PUoj
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 
 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 
 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022),gzip(gfe),gzip(gfe)
Xref:  news.cambrium.nl

this command connects to oracle:

$ sqlplus smiller/mill99@oradev

A OTL based program which uses smiller/mill99@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)
