Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • good linux notes Linux/Unix
  • login.sql Oracle
  • replace alphabets using sed Linux/Unix
  • How to know current SID Oracle
  • Rename Tablespace Oracle
  • Finding Oracle Patches with opatch Oracle
  • FGA Part-I Oracle
  • default permission on ~/.ssh/authorized_keys2 or authorized_keys Linux/Unix
  • export import with parameter file. Oracle
  • Running some SQL on multiple databases connecting using monitoring userid and password Linux/Unix
  • TRUNCATE table and disabling referential constraints. Oracle
  • Database logon trigger issue Oracle
  • OEM-troubleshooting on 20-MAY-08 Oracle
  • send email from unix mailx with attachment. Linux/Unix
  • scp with ssh2 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

  • Wait time tuning research Oracle
  • Rename Tablespace Oracle
  • Global Unique Identifier Generation in Oracle 9.2 SYS_GUID() Oracle
  • cp_filesystem.sql Oracle
  • Oracle 11g Environment Setup Oracle
  • Oracle Data Direct to TAPE 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
  • How to remove blank lines using vi editor command Linux/Unix
  • Giving Grant on v$DATABASE Oracle
  • get_ratio.sql get the ratio of users from v$session and this uses CASE-WHEN-THEN clause Oracle
  • avail.sh ( find filesystem spae usage) Linux/Unix
  • How do I get Oracle to automatically start when my server boots up? Oracle
  • send attachment from unix-shell script Linux/Unix
  • create a folder in multiple places Linux/Unix
  • prepfiles.sh for step by step generating pending statistics files Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme