Tracing sql statements using v$sqlarea
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Tracing sql statements using v$sqlarea

  1. #1
    Join Date
    Aug 2000
    Posts
    143
    Does anyone know how to get the full sql statement from the sql_text column of v$sqlarea. The column type is varchar2(1000) but the documentation says it will only show 80 characters.

    Any help would be much appreciated.

  2. #2
    Join Date
    Nov 2000
    Posts
    212
    v$sqltext and V$SQLTEXT_WITH_NEWLINES.

  3. #3
    Join Date
    Jan 2001
    Posts
    318

    Red face

    Try this one:
    this
    /*will break the query into segments of 64 bytes and there will be multiple rows
    /*per statement, depending on length of query*/
    select disk_reads, executions, disk_reads/executions, b.sql_text, first_load_time
    from v$sqlarea a, v$sqltext b
    where a.address=b.address and disk_reads/decode(executions,0,1,executions) > 100
    and executions > 0
    order by disk_reads/decode(executions,0,1,executions) desc,b.address, b.piece;
    Sonali

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width