Although Sqlplus is the most common Oracle Client tool used by DBAs, it is not very good at output formatting, such as broken lines, poor paging, and so on, so generally start sqlplus after a few settings, such as Linesize, pagesize and so on.
Common commands set linesize, pagesize,
Set row size in Sqlplus
Sql> Set Linesize 32767
Set Page size in Sqlplus
Sql> Set pagesize 50000
Formatting columns
Sqlplus Set character Fuleg type
Sql> Col ename for A30
Set the number column format in Sqlplus
sql> Col Sal for 999,999,999.999
Clear Screen Command
Clear Screen command in Sqlplus
Sql>host CLS
Effect comparison
1, the beginning of the display effect
Sql> set pagesize 50000;
Sql> set linesize 32767;
It feels so much fresher.
Set column width and number format
Sql> Col ename for A20
sql> Col Sal for 999,999,999.999
Modify Glogin.sql, append sqlplus default settings
The above settings are only valid for the current window, each setting is too cumbersome, here is a way to directly modify the Sqlplus default settings, just modify the C:\app\ORACLE\product\12.1.0\dbhome_1\sqlplus\admin\ Glogin.sql file, in which you need to customize the default Sqlplus option. One setting. Globally valid.
Set Linesize 32767
Set pagesize 50000
Original address
DBA Script Sqlplus set row size, page size, character Fuleg, digital column format, clear screen command
Modify Glogin.sql, append sqlplus default settings
Sqlplus Set line size, page size, character Fuleg type, digital column format, clear screen