Oracle--sqlplus How to set the width of sqlplus results display, ORACLE sqlplus prompt settings

Source: Internet
Author: User
Tags sqlplus

First, sqlplus query results, can be adjusted according to their own screen conditions, set the following:

1. Set the number of rows to display on a page

Show pagesize; First look at the current pagesize, the default is 14

Set pagesize 100; Set pagesize to 100 so that you can display as many lines of records at a time

2. Set the width of the row

Show Linesize; View current linesize, default is 80

Set Linesize 150; Set to 150 or wider

Note: The above method is a temporary and effective method


Second, set the environment variable of Sql*plus permanently (setting of Glogin.sql)

The $oracle_home/sqlplus/admin/glogin.sql file is called every time the user logs in to Sql*plus. We can modify this file so that some Sql*plus environment variables are set up each time we log on, and the default displayed sql> is changed to show the logged in user name and the login database instance name

Add the following lines at the end of the Glogin.sql file

Vi/opt/oracle/product/10.2.0/db_1/sqlplus/admin/glogin.sqlset linesize 150set pagesize 30set sqlprompt "_user ' @ ' _ Connect_identifier> "

Parameter description:

Set Linesize 150//sets the number of characters a row can hold

Set PageSize 30//sets the number of rows to display on a page

Set sqlprompt "_user ' @ ' _connect_identifier>"//modify Sqlplus Prompt to remind you of user mode, reduce misoperation


This article is from "Operation and maintenance record Mei Ling" blog, please be sure to keep this source http://meiling.blog.51cto.com/6220221/1775065

Oracle--sqlplus How to set the width of sqlplus results display, ORACLE sqlplus prompt settings

Related Article

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.