• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 366
  • Last Modified:

run the top resource consuming query

SQL> select sql_text,
  2   username,
  3   disk_reads_per_exec,
  4   buffer_gets,
  5   disk_reads,
  6   parse_calls,
  7   sorts,
  8   executions,
  9   rows_processed,
 10   hit_ratio,
 11   first_load_time,
 12   sharable_mem,
 13   persistent_mem,
 14   runtime_mem,
 15   cpu_time,
 16   elapsed_time,
 17   address,
 18   hash_value
 19   from
 20   (select sql_text ,
 b.username ,
 round((a.disk_reads/decode(a.executions,0,1,
 a.executions)),2)
 21   22   23   24   disk_reads_per_exec,
 25   a.disk_reads ,
 26   a.buffer_gets ,
 27   a.parse_calls ,
 28   a.sorts ,
 29   a.executions ,
 30   a.rows_processed ,
 31   100 – round(100 *
 32   a.disk_reads/greatest(a.buffer_gets,1),2) hit_ratio,
 33   a.first_load_time ,
 34   sharable_mem ,
 35   persistent_mem ,
 36   runtime_mem,
 37   cpu_time,
 38   elapsed_time,
 39   address,
 40   hash_value
 41   from
 42   sys.v_$sqlarea a,
 43   sys.all_users b
 44   where
 a.parsing_user_id=b.user_id and
 45   46   b.username not in (‘sys’,'system’)
 47   order by 3 desc)
 48   where rownum < 11
 49   /
ERROR:
ORA-01756: quoted string not properly terminated

What can be the error
0
tonydba
Asked:
tonydba
1 Solution
 
johnsoneSenior Oracle DBACommented:
It appears that on this line:

b.username not in (‘sys’,'system’)

You have smartquotes.  Those are special characters and not actually quote characters.   The line should be:

b.username not in ('sys','system')
0
 
tonydbaAuthor Commented:
Thank you..
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Tackle projects and never again get stuck behind a technical roadblock.
Join Now