Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> connection problem in Pro*c
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 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 Thu Dec 24 1998 - 01:01:35 CST