Re: Getting Database Name from SQLPlus

From: Robert J Kennedy <rjkennedy_at_mmm.com>
Date: 1995/04/11
Message-ID: <3mcjt7$phn_at_dawn.mmm.com>#1/1


chubble_at_pcug.org.au (Chris Hubble) wrote:
>
> In article <3kuot4$21k_at_lucy.infi.net> gtravis_at_richmond.infi.net (Glenn Travis) writes:
> >From: gtravis_at_richmond.infi.net (Glenn Travis)
> >Subject: Getting Database Name from SQLPlus
> >Date: 24 Mar 1995 15:36:04 GMT
 

> >Is there a way to select the database name in query while using SQLPlus?
 

> >I am using net to connect to different servers on different machines to
> >produce dba type reports on disk usage ,etc... and would like to list the
> >instance name on the header page for the reports (querie output). I can
> >spool to $ORACLE_SID but can't use ORACLE_SID in the report heading.
>
> Tony Jambu suggests 'select name from v$database' but this needs to
> be preceeded by 'column name new_value dbsid noprint'
> Then you can use &dbsid in ttitle lines, selects etc.
>
> Sqlplus is very powerful!!
>
>
>
> _______________________________________________________________
> Chris Hubble
> chubble_at_pcug.org.au
> 06 249 8492 (H)
Received on Tue Apr 11 1995 - 00:00:00 CEST

Original text of this message