Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trouble with 10g instant client odbc driver

Status
Not open for further replies.

cgillin

Programmer
Mar 20, 2003
58
US
I'm trying to use the 10g odbc driver that comes with the instant client. The problem is, even though I have ODBC_HOME and TNS_ADMIN declared it's never tries to access the tnsnames.ora file and uses some sort of default. When I do an strace of my odbc program it access sqlnet.ora and other files in the network/admin folder, just not tnsnames. The Driver manager I've tried with are unixodbc2.2.11 and unixodbc2.2.10.

Anyone else have this problem?

Thanks
 
Does NAMES.DIRECTORY_PATH in your sqlnet.ora contain an entry for TNSNAMES?

Stefan
 
I have them declared in user enviornment variables.

And yes, NAMES.DIRECTORY_PATH does have an entry for TNSNAMES

sqlnet.ora...

# sqlnet.ora Network Configuration File:
# Generated by Oracle configuration tools.

trace_level_client=16
trace_unique_client=yes
trace_file_client = /tmp/cli.trc
log_file_client = /tmp/sqlnet.log

NAMES.DIRECTORY_PATH= (TNSNAMES)
 
Do you launch your ODBC application from that user or system account (as a service)? In any case you may try to set them in registry (under appropriate HOMEx if you have multiple homes).

Regards, Dima
 
Sorry for not responding sooner. I think I might have isolated the problem. When trying to connect using SQLConnect I get the error

TNS: Could not resolve host for given service name

When using TWO_TASK to specify the sid I'm able to connect. Here's my call to SQLConnect

funcResult = SQLConnect(connHandle, database, SQL_NTS, username, SQL_NTS, password, SQL_NTS);

database, username and password are all const char *. It seems like SQLConnect isn't properly passing along 'database'.

Has anyone else had this same problem or know what I could be doing wrong?

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top