SQL*Net, environment variables & Pro*C

From: Suresh Kumar <skumar_at_ciesin.org>
Date: 1995/04/05
Message-ID: <3lv0dg$ipu_at_lastactionhero.rs.itd.umich.edu>#1/1


Hi all,

I have oracle 7.1.3 on a HP-UX running SQLNET V2, I have the following problem and unable to resolve it.

I am able to connect to the remote database through sqlplus, like 'username/passwd_at_alias'. But, when I try embedding it in Pro*C, like:

char *twotask = ("TWO_TASK=alias");
putenv(twotask);

EXEC SQL DECLARE db_name DATABASE;

EXEC SQL CONNECT :username IDENTIFIED BY :password AT :db_name USING :db_string ; it doesn't work. I get ORA-12154: TNS:could not resolve service name.

To my surprise i found that oraperl (perl interface to oracle - built using OCI) works fine from the local machine to a remote machine using sqlnet. These confirms that sqlnet works fine, but there is some problem in the API to sqlnet particularly in regard to env variables.

Have any one had similar problems? if so how did you get rid of it, any help would be highly appreciated.  

Thanks
Suresh Received on Wed Apr 05 1995 - 00:00:00 CEST

Original text of this message