From: chubble@pcug.org.au (Chris Hubble)
Subject: Re: Getting Database Name from SQLPlus
Date: 1995/04/04
Message-ID: <chubble.1.006ADE3A@pcug.org.au>#1/1
references: <3kuot4$21k@lucy.infi.net>
organization: The Internet Project, AUUG/PCUG, Canberra, ACT, Australia
newsgroups: comp.databases.oracle


In article <3kuot4$21k@lucy.infi.net> gtravis@richmond.infi.net (Glenn Travis) writes:
>From: gtravis@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@pcug.org.au            
06 249 8492 (H)                   


