Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL/SID question
In article <3431DE6F.5694_at_deere.com>,
jh33378nospam_at_deere.com wrote:
>
> Why not try this:
>
> select instance from v$thread;
>
> It works on my 7.2 system. I don't know if it would return multiple rows
> on OPS.
This does not seem to work from PL/SQL functions. Declaring the following function:
sSid VARCHAR2(9);
BEGIN
SELECT instance INTO sSid FROM v$thread; RETURN sSid;
5/2 PL/SQL: SQL Statement ignored 6/7 PLS-00201: identifier 'V_$THREAD' must be declared --------------------------------------------------------------Prefixing with SYS or SYSTEM just changes the error messages slightly:
5/2 PL/SQL: SQL Statement ignored 6/7 PLS-00201: identifier 'V$THREAD' must be declared --------------------------------------------------------------FROM SYSTEM.v$thread;
5/2 PL/SQL: SQL Statement ignored 6/7 PLS-00201: identifier 'SYSTEM.V$THREAD' must be declared --------------------------------------------------------------
Is there any way to get around this ?
ck
-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to UsenetReceived on Fri Oct 03 1997 - 00:00:00 CDT