Re: connection problem in Pro*c

From: Zafer M. AKTAN <zafer_at_redshift.com>
Date: Thu, 14 Jan 1999 22:20:11 -0800
Message-ID: <77mmot$c2i$1_at_remarQ.com>


Please confirm that you are connecting to scott/tiger from sqlplus from within the xterm window that you are running the make -f .... command for the sample1. I tried today and it works fine. It must be in your tnsnames.ora - listener.ora configuration. Also check your environment variables and confirm that the ORACLE_HOME is set properly. If tnsnames.ora works fine - then you do not need the string - it will pick it up automatically.
Regards
Zafer

Zhao Fu wrote in message <75sp7k$b6v$1_at_nuscc.nus.edu.sg>...
>I am running the sample1 file from $ORACLE_HOME/precomp/demo/ on Sun
>Unix workstation, however I couldn't connect to the oracle database on
>system. Later, I found that our connection setting is a non-default
>connection via Net8. So, I referred to the manual and made the
>following change to the code:
>
>************************************************************************
>char username[10] = "scott";
>char password[10] = "tiger";
>char db_string[20] = "mcora"; /* my code, "mcora" is the SID*/
>EXEC SQL DECLARE DB_NAME DATABASE; /* my code*/
>EXEC SQL CONNECT :username IDENTIFIED BY :password AT DB_NAME USING
>:db_string; /* I appended the AT ... USING ... phrase*/
>************************************************************************
>
>However, when I ran the program, it seemed that I could connect to the
>database, but I couldn't execute any SQL command after
>that(e.g.SELECT).
>The error code is ORA-01012: not logged on. The following is the output
>message:
>
>Connected to ORACLE as user: scott
>
>Enter employee number (0 to quit): 2345
>
>ORACLE error--
>
>ORA-01012: not logged on
>
>I wonder if it is a still problem with the Oracle connection. Could
>anybody give me some advice?
>
>TIA
>--
>Zhao Fu
>National University of Singapore
>zhaofu_at_comp.nus.edu.sg
>
>
>--
>
Received on Fri Jan 15 1999 - 07:20:11 CET

Original text of this message