Archive

Archive for July, 2010

11g Calibrate I/O overview

July 22, 2010 Leave a comment

useful document that allows a use to guage the overall I/O throughput on the server

Need access to metalink

Configuring and using Calibrate I/O [ID 727062.1]

Categories: Oracle

How to find SQL running for a user/sid?

July 7, 2010 1 comment

Using the SQL below in which joining with V$session and V$sqlarea one can find the SQL currently running.

In this example using a session id one can find the SQL running


SQL> select a.sid, a.serial#, b.sql_text
from v$session a, v$sqlarea b
where a.sql_address=b.address
and a.sid = 257;

SID SERIAL#
———- ———-
SQL_TEXT
——————————————————————————–
257 8885
ALTER TABLE SCOTT.TEST_TBL1 MOVE PARTITION PART1 TABLESPACE NEW_TBS COMPRESS PCTFREE 0

In the following example, one can list all SQLs currently running by user SCOTT.
select a.sid, a.serial#, b.sql_text
from v$session a, v$sqlarea b
where a.sql_address=b.address
and a.username = ‘SCOTT’;

Categories: Oracle