August PL/SQL Tip of the Month: SQL*Plus Prompt Change

From: <>
Date: Mon, 16 Aug 1999 14:01:31 GMT
Message-ID: <7p95jk$40r$>

[Quoted] August's Tip of the Month

A common request in the world of SQL*Plus is to change the prompt to reflect information about the environment, such as the Oracle instance. Mike Ault, RevealNet Oracle Administration Knowledge Base author, offers this code to accomplish the prompt change:

column xdb_name new_value xdb noprint;
select name||': ' xdb_name from v$database; set sqlprompt &xdb

You can put these three lines inside your glogin.sql or login.sql scripts so that the prompt is set when you start up SQL*Plus (note that when you CONNECT from within SQL*Plus to another schema you will have to run one of these files manually to reset the prompt).

So there's one example of a SQL*Plus prompt change. Please visit the "PL/SQL Pipeline" if you have any other useful prompt settings that you would like to share. If so, please go to Pipetalk and add your entry in the new FAQ conference under the "Modifying the SQL*Plus prompt" posting.

Thanks, Steven Feuerstein

RevealNet Oracle Development News
- PL/Formatter for Quest Software's TOAD Now Available
  • PCWEEK LABS Gives PL/Generator a Strong Review
  • PL/Vision Now Integrated With Quest Software's SQL Navigator Full Information at

Sent via
Share what you know. Learn what you don't. Received on Mon Aug 16 1999 - 16:01:31 CEST

Original text of this message