Skip to Main Content
  • Questions
  • How to Increase Font Size in SQL *Plus

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, M..

Asked: March 26, 2001 - 12:49 pm UTC

Last updated: October 27, 2005 - 3:25 am UTC

Version: 8.1.5

Viewed 10K+ times! This question is

You Asked

Hi Tom,

Can you please explain me How can I increase the Font Size/Name in SQL *Plus.

Is there any way to change the Font Size and Font Name of SQL *Plus. Sometimes it's really hard to concentrate on that default Font.

Greatly Appreciated.
Thanks...

and Tom said...

No, not in the GUI sqlplus however....

I never use the "gui" one. I myself always use the character mode one (sqlplus.exe, not sqlplusw.exe).

I can set the colors, font size, screen height, width and scrollback buffer for the dos window.



Rating

  (19 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Could you show us how do you do it in SQLPLUS?

Abhijit, November 14, 2002 - 7:08 am UTC

Hi Tom,
Could you please show us how do you set the font-size/colors in SQLPLUS.exe?

Cheers!
Abhijit

Tom Kyte
November 14, 2002 - 7:07 pm UTC

Edit / Properties in the little DOS window menu in the upper left hand side of your window

How about iSQLPlus Tom ?

pasko, November 15, 2002 - 3:53 am UTC

Hi Tom,

I would like to use iSQLPlus , if at all such an exe exists..because i read somewhere that there's a new WEB enabled SQLPlus with Oracle 9i..but i never really saw it in the Oracle's BIN directory...


How do i install the new WEB sqlplus?


Thanks



Tom Kyte
November 15, 2002 - 7:18 pm UTC

step one, read the documentation:

</code> http://docs.oracle.com/docs/cd/B10501_01/server.920/a90842/toc.htm <code>

as long as you've setup the apache webserver that comes with -- your read to go.


I just

o logged in as my oracle account
o cd $ORACLE_HOME/Apache/Apache/bin
o ./apachectl start

and then the url http: //hostname:7777/isqlplus just "worked"



You could try this to change font in GUI SQL-Plus

Raghu, November 15, 2002 - 8:22 pm UTC

You can change the font in SQL*Plus for Windows NT/2000.

In regedt32, go to
HKEY_LOCAL_MACHINE
-> SOFTWARE
-> ORACLE
-> HOME0

Create a new registry value called SQLPLUS_FONT of type REG_EXPAND_SZ and set it to your favourite fixed-width font, Eg. Courier New

Create a new registry value called SQLPLUS_FONT_SIZE of type REG_EXPAND_SZ and set it to the size you want (16 is a good size).

Exit from the registry and try to log-on to SQL-Plus and see if the font size is any different.

This has worked for me on Oracle 8.1.7. I have not tried on other releases.

I found this tip on the web.

Tom Kyte
November 15, 2002 - 8:28 pm UTC

It is actually in the documentation for sqlplusw as well

</code> http://docs.oracle.com/docs/cd/A87860_01/doc/win.817/a82954/apa.htm#423093 <code>

as on the "web".



However -- it'll have ZERO effect on "sqlplus.exe" which is the DOS (character mode -- my favorite) version.

It is "new" with 817.

sql*plus

mo, November 17, 2002 - 11:44 am UTC

Tom:

Is there a way to make sql*plus output wrap columns on he same page. for exampl if I have 6 columns it will print:

COL1 COL2 COL3
xxx xxx xxxx

COL4 COL5 COL6
xxx xxx xxxx

Currently I use set linesize 2000 and I keep scrolling inside the window to see all data

sql *PLus

A reader, January 31, 2003 - 11:50 am UTC

Hi tom,

I just want to know in the
"
SQL*Plus User's Guide and Reference
Release 8.1.7
Part Number A82950-01
"

There are lots of commands, that we can use in sqlplus

does sql * plus submit the same string as typed
to the orace datadbase server or
parse it
process it and if required convert it in the query
get the result set or error code and msg.
format it ( based on all "SET" options
display it

so just to describe the table scott.emp,
how much work is done ?
1.) parse the stmt
2.) get the key word 'DESC' or 'DESCRIBE' upper or lower
case only >=4 chars are allowed in command
3.) search if the keyword is found in some keyword table
4.) if not found get oracle error or based on key word,
query 1 or 2 datadictionary views
5.) handle the resultset
6.) veryfy all the setting of curret setting
set,compute etc..
7.) check for pause
8.) display result ?

is it true or you have a smart way to do it ?

so any other editor like oracle worksheet(OEM),toad,pl/sql developer does that same thing ?

TIA




Tom Kyte
January 31, 2003 - 12:02 pm UTC

sqlplus doesn't change your SQL, it just submits it.

SET options are applied to the results (the fetched data) only.

To desc scott.emp your steps would be valid.

get stmt
parse stmt
figure out what statment is
process stmt

that is what pretty much all command line environments do with everything.


sqlplus.exe

Jerry, February 08, 2003 - 11:13 am UTC

Another nice thing about the command line version is that one can use the "doskey" function there, which is nice for re-executing one-liners or alter session type commands.

about the & in SQLPLUS

Asim Naveed, September 03, 2003 - 2:34 pm UTC


Sir,

I wrote the follwoing SQL in SQLPLUS

SELECT 'ABC & DEF' FROM DUAL


what i want from above SELECT is the string "ABC & DEF"

but when i execute the sql, it starts asking me for
the input value. How can i print the above string in
sqlplus

Thanks


Tom Kyte
September 04, 2003 - 8:31 am UTC

SQL> set define off 

but what in the case we also need input

Asim Naveed, September 04, 2003 - 3:26 pm UTC

Thanks, but i was just thinking what if i need
an input also

e.g

SELECT 'ABC & DEF' || name2 FROM t1 where name1= &m_name1.

I want the user to input name1 every time the query
executes, if I set define off then it doesnt ask for
input.

Thanks

Tom Kyte
September 05, 2003 - 3:15 pm UTC

set define ^

select 'ABC & DEF' || name2 from t1 where name1 = ^m_name1;


you cannot have your cake and eat it too -- there must be SOME character that says "hey, if you see me, the stuff after me is special". It is either ON or OFF.

You can change it but there will be "one character" that is either special -- or not.

sql plus

mo, January 29, 2004 - 10:20 am UTC

TOm:

1. Is there anything in SQL*plus that you set to wrap full description around in the fixed colum size. For example, if i select :

select stock_no,description,qty from table;

stock_no description qty

I want to see full description(e.g. 5 lines) wrapping within a fixed I set for "description".

2. Would this work if i have the query in a VIEW?

Thank you

Tom Kyte
January 29, 2004 - 1:23 pm UTC

column description format a40 word_wrapped



Input truncated

Tarun Babu, January 30, 2004 - 12:22 am UTC

Hi tom, 

I have written the follwoing code in a file xyz.sql

create or replace procedure empvu_process
is
    v_sal number;
begin
     select sal
     into v_sal 
     from emp_vu
     where empno=7566;
     dbms_output.put_line('The salary is:'||v_sal);
end;
/
SQL> @xyz
Input truncated to 1 characters

Procedure created.

SQL> exec empvu_process
The salary is:2975

PL/SQL procedure successfully completed.

What is the meaning of "Input truncated to 1 characters". Sometimes it appears while displaying output in our Oracle Apps reports. How to supress this message?
Thanks in Advance...
 

Tom Kyte
January 30, 2004 - 8:11 am UTC

you are missing a "newline" on that last line.

just edit the file
goto the last line
goto the end of the last line
hit enter
save file

sql setting

mo, May 16, 2005 - 12:15 pm UTC

Tom:

Is there a link between the SQL prompt and using print_table script.  I re-created the login.sql but now the print_table does not print as it used to. 
SQL> execute print_table('select * from req where req_no=2058');

PL/SQL procedure successfully completed.

Also the SQL header repeat itself several times for every line of data when i do a sql query for one record.

select * from table where req_no=1;
 

Tom Kyte
May 16, 2005 - 1:17 pm UTC

you forgot

set serveroutput on size 1000000

sql plus

mo, May 16, 2005 - 7:50 pm UTC

Tom:

that solved one problem.

What about the issue of the result header that keeps repeating. How do i show this only one at the top of the result set.

Tom Kyte
May 16, 2005 - 8:56 pm UTC

what result header?

(you have the code, you can make it do *anything* you want it to do)

sqlplus

mo, May 16, 2005 - 9:46 pm UTC

Tom:

If i did select * from table it will

name height length length gender

and then again (listing remaing data)

name height length age gender

this is what I meant. Howw can I set SQL plus to only list results header once.

Thank you,


Tom Kyte
May 17, 2005 - 8:04 am UTC

SQL> set pagesize nnnn

(all of the sql plus stuff is documented
https://docs.oracle.com#index-SQL

set pagesize

Mark A. Williams, May 16, 2005 - 10:06 pm UTC

Mo,

"set pagesize 0" will do want you want...

- Mark

Or maybe not...

Mark A. Williams, May 16, 2005 - 10:28 pm UTC

I am just about certain that setting pagesize to 0 used to work... however, I just tried it and it did not...

- Mark

but an alternative might be...

Mark A. Williams, May 16, 2005 - 10:48 pm UTC

set pagesize 50000 (which is the max value I think)

How can I Print directly from SQL Prompt?

Sri, August 25, 2005 - 6:47 am UTC

Tom,

How can any one print the query results from SQL PLus to Printer directly?

desc <Table Name> should be sent to Printer. How?

Thanks for your time and valuable Inputs.

Sincerely


Tom Kyte
August 25, 2005 - 8:33 am UTC

not that I'm aware of, maybe in the olden days, spooling to PRN or something or /dev/something in unix, but today -- not that I know of.

SPOOL OUT??

A reader, October 26, 2005 - 11:50 am UTC

Can you explain what is the difference between spool off and spool out?
SQL> host sqlplus -v

SQL*Plus: Release 9.2.0.1.0 - Production


SQL> help spool

 SPOOL
 -----

 Stores query results in an operating system file, or sends the
 file to a printer.
 In iSQL*Plus, output can be directed to a file.

 SPO[OL] [file_name[.ext] | OFF | OUT]

 Not available in iSQL*Plus
 

Tom Kyte
October 27, 2005 - 3:25 am UTC

OFF

Stops spooling.

OUT

Stops spooling and sends the file to your host computer's standard (default) printer. This option is not available on some operating systems.



I would say "out" is something "really old" and not of real use anymore.

isqlplus problem

Sagar, July 17, 2007 - 8:16 am UTC

I am running one query in isqlplus ,the query is

select '123 456' from dual; --Note there are 5 spaces

the output is shown below.Here the 5 spaces between 123 and 456 are removed and only one space is shown. As we know this query works perfectly in sqlplus client.

---------------
123 456

Does anybody knows the way to prevent this in isqlplus?