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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Database Name ???

Re: Database Name ???

From: Ruth Gramolini <rgramolini_at_tax.state.vt.us>
Date: Mon, 12 Jun 2000 09:07:51 -0400
Message-Id: <10526.108634@fatcity.com>


Ari Kaplan posted this a couple of weeks ago. You simply put the following lines into the glogin.sql of the users' machines. rem Code to set dbname in logon promt
set heading off
set sqlprompt off
spool make_prompt.sql
SELECT 'set sqlprompt '''|| d.name ||'@' || substr(s.machine,1,decode (instr(s.machine,'.'), 0, length(s.machine), instr(s.machine,'.') - 1)) ||
'-SQL> '''
FROM V$SESSION s, V$DATABASE D
WHERE s.SID=1;
spool off
@make_prompt.sql
set heading on
set feedback on

Then the name of the instance will be identified in the login prompt.

HTH
Ruth B. Gramolini
ORACLE & DB2 DBA
VT Dept. of Taxes
ph# 802.828.5708
fax# 802.828..3754
rgramolini_at_tax.state.vt.us
----- Original Message -----
From: <drichard_at_mtlindia.com>
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> Sent: Monday, June 12, 2000 9:15 AM
Subject: Database Name ???

>
>
> Dear Experts,
>
> I have three databases in Oracle workgroup server 7.3.
> In the front-end application, I want to display the database name to which
> the connection is available.
> what query will give this ?
>
> Richard
>
>
> --
> Author:
> INET: drichard_at_mtlindia.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Mon Jun 12 2000 - 08:07:51 CDT

Original text of this message

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