Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle database name in SQL*Plus prompt

Re: Oracle database name in SQL*Plus prompt

From: Robert Miller <rwmiller_at_gte.net>
Date: 1997/07/17
Message-ID: <5qlamr$s53$2@news5.gte.net>#1/1

edit you glogin.sql as follows:

Undefine newprompt Column sqlname new_value newprompt noprint Select
decode(name,

'FACS','FACS sql> ',
'CERTS','CERTS sql> ',
'JAM','JAM sql> ',
'COPS','COPS sql> ',
'sql> ') sqlname

From sys.region;
Clear Columns
Set sqlprompt '&newprompt'

Then in each instance create the following table.

CREATE TABLE region (

NAME                            VARCHAR2(8)  not null, 
USE                             VARCHAR2(25) not null,
PLATFORM                        VARCHAR2(5)  not null);

Name will be any name you wish to use for this instance. when found in sys.region table, a decode is done and any SQL prompt can be made to say anything.

-- 
To reply, just remove the trailing ~ from email address.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^~~~~....
Robert Miller - Oracle Master DBA  

rwmiller_at_gte.net 
    
    - or -

Rose Technologies Inc.
robt.miller_at_airmail.net
(214) 532.6558
(940) 458.5318

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^~~~~....
Any opinions expressed are my own and do not necessarily
represent any employer.
Received on Thu Jul 17 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US