Home » SQL & PL/SQL » Client Tools » Unable to get sql buffer facility (SQLPLUS)
Unable to get sql buffer facility [message #659336] Fri, 13 January 2017 02:46 Go to next message
asliyanage
Messages: 60
Registered: January 2017
Member
i tried with below commands to test sql buffer in sqlplus. My DB is Oracle 11gR2.
List
Run

above command does not give me any output?
Re: Unable to get sql buffer facility [message #659337 is a reply to message #659336] Fri, 13 January 2017 02:51 Go to previous messageGo to next message
pablolee
Messages: 2847
Registered: May 2007
Location: Scotland
Senior Member
Forgive my ignorance, what exactly do you mean when you say "test sql buffer". Do you 'just' mean "see what is in the sql buffer"?

Quote:
above command does not give me any output?
What have you put into the sql buffer?

[Updated on: Fri, 13 January 2017 02:54]

Report message to a moderator

Re: Unable to get sql buffer facility [message #659338 is a reply to message #659337] Fri, 13 January 2017 02:55 Go to previous messageGo to next message
asliyanage
Messages: 60
Registered: January 2017
Member
First i run below commnad. It shows the data from departments table.

select *
from departments

in SQLPLUS we can revise a multiple-line command and re-run it. SO i need to run the above command again without typing it again.

[Updated on: Fri, 13 January 2017 02:57]

Report message to a moderator

Re: Unable to get sql buffer facility [message #659341 is a reply to message #659338] Fri, 13 January 2017 02:59 Go to previous messageGo to next message
Michel Cadot
Messages: 65202
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What does not work in your example?
SQL> select *
  2  from dept
  3  /
    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON

4 rows selected.

SQL> list
  1  select *
  2* from dept
SQL> run
  1  select *
  2* from dept
    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON

4 rows selected.

Do like me, copy and paste your SQL*Plus session.
Before, Please read How to use [code] tags and make your code easier to read.
Also always post your Oracle version, with 4 decimals, as solution depends on it.

[Edit: use a multi-line command.]

[Updated on: Fri, 13 January 2017 03:01]

Report message to a moderator

Re: Unable to get sql buffer facility [message #659342 is a reply to message #659338] Fri, 13 January 2017 03:01 Go to previous messageGo to next message
Littlefoot
Messages: 21240
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It works for me just fine (with both slash and run); I can't remember it ever stopped working during last 20+ years:
SQL> select * From dept;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON
        50 Proba          Proba

SQL> l
  1* select * From dept
SQL> /

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON
        50 Proba          Proba

SQL> l
  1* select * From dept
SQL> run
  1* select * From dept

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON
        50 Proba          Proba

SQL>

Could you post your SQL*Plus session?
Re: Unable to get sql buffer facility [message #659343 is a reply to message #659341] Fri, 13 January 2017 03:02 Go to previous messageGo to next message
asliyanage
Messages: 60
Registered: January 2017
Member
when i try with list it doesn't give me any output. just blank screen.Do we need to activate the buffer in sqlplus?

[Updated on: Fri, 13 January 2017 03:02]

Report message to a moderator

Re: Unable to get sql buffer facility [message #659344 is a reply to message #659343] Fri, 13 January 2017 03:03 Go to previous messageGo to next message
Littlefoot
Messages: 21240
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
So ... when do you plan to copy/paste your SQL*Plus session?
Re: Unable to get sql buffer facility [message #659345 is a reply to message #659344] Fri, 13 January 2017 03:04 Go to previous messageGo to next message
Michel Cadot
Messages: 65202
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

+1

And don't forget to format it and to post your SQL*Plus version (it is in its banner).

Re: Unable to get sql buffer facility [message #659346 is a reply to message #659345] Fri, 13 January 2017 03:12 Go to previous messageGo to next message
Michel Cadot
Messages: 65202
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Something maybe obvious but before you can list a command from the buffer you must enter one.

Re: Unable to get sql buffer facility [message #659347 is a reply to message #659346] Fri, 13 January 2017 03:39 Go to previous messageGo to next message
cookiemonster
Messages: 12929
Registered: September 2008
Location: Rainy Manchester
Senior Member
You don't need to activate the buffer, it's always on.
So either:
a) you're doing something wrong
b) your sqlplus install is broken somehow.

If you post your session we may be able to spot if it's (a).
Re: Unable to get sql buffer facility [message #659348 is a reply to message #659347] Fri, 13 January 2017 04:59 Go to previous messageGo to next message
asliyanage
Messages: 60
Registered: January 2017
Member
how to post the session ?
Re: Unable to get sql buffer facility [message #659349 is a reply to message #659348] Fri, 13 January 2017 05:20 Go to previous messageGo to next message
pablolee
Messages: 2847
Registered: May 2007
Location: Scotland
Senior Member
asliyanage wrote on Fri, 13 January 2017 10:59
how to post the session ?
Copy and paste
Re: Unable to get sql buffer facility [message #659350 is a reply to message #659349] Fri, 13 January 2017 05:49 Go to previous messageGo to next message
asliyanage
Messages: 60
Registered: January 2017
Member
from where can i copy session details in sqlplus?
Re: Unable to get sql buffer facility [message #659351 is a reply to message #659350] Fri, 13 January 2017 06:07 Go to previous messageGo to next message
pablolee
Messages: 2847
Registered: May 2007
Location: Scotland
Senior Member
Did you open a session of sql plus?
have you logged into sql plus?
have you executed a valid sql statement?
did you then issue the 'LIST' command?
All that will be on screen. Use your cursor to select the text, copy it then paste it here.
Re: Unable to get sql buffer facility [message #659355 is a reply to message #659350] Fri, 13 January 2017 07:26 Go to previous messageGo to next message
asliyanage
Messages: 60
Registered: January 2017
Member
I have attached the connection details here.

./fa/13417/0/


[mod-edit: image inserted into message body by bb]
  • Attachment: Test.png
    (Size: 232.45KB, Downloaded 121 times)

[Updated on: Fri, 13 January 2017 21:20] by Moderator

Report message to a moderator

Re: Unable to get sql buffer facility [message #659356 is a reply to message #659355] Fri, 13 January 2017 07:32 Go to previous messageGo to next message
cookiemonster
Messages: 12929
Registered: September 2008
Location: Rainy Manchester
Senior Member
The screenshot shows the program called SQL Developer.
It is not the same thing as sqlplus.
Re: Unable to get sql buffer facility [message #659357 is a reply to message #659355] Fri, 13 January 2017 07:33 Go to previous messageGo to next message
BlackSwan
Messages: 25719
Registered: January 2009
Location: SoCal
Senior Member
It works for me.

[oracle@vbgeneric ~]$ sqlplus scott/tiger

SQL*Plus: Release 12.1.0.2.0 Production on Fri Jan 13 08:32:52 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Last Successful login time: Fri Jan 06 2017 22:21:51 -05:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> select sysdate from dual;

SYSDATE
---------
13-JAN-17

SQL> list
  1* select sysdate from dual
SQL> run
  1* select sysdate from dual

SYSDATE
---------
13-JAN-17

SQL> 

Re: Unable to get sql buffer facility [message #659358 is a reply to message #659355] Fri, 13 January 2017 07:35 Go to previous messageGo to next message
cookiemonster
Messages: 12929
Registered: September 2008
Location: Rainy Manchester
Senior Member
This is sqlplus:
./fa/13419/0/
It runs from the command line
  • Attachment: sqlplus.png
    (Size: 35.46KB, Downloaded 147 times)

[Updated on: Fri, 13 January 2017 07:37]

Report message to a moderator

Re: Unable to get sql buffer facility [message #659359 is a reply to message #659355] Fri, 13 January 2017 07:38 Go to previous messageGo to next message
pablolee
Messages: 2847
Registered: May 2007
Location: Scotland
Senior Member
As mentioned, you are using sql developer not SQL Plus. You can see what code has been recently executed by hitting [F8] or clicking on the SQL History button on the code page toolbar
Re: Unable to get sql buffer facility [message #659360 is a reply to message #659358] Fri, 13 January 2017 07:45 Go to previous messageGo to next message
asliyanage
Messages: 60
Registered: January 2017
Member
Thanks all. I tried with sqlplus. now its working. Earlier i tried in SQL Developer.
Re: Unable to get sql buffer facility [message #659362 is a reply to message #659360] Fri, 13 January 2017 08:04 Go to previous messageGo to next message
asliyanage
Messages: 60
Registered: January 2017
Member
anyway i found that sqlplus does not keep the SQL*Plus commands. what are the "SQL*Plus commands" which not includes to SQL command or PL/SQL block ?
Re: Unable to get sql buffer facility [message #659364 is a reply to message #659362] Fri, 13 January 2017 08:06 Go to previous messageGo to next message
cookiemonster
Messages: 12929
Registered: September 2008
Location: Rainy Manchester
Senior Member
Google and the oracle documentation are wonderful things:
https://docs.oracle.com/cd/B10501_01/server.920/a90842/ch13.htm
Re: Unable to get sql buffer facility [message #659369 is a reply to message #659364] Fri, 13 January 2017 10:32 Go to previous messageGo to next message
EdStevens
Messages: 850
Registered: September 2013
Senior Member
cookiemonster wrote on Fri, 13 January 2017 08:06
Google and the oracle documentation are wonderful things:
https://docs.oracle.com/cd/B10501_01/server.920/a90842/ch13.htm
Wow! The 9.2 doc??? Smile

If interestested, the 11.2 equivalent is here: https://docs.oracle.com/cd/E11882_01/server.112/e16604/ch_twelve001.htm#SQPUG023

And the 12.1 version.
Re: Unable to get sql buffer facility [message #659411 is a reply to message #659369] Mon, 16 January 2017 03:48 Go to previous messageGo to next message
cookiemonster
Messages: 12929
Registered: September 2008
Location: Rainy Manchester
Senior Member
What can I say, google returned that one first and I didn't bother to check the version.
Re: Unable to get sql buffer facility [message #659427 is a reply to message #659411] Mon, 16 January 2017 10:24 Go to previous messageGo to next message
EdStevens
Messages: 850
Registered: September 2013
Senior Member
cookiemonster wrote on Mon, 16 January 2017 03:48
What can I say, google returned that one first and I didn't bother to check the version.

It happens. Kind of like responding to a "new" thread that is actually years old but came to top when someone else dredged it up just to say "me too". That one has bitten me several times.

Smile
Re: Unable to get sql buffer facility [message #660273 is a reply to message #659427] Tue, 14 February 2017 01:42 Go to previous messageGo to next message
asliyanage
Messages: 60
Registered: January 2017
Member
Thanks everyone
Re: Unable to get sql buffer facility [message #660280 is a reply to message #660273] Tue, 14 February 2017 01:55 Go to previous message
Michel Cadot
Messages: 65202
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

So what was your problem? What did you learn?

Previous Topic: Oracle SQL Developer
Next Topic: SQL Developer Won't start
Goto Forum:
  


Current Time: Wed Nov 22 19:55:36 CST 2017

Total time taken to generate the page: 0.01931 seconds