Link to home
Start Free TrialLog in
Avatar of P_Mahesh
P_Mahesh

asked on

SP2-0223

Hi,

When trying to execute a procedure in SQLPLUS I got the following error
message :

SP2-0223 : NO LINES IN SQL BUFFER.

I am running Oracle 8i on Solaris. Previously I was able to execute it properly but all of a sudden this error started coming up. The procedure is:

EXECUTE DBMS_REPCAT.CREATE_SNAPSHOT_REPOBJECT
('SCM','SCM_MATL_DESP_HEADER','SNAPSHOT',
'CREATE SNAPSHOT SCM.SCM_MATL_DESP_HEADER REFRESH FAST WITH PRIMARY KEY  FOR UPDATE AS SELECT * FROM SCM.SCM_MATL_DESP_HEADER@NEW1.TRM',
NULL,'WBSCM_MG',NULL,TRUE,FALSE);

what is the reason for it ? I am unable to find any help for SP2-0223 error message.

thanks,
mahesh.
Avatar of sudhi022299
sudhi022299

try to put that statment in a file, and then execute the script file.
Avatar of P_Mahesh

ASKER

I tried that but it did now work ..
Ok, at first it seemed to be weird getting this message, but it turns out to be very simple.

SP2-0223 is an SQL-PLUS information message.

SQL-PLUS has a buffer, in which it keeps the last entered user command.

This buffer can be used to rerun last command, edit last command etc...

To list the buffer's contents you can user the LIST command, with or without a line number to show all the buffer's contents or just a specific line.

When first starting SQL-PLUS, before entring any command, the buffer is empty.

If you issue the LIST command on the empty buffer you will get the same message you've got!!

Now, let's assume you didn't issue any LIST command so how did you get this message ?

It's that simple. When the buffer is empty, if you just enter ';' as a command you get the same effect as a LIST command!
So by just entering ; when the buffer is empty you will get this message! (try it!)

BTW, to clear the buffer you can issue the CLEAR BUFFER command.

Anyway this message has nothing do to with your specific command. I assume it happended by mistake.
ASKER CERTIFIED SOLUTION
Avatar of sbenyo
sbenyo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the information, but i would have
really appreciated if i got the exact reason why i was getting that error message . I delayed because i was waiting for some more input on it.

Mahesh.