Page 1 of 1

Useful Prompt in SQL*Plus

Posted: Tue May 08, 2007 5:11 am
by ahmadbilal
How do you set SQL*Plus to do this?

Go to your oracle home directory. e.g.. c:\orant\
Go to the SQL*Plus Directory. e.g.. Plus33, Plus80.
or
Go to your oracle home directory. e.g.. C:\ORACLE\sqlplus\admin


Edit or create file(if not exists) Glogin.sql

Add the following text at the end of the file:


set lines 100
set pages 100
set termout off
col dbname new_value prompt_dbname
select substr(global_name,1,instr(global_name,'.')-1) dbname
from global_name;
set sqlprompt "&&prompt_dbname> "
set termout on
set time on