Re: Oracle SID at run-time from SQL*Plus
From: Murat Cakir <muratc_at_knidos.cc.metu.edu.tr>
Date: 1996/04/30
Message-ID: <Pine.HPP.3.90.960430100739.21559A-100000_at_knidos.cc.metu.edu.tr>#1/1
Date: 1996/04/30
Message-ID: <Pine.HPP.3.90.960430100739.21559A-100000_at_knidos.cc.metu.edu.tr>#1/1
In UNIX point-of-view, it should work when you do a simple,
SQL> !echo $ORACLE_SID
and it doesn't hurt any code (either SQL or UNIX script).
Murat
> >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?
> 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
Received on Tue Apr 30 1996 - 00:00:00 CEST