Re: Oracle SID at run-time from SQL*Plus

From: Bradley A. Ziola <ztcbaz>
Date: 1996/04/25
Message-ID: <DqFot9.B8B_at_news.arco.com>#1/1


Joern Moeller-Nielsen <jmn_at_pip.dknet.sk> wrote:
>Can anybody help with our litle problem.
>
>We have a couple of Unix-machines, and we would like to
>see Oracle SID from within SQL*Plus.
>
>Is this posible?
>--
>
>- -
>Joern Moeller-Nielsen, jmn_at_pip.dknet.dk
>Dansk Industri, DK-1787 Copenhagen
>Tel: +45 33 77 30 52; Fax +45 33 77 33 00

Joern,

Try the following:

as SYS:

   CREATE VIEW SID$(SID) as SELECT KSQDNGDN FROM X$KSQDN;    CREATE PUBLIC SYNONYM SID FOR SYS.SID$;    GRANT SELECT ON SID$ TO PUBLIC; then your users simply SELECT SID FROM SID

Hope this helps.

-- 
*---------------------------------------------------------------*
|  Bradley A. Ziola              |  ORA-01435                   |
|  Systems Consultant            |                              |
|  ARCO Transportation Co.       | Disclaimer:  The views       |
|  300 Ocean Gate                |              expressed are   |
|  Long Beach, CA. 90802         |              not necessarily |
|  (310) 590-4478                |              those of my     |
|  e-mail: ztcbaz_at_is.arco.com    |              employer.       |
*---------------------------------------------------------------*
Received on Thu Apr 25 1996 - 00:00:00 CEST

Original text of this message