Oracle Post-Installation perfect 2-2 sqlplus configuration variable command prompt How to display as user name

Source: Internet
Author: User
Tags sqlplus

How the Oracle command prompt appears as a user name

For example: Sqlplus/as sysdba After the command prompt is sys>


Fang Yi: Temporarily modify the sqlplus configuration variable

Sql> Show User

--The output is the current user, take the SYS as an example

User is "SYS"

Sql> Show All

--See all environment variables to find Sqlprompt

Sql> set Sqlprompt "_user>"

Sys>

Note: This setting only works in this reply.


Square Two: Modify the Sqlplus configuration file to achieve global validity in all sessions

CD $ORACLE _home

CD Sqlplus/admin

VI Glogin.sql

Add on the last side

Set Sqlprompt "_user>"


Note: Glogin.sql is a SQL configuration file, you can set the line length, page capacity, column width automatically adapt

Set Linesize #设定行长度80

Set PageSize #设定页面容量

DEFINE _editor= ' vi ' #修改sqlplus edit to open a text editor with VI

Set Serveroutput on #设定列宽自动适应

Oracle Post-Installation perfect 2-2 sqlplus configuration variable command prompt How to display as user name

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.