Think Foward Logo Tested on Oracle 8i Tested on Oracle 9i Tested on Oracle 10g

SQL Script

Coalesce Tablespaces

Updated: 26-Sep-2002
Version: 3.0

Description

Coalesces All tablespaces within a database.

Parameters

None

SQL Source

REM Copyright (C) Think Forward.com 1998- 2005. All rights reserved. 
set feedback off set verify off set serveroutput on size 20000 REM set timing on declare l_sql varchar2(254); cursor get_ts is select * from dba_tablespaces where status='ONLINE'and contents not in ('TEMPORARY','UNDO') ; ts_rec get_ts%ROWTYPE; begin FOR ts_rec IN get_ts LOOP l_sql := 'alter tablespace '||ts_rec.tablespace_name||' coalesce' ; dbms_output.put_line(l_sql); EXECUTE IMMEDIATE l_sql; END LOOP; dbms_output.put_line('Table Coalesce Completed.') ; end; /

Related Links

Oracle 8: (SQL Script) Coalesce Tablespaces

Return to Index of SQL Scripts


Site Map

General Information : Home | Company Profile | Contact Us | Legal
Database Support : Proactive Support | Pay Per Incident Support
Expert Services : High Availability | Creative Solutions | Training
Build Services : Oracle Installations | Revive your Oracle Setup | Low Cost Development
Free Oracle Resources: DBA Scripts | Oracle Links