Script – Find SQL being executed by a OS Process ID (PID)

prompt "Please Enter The UNIX Process ID"
set pagesize 50000
set linesize 30000
set long 500000
set head off
select
s.username su,
substr(sa.sql_text,1,540) txt
from v$process p,
v$session s,
v$sqlarea sa
where p.addr=s.paddr
and s.username is not null
and s.sql_address=sa.address(+)
and s.sql_hash_value=sa.hash_value(+)
and spid=&SPID;

About

View all posts by

7 thoughts on “Script – Find SQL being executed by a OS Process ID (PID)

  1. Heya great blog! Does running a blog like this take a great
    deal of work? I have absolutely no expertise in coding however I had been hoping to start my own blog in the near future.
    Anyhow, if you have any ideas or techniques for new blog owners please share.
    I know this is off subject but I just had to ask.

    Appreciate it!

  2. The next time I read a blog, I hope that it doesnt disappoint me as much as this one. I mean, I know it was my choice to read, but I actually thought youd have something interesting to say. All I hear is a bunch of whining about something that you could fix if you werent too busy looking for attention.

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *

Этот сайт использует Akismet для борьбы со спамом. Узнайте как обрабатываются ваши данные комментариев.