Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • database trigger failing Oracle
  • TNSNAMES entries details Oracle
  • MYSQL and Oracle Comparison for Oracle DBA MYSQL
  • JSON/XML Types in Oracle Oracle
  • Updated LCK.SQL file. Oracle
  • Windows based Command line mailing program like mailx (Sednmail for windows) PHP/MYSQL/Wordpress
  • cp_filesystem.sql Oracle
  • 272332.1 CRS 10g Diagnostic Collection Guide Oracle
  • Jai Shree Ram PHP/MYSQL/Wordpress
  • Drop tempfiles from database Oracle
  • Good notes on Oracle Events Oracle
  • ext#.sql Oracle
  • SQL Server: How to see historical transactions SQL Server
  • GSQ.sql Oracle
  • Oracle Recommended Patches — Oracle Database ID 756671.1 Oracle

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

  • pvm_metric.sql for gathering report from vmstat tables Oracle
  • Implementing Listener Security Oracle
  • Difference between SYNC and AFFIRM Oracle
  • runon_allpdbs_show_conname.sh Oracle
  • moving lob object to other tablespace lob_mvmt.sql Oracle
  • pvmehta.com SQL scripts
    Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle Oracle

Leave a Reply Cancel reply

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

Categories

  • AMC10 (0)
  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (150)
  • MYSQL (5)
  • Oracle (403)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (151)
  • SQL scripts (349)
  • SQL Server (6)
  • Uncategorized (9)
  • Videos (0)

Recent Posts

  • Tutornet.US — Source of excellent learning14-Oct-2026
  • OCI Infrastructure Patching14-Oct-2026
  • Free API credits for AI models14-Oct-2026
  • AMC1020-Sep-2026
  • Key Management in Oracle: The Core Issue: Missing Master Key12-May-2026
  • SAT Mathematics 10 questions and answer at the end.30-Apr-2026
  • top 10 AI news today30-Apr-2026
  • runon_allpdbs_show_conname.sh23-Apr-2026
  • runon_allcdbs_find_pdbs.sh23-Apr-2026
  • Running PDB on single node in RAC09-Apr-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Exadata Basics Oracle
  • compile_inv.sql Oracle
  • 751131.1 New Article Error 2819 While Requesting a Systemstate Dump Oracle
  • Privileges Required to Create Procedures and Functions that uses objects from other schema. Oracle
  • track_autoupgrade_copy_progress.sql Oracle
  • Check SQL Server edition SQL Server
  • Resolving RMAN Hung Jobs Oracle
  • Reading config file from other folder inside class Python/PySpark

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme