Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Postgres DB user and OS user. POSTGRESQL
  • MYSQL for Oracle DBA MYSQL
  • find_pk.sql /* Find Primary Key */ Oracle
  • Windows based Command line mailing program like mailx (Sednmail for windows) PHP/MYSQL/Wordpress
  • Oracle 10g Installation/Applying Patches Tips Oracle
  • How To Transfer Passwords Between Databases (ref note: 199582.1) Oracle
  • 556976.1 Oracle Clusterware: Components installed Oracle
  • export import with parameter file. Oracle
  • findinfo.sql (SQL for getting CPU and Active session info) Oracle
  • move_arch_files.ksh Linux/Unix
  • replacing ^M character when passing files from Windows to Unix Linux/Unix
  • Standby Database Behavior when a Datafile is Resized on the Primary Database Note:123883.1 Oracle
  • Privileges Required to Create Procedures and Functions that uses objects from other schema. Oracle
  • Consolidated Reference List Of Notes For Migration / Upgrade Service Requests -ID 762540.1 Oracle
  • Read CSV File using Python Python/PySpark

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

  • Renaming the column name Oracle
  • tblwopk.sql tablewopk.sql Oracle
  • Does DBMS_JOB recompute the NEXT_DATE interval after or before Oracle
  • OPENING A STANDBY DATABASE IN READ-ONLY MODE Oracle
  • How to calculate PROCESSES parameter Oracle
  • sbind.sql Find Bind variable from sql_id sqlid 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 (400)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (348)
  • SQL Server (6)
  • Uncategorized (3)
  • Videos (0)

Recent Posts

  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026
  • Creating a Container Database using dbaascli08-Apr-2026
  • track_autoupgrade_copy_progress.sql01-Apr-2026
  • refre.sql for multitenant01-Apr-2026
  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Oracle Release Explaination Oracle
  • Generating XML from SQLPLUS Oracle
  • How do I get Oracle to automatically start when my server boots up? Oracle
  • scripts to take listener.log backup Linux/Unix
  • Follwoing korn shell is used to move files from source folder to destination folder and gzip it in destination folder. mv_iotto.ksh Linux/Unix
  • prepfiles.sh for step by step generating pending statistics files Oracle
  • Remove duplicate rows from table Oracle
  • Histogram Overview Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme