Search This Blog

Total Pageviews

Wednesday 18 January 2012

Monitor Oracle user memory wise


set linesize 300
col "User" format a10
col "Machine" format a10
col "Statement" format a60
col MODULE format a30
col sid_serial format a15
SELECT SUBSTR(USERNAME,1,10) "User",
v$session.SID||','||v$session.serial# sid_serial,
SUBSTR(machine,1,10) "Machine",
sharable_mem, persistent_mem,
runtime_mem, executions,
-- v$sql.module,
SUBSTR(v$sql.sql_text,1,60) "Statement"
FROM v$session, v$sql, v$open_cursor
WHERE v$open_cursor.saddr = v$session.saddr
AND v$open_cursor.address = v$sql.address
and rownum < 50
ORDER BY SUBSTR(USERNAME,1,10), SUBSTR(machine,1,10);












User       SID_SERIAL      Machine    SHARABLE_MEM PERSISTENT_MEM RUNTIME_MEM EXECUTIONS Statement
---------- --------------- ---------- ------------ -------------- ----------- ---------- ------------------------------------------------------------
SYS        125,9           oel5u4            13870           3080        2424        261 select timestamp, flags from fixed_obj$ where obj#=:1
SYS        125,9           oel5u4            38694          12400       11380          1 SELECT SUBSTR(USERNAME,1,10) "User", v$session.SID||','||v$s
SYS        125,9           oel5u4            18053           5784        4232        310 select con#,type#,condlength,intcols,robj#,rcon#,match#,refa
SYS        125,9           oel5u4            13912          11868       11168          1 select oper, nclsrs, clpcstr from appqossys.wlm_classifier_p
SYS        125,9           oel5u4            18053           5684        4132          4 select con#,type#,condlength,intcols,robj#,rcon#,match#,refa
           133,1           oel5u4            26242           6244        5480         57 select size_for_estimate,                      size_factor *
           131,1           oel5u4            18034           4960        4276          4 insert into smon_scn_time (thread, time_mp, time_dp, scn, sc
           133,1           oel5u4            13995           3276        2512         57 select PGA_TARGET_FOR_ESTIMATE s,          PGA_TARGET_FACTOR
           10,7            oel5u4            13938           6752        6032          3 select lobtsn, lobrdba, lobobjid from x$lobstat   where lobs
           16,8            oel5u4            18113           4764        3396         14 select count(*) from sys.job$ where next_date < :1 and (fiel
           133,1           oel5u4            17966           8352        7820          5 delete /*+ CACHE_CB("ALERT_QT") */ from "SYS"."ALERT_QT" whe
           15,1            oel5u4            22099           7744        7068          6 select o.obj#, t.flags from tab$ t, obj$ o, user$ u where  u
           133,1           oel5u4            18028           7752        6968          7 select time_mp, scn, num_mappings, tim_scn_map from smon_scn
           133,1           oel5u4            13968           2576        1812         57 select shared_pool_size_for_estimate s,          shared_pool
           15,1            oel5u4            18053           5684        4132          4 select con#,type#,condlength,intcols,robj#,rcon#,match#,refa
           15,1            oel5u4            18053           5784        4232        310 select con#,type#,condlength,intcols,robj#,rcon#,match#,refa
           16,8            oel5u4            13901           3476        2692          8 select userid, name, subname, flags    from sys.scheduler$_l
           16,8            oel5u4            13901           3476        2692          1 select userid, name, subname, flags    from sys.scheduler$_l
           15,1            oel5u4            17991          13872       13340          5 update "SYS"."AQ$_ALERT_QT_H" set transaction_id = NULL wher
           15,1            oel5u4            13891           4200        3224        606 select pos#,intcol#,col#,spare1,bo#,spare2,spare3 from icol$
           7,1             oel5u4            22317           7352        5608        443 select name,intcol#,segcol#,type#,length,nvl(precision#,0),d
           133,1           oel5u4            18143           1072         484          1 BEGIN  dbms_ha_alerts_prvt.clear_instance_resources(   :dbdo
           15,1            oel5u4            18095           6224        4952       1574 select obj#,type#,ctime,mtime,stime, status, dataobj#, flags
           7,1             oel5u4            18095           6224        4952       1574 select obj#,type#,ctime,mtime,stime, status, dataobj#, flags
           133,1           oel5u4            38685          19172       17236          5 select  tab.rowid, tab.msgid, tab.corrid, tab.priority, tab.
           15,1            oel5u4            34906          15312       12588          6 select i.obj#,i.ts#,i.file#,i.block#,i.intcols,i.type#,i.fla
           133,1           oel5u4            17976           4632        4060          0 select TIME_WAITED_MICRO from V$SYSTEM_EVENT  where event =
           15,1            oel5u4            13968           4500        3716          8 select grantee#,privilege#,nvl(col#,0),max(mod(nvl(option$,0
           15,1            oel5u4            13968           4500        3716        318 select grantee#,privilege#,nvl(col#,0),max(mod(nvl(option$,0
           133,1           oel5u4             9772           2868        2296          8 select max(FA#) from SYS_FBA_FA
           16,8            oel5u4            22334           5284        3812        310 select job, nvl2(last_date, 1, 0) from sys.job$ where (((:1
           15,1            oel5u4            22154          11820       10588        314 select owner#,name,namespace,remoteowner,linkname,p_timestam
           15,1            oel5u4            22154          11820       10588         13 select owner#,name,namespace,remoteowner,linkname,p_timestam
           15,1            oel5u4            22154          11820       10588          1 select owner#,name,namespace,remoteowner,linkname,p_timestam
           133,1           oel5u4            22587           6760        6040          7 select /*+ FIRST_ROWS(1) */ x.C1, x.C2, x.C3 from  (select a
           15,1            oel5u4            13914           4312        3400        653 select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,
           7,1             oel5u4            13914           4312        3400        653 select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,
           133,1           oel5u4            42824          27356       26316          5 insert into "SYS"."ALERT_QT"  (q_name, msgid, corrid, priori
           15,1            oel5u4            13887           3784        3000          4 select intcol#,nvl(pos#,0),col#,nvl(spare1,0) from ccol$ whe
           15,1            oel5u4            13887           3796        3012       1347 select intcol#,nvl(pos#,0),col#,nvl(spare1,0) from ccol$ whe
           133,1           oel5u4            14068           4920        3624          1 select CONNECTION_POOL_NAME, STATUS, MINSIZE, MAXSIZE,
           15,1            oel5u4            43138          17848       14932        407 select i.obj#,i.ts#,i.file#,i.block#,i.intcols,i.type#,i.fla
           7,1             oel5u4            43138          17848       14932        407 select i.obj#,i.ts#,i.file#,i.block#,i.intcols,i.type#,i.fla
           140,5           oel5u4            18096            992         444          1  begin      dbms_aqadm_sys.remove_all_nondurablesub(:1, :2);
           133,1           oel5u4            18231           7580        6136          2 select subscriber_id, name, address, protocol, subscriber_ty
           140,5           oel5u4            13916           2736        2164          2 select 1 from sys.aq$_subscriber_table where rownum < 2 and
           16,8            oel5u4            44090          13900       13136         56 select next_run_date, obj#, run_job, sch_job from (select de
           133,1           oel5u4            13978           2660        1896         57 select streams_pool_size_for_estimate s,           streams_p
           15,1            oel5u4            22317           7352        5608        443 select name,intcol#,segcol#,type#,length,nvl(precision#,0),d

49 rows selected.

List of only hidden files in unix

unix hidden file
List only hidden files with ls command


ls -a mydir/ | grep '^\.'

ls -a | grep "^\."

Oracle DBA

anuj blog Archive