Re: ORA_SID in Sql*Plus?

From: Govindhan Padmavijayam <govind_at_smtskit.attmail.com>
Date: 1996/10/31
Message-ID: <55agu9$que_at_newsb.netnews.att.com>#1/1


johnv_at_acix.DIALix.oz.au (John Verhoeven) wrote:

>In article dated Mon, 28 Oct 1996 09:40:42 -0800, Halina Monka (toyr002_at_ibm.net) wrote:
>> column DBNAME new_value DB noprint
>> select value dbname from v$parameter
 

>But this only works if you can access this table. A person with a DBA
>role can but not your average user.
 

>> where name='db_name';
>> set sqlprompt '&&DB>';
>> set term on
>> set echo on
 

>--
> _--_|\ John Verhoeven Unix / Database Administrator Westrail
>/ \ johnv_at_DIALix.oz.au / jverhoeven_at_westrail.wa.gov.au
>*_.--._/
> v "Smile! things could be worse... So I did... and they were..."

Hi,

After the ?/rdbms/admin/catalog.sql is run, while connected as internal / sys, do a

        GRANT SELECT ON V_$PARAMETER TO PUBLIC; ( or )

        GRANT SELECT ON V_$DATABASE TO PUBLIC; For some reason ( can some enlightened soul please elucidate ) the catalog.sql script does not grant select on these views to public, though it creates a public synonym for them.

This is what we put in our glogin.sql and it does the job :

set feedback off
set termout off
set echo off
column sid1 new_value sid2 noprint
select lower(name) sid from v$database; set sqlprompt '&sid2 > '
/
set feedback on
set termout on

Govindhan Padmavijayam Received on Thu Oct 31 1996 - 00:00:00 CET

Original text of this message