From: Mtek on

Hi,

We use TOAD as our GUI to see the database. I put in a query that
selects from V$SQL, but I get a missing expression. The same query
works from within SQLPLUS. Even it I change it to V_$SQL, no good.

Is there something special with these dictionary tables???

Thanks!

John
From: fitzjarrell on
On Jun 13, 9:46 am, Mtek <m...(a)mtekusa.com> wrote:
> Hi,
>
> We use TOAD as our GUI to see the database.  I put in a query that
> selects from V$SQL, but I get a missing expression.  The same query
> works from within SQLPLUS.   Even it I change it to V_$SQL, no good.
>
> Is there something special with these dictionary tables???
>
> Thanks!
>
> John

Without seeing your query no one can answer that.

Post it.


David Fitzjarrell
From: Mtek on
On Jun 13, 11:25 am, "fitzjarr...(a)cox.net" <orat...(a)msn.com> wrote:
> On Jun 13, 9:46 am, Mtek <m...(a)mtekusa.com> wrote:
>
> > Hi,
>
> > We use TOAD as our GUI to see the database. I put in a query that
> > selects from V$SQL, but I get a missing expression. The same query
> > works from within SQLPLUS. Even it I change it to V_$SQL, no good.
>
> > Is there something special with these dictionary tables???
>
> > Thanks!
>
> > John
>
> Without seeing your query no one can answer that.
>
> Post it.
>
> David Fitzjarrell

select a.USERNAME,
DISK_READS,
EXECUTIONS,
round(DISK_READS / decode(EXECUTIONS, 0, 1, EXECUTIONS)) "Reads/
Execs",
SQL_TEXT
from dba_users a, v$session, v$sqlarea
where PARSING_USER_ID=USER_ID
and ADDRESS=SQL_ADDRESS(+)
and DISK_READS > 10000
order by DISK_READS desc, EXECUTIONS desc;
From: fitzjarrell on
On Jun 13, 11:37 am, Mtek <m...(a)mtekusa.com> wrote:
> On Jun 13, 11:25 am, "fitzjarr...(a)cox.net" <orat...(a)msn.com> wrote:
>
>
>
>
>
> > On Jun 13, 9:46 am, Mtek <m...(a)mtekusa.com> wrote:
>
> > > Hi,
>
> > > We use TOAD as our GUI to see the database.  I put in a query that
> > > selects from V$SQL, but I get a missing expression.  The same query
> > > works from within SQLPLUS.   Even it I change it to V_$SQL, no good.
>
> > > Is there something special with these dictionary tables???
>
> > > Thanks!
>
> > > John
>
> > Without seeing your query no one can answer that.
>
> > Post it.
>
> > David Fitzjarrell
>
> select  a.USERNAME,
>         DISK_READS,
>         EXECUTIONS,
>         round(DISK_READS / decode(EXECUTIONS, 0, 1, EXECUTIONS)) "Reads/
> Execs",
>         SQL_TEXT
> from    dba_users a, v$session, v$sqlarea
> where   PARSING_USER_ID=USER_ID
> and     ADDRESS=SQL_ADDRESS(+)
> and     DISK_READS > 10000
> order   by DISK_READS desc, EXECUTIONS desc;- Hide quoted text -
>
> - Show quoted text -

Now post the exact error displayed.


David Fitzjarrell
From: Mtek on
On Jun 13, 2:35 pm, "fitzjarr...(a)cox.net" <orat...(a)msn.com> wrote:
> On Jun 13, 11:37 am, Mtek <m...(a)mtekusa.com> wrote:
>
>
>
> > On Jun 13, 11:25 am, "fitzjarr...(a)cox.net" <orat...(a)msn.com> wrote:
>
> > > On Jun 13, 9:46 am, Mtek <m...(a)mtekusa.com> wrote:
>
> > > > Hi,
>
> > > > We use TOAD as our GUI to see the database. I put in a query that
> > > > selects from V$SQL, but I get a missing expression. The same query
> > > > works from within SQLPLUS. Even it I change it to V_$SQL, no good.
>
> > > > Is there something special with these dictionary tables???
>
> > > > Thanks!
>
> > > > John
>
> > > Without seeing your query no one can answer that.
>
> > > Post it.
>
> > > David Fitzjarrell
>
> > select a.USERNAME,
> > DISK_READS,
> > EXECUTIONS,
> > round(DISK_READS / decode(EXECUTIONS, 0, 1, EXECUTIONS)) "Reads/
> > Execs",
> > SQL_TEXT
> > from dba_users a, v$session, v$sqlarea
> > where PARSING_USER_ID=USER_ID
> > and ADDRESS=SQL_ADDRESS(+)
> > and DISK_READS > 10000
> > order by DISK_READS desc, EXECUTIONS desc;- Hide quoted text -
>
> > - Show quoted text -
>
> Now post the exact error displayed.
>
> David Fitzjarrell

A query like this give a "Missing Expression" from TOAD, but works
fine from SQLPLUS:

select EXECUTIONS,
BUFFER_GETS,
round(DISK_READS / decode(EXECUTIONS, 0, 1, EXECUTIONS) / 400,2)
"Gets/Execs",
SQL_TEXT
from sys.v_$sqlarea
where BUFFER_GETS / decode(EXECUTIONS,0,1, EXECUTIONS) / 400 > 10
order by EXECUTIONS desc;

John