Hi,

I am using Oracle 10g on Fedora Linux and trying to learn a bit of pl/sql. Here is the piece of code that I today tried to run in the SQL Plus window but it back with an error message saying SP2-0640 Not connected What could be the problem? Thanks..


set serveroutput on
declare x number;
begin x :=7777;
dbms_output.put_line('x= ');
dbms_output.put_line(x);
end;
/

It means the client side tool SQL *PLUS is not connected to the server or was disconnected because of server restart or network disconnect.

I was having the same problem but i sorted it out by doing the following:
1. Run SQL Command Line
2. Type Connect
3. Enter Username
4. Enter Pasword

Then you should get a message that the you are connected at this point you can access the database table. Thanks

thanx Macebooks..
I was here for the same problem and solved it.
Thanks a lottttt.:)

hi
my sqlplus get connection with user 'SYS',
but when i want to connect it with scott/tiger ,
it gives the message 'the account is lock',
when i unlock it it gives the error : sp2-0640: not connected