Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • fkwoindex.sql /* Find FK without Index */ Oracle
  • SQL Tracker by SID sqltrackerbysid.sql Oracle
  • Gathering statistics with DBMS_STATS Oracle
  • logminer and my_lbu Oracle
  • Facts about SCN and Rollback Segment Oracle
  • All About Trace Fils Oracle
  • Proc code Oracle
  • oracle tips… from http://www.bijoos.com/oracle/douknow.htm Oracle
  • Unix split command to split files Linux/Unix
  • AWR settings- MMON is not taking snapshot. Oracle
  • replace alphabets using sed Linux/Unix
  • How to remove blank lines using vi editor command Linux/Unix
  • crontab syntax Linux/Unix
  • get_vmstat_linux Oracle
  • Session_info.ksh Linux/Unix

temp_use.sql diplays usage of temp ts

Posted on 10-May-2008 By Admin No Comments on temp_use.sql diplays usage of temp ts

SELECT b.TABLESPACE,

b.segfile#,

b.segblk#,

b.blocks,

a.SID,

a.serial#,

a.username,

a.osuser,

a.status,

c.sql_text

FROM v$session a,

v$sort_usage b,

v$sqlarea c

WHERE a.saddr = b.session_addr

AND a.SQL_HASH_VALUE = c.HASH_VALUE

ORDER BY b.TABLESPACE, b.segfile#, b.segblk#, b.blocks

/

set pagesize 10000

set linesize 133

column tablespace format a15 heading ‘Tablespace Name’

column segfile# format 9,999 heading ‘File|ID’

column segblk# format 999,999,999 heading ‘Block|ID’

column blocks format 999,999,999 heading ‘Blocks’

column username format a15

select

b.tablespace, b.segfile#, b.segblk#, b.blocks,

a.sid, a.serial#, a.username, a.osuser, a.status

from v$session a, v$sort_usage b

where a.saddr = b.session_addr

order by b.tablespace,b.segfile#,b.segblk#,b.blocks;

Oracle, SQL scripts

Post navigation

Previous Post: get_ratio.sql get the ratio of users from v$session and this uses CASE-WHEN-THEN clause
Next Post: send attachment from unix-shell script

Related Posts

  • Oracle Statspack survival Guide Oracle
  • Implementing Listener Security Oracle
  • Jai Shree Ram Oracle
  • Facts about SCN and Rollback Segment Oracle
  • Restoring a user’s original password 1051962.101 Oracle
  • Test Case for Inserting Multiple (2.3 Million rows in 26 Seconds) Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • create database link syntax Oracle
  • Alter procedure auditing Oracle
  • plan10g.sql good Oracle
  • Some OS level threshold for performance. Linux/Unix
  • ORA-1841 Error Connecting to Upgraded Database After Set PASSWORD_LIFE_TIME Oracle
  • backspace in SQL Plus not working then..? Linux/Unix
  • good linux notes Linux/Unix
  • upload.html PHP/MYSQL/Wordpress

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme