Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • scripts to take listener.log backup Linux/Unix
  • Monitor and Trace Unix processes using truss Linux/Unix
  • v$backup.status information Oracle
  • Jai Shree Ram Linux/Unix
  • Some useful Unix Commands Linux/Unix
  • Example of How To Resize the Online Redo Logfiles Note:1035935.6 Oracle
  • Passing from Unix to PLSQL using bind variables Linux/Unix
  • Sequence Resetting Oracle
  • longtx.sql with the flag whether session is blocking any DML locks or not. Oracle
  • This is from Temi Oracle
  • To Find Orphan OS processes. Linux/Unix
  • Histogram Overview Oracle
  • USER_TABLES.Freelists Oracle
  • pvm_rbs1.sql (to collect rbs info from db) Oracle
  • check_copy_progress.sh Linux/Unix

When error comes for temporary tablespace with version <= 9i

Posted on 16-Sep-2008 By Admin No Comments on When error comes for temporary tablespace with version <= 9i

Step-1

Run @temp_use.sql as following. Following is the code for temp_use.sql

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

and a.sid not in (select distinct sid from v$mystat)

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;

Step-2

If no transcation is active means if no rows selected from both of the queries then do the Following

alter tablespace TEMP offline;

alter tablespace TEMP online;

alter tablespace TEMP coalesce;

Oracle, SQL scripts

Post navigation

Previous Post: Establishing trusted relationship between dbmonitor( central monitoring) and monitoring targets.
Next Post: Oracle Metalink useful notes

Related Posts

  • Locally Managed Tablespace and Dictionary managed tablespace (LMT-DMT) Oracle
  • Privileges Required to Create Procedures and Functions that uses objects from other schema. Oracle
  • FRA Information. Oracle
  • Database logon trigger issue Oracle
  • All Hints for Oracle Databases Oracle
  • Drop tempfiles from database 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
  • Oracle Recommended Patches — Oracle Database ID 756671.1 Oracle
  • Display the top 5 salaries for each department using single SQL Oracle
  • Query to Generate aggregate on every 30 mins. Oracle
  • process id based files and processes Linux/Unix
  • Unix split command to split files Linux/Unix
  • findinfo.sql (SQL for getting CPU and Active session info) Oracle
  • Example of How To Resize the Online Redo Logfiles Note:1035935.6 Oracle
  • Finding last recovered file on DR and remove all chanracters before any “/” Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme