Sqlplus Set line size, page size, character Fuleg type, digital column format, clear screen

Source: Internet
Author: User
Tags clear screen sqlplus

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.