Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle database name in SQL*Plus prompt
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