Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using tnsnames.ora in OCI with OCILogon, or is that even correct?

944605Jun 20 2012 — edited Jun 25 2012
Hi all,

First, a disclaimer: I am completely new to anything with Oracle or OCI, so if my questions sounds stupid feel free to tell me so but point me in the right direction. Also, if this has been answered somewhere, please point me there...I have not been able to find anything so far. Thanks!

Also, basic information:

Language: C
Oracle DB version: 11g

Trying to use OCI

I am trying to write a client that connects to an Oracle database and gets some information (obviously). On the OCILogon() step, I need the username, password, and db address.

However, someone said there will be a tnsnames.ora file, and that should be enough.
I've searched online and I have not been able to find anything that relates OCILogon() to tnsnames.ora, so here are my questions:

1) Can OCILogon() use tnsnames.ora at all?
2) Is there any other function that I should use instead of OCILogon() that would work with the tnsnames.ora

Are they even related?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2012
Added on Jun 20 2012
2 comments
1,276 views