Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Default User Profile Oracle
  • Query to Generate aggregate on every 30 mins. Oracle
  • Good Oracle Architecture In Short and point to point Oracle
  • oracle_env_10g_CADEV Linux/Unix
  • How to find who is using which Rollback segment and how many rows or blocks in that rollback segments, Oracle
  • currwaitobj.sql SQl_ID and SQL statement you can get from currwaitobj.sql Oracle
  • My Minimum Tuning Programs Oracle
  • Generate SSH without password authentication. Linux/Unix
  • How to find Unix server conguraiton including Server Model number and underlying disk sub-system ( On Solaris) Linux/Unix
  • Absolute file number and relative file number Oracle
  • Sort with ASCII order and Numeric Order Linux/Unix
  • Exadata Basics Oracle
  • TABLE SIZING WITH DB_BLOCK ARCHITECTURE Reference : Metalink note : 10640.1 Oracle
  • plan10g.sql Oracle
  • How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile) Oracle

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

  • Goog notes on X$ tables Oracle
  • find_err.sql for finding errors from dba_errors. Oracle
  • get_ratio.sql get the ratio of users from v$session and this uses CASE-WHEN-THEN clause Oracle
  • Oracle Recommended Patches — Oracle Database ID 756671.1 Oracle
  • reset Sequence Oracle
  • executing Function from SQLPLUS prompt Oracle

Leave a Reply Cancel reply

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

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Transfer SQL Profiles from One database to other database. Oracle
  • online_ts_bkup.sql Oracle
  • scripts to take listener.log backup Linux/Unix
  • Goldengate document from Porus Oracle
  • MYSQL and Oracle Comparison for Oracle DBA MYSQL
  • Check SQL Server edition SQL Server
  • Oracle 10g Wait Model Oracle
  • perf_today.sql Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme