lodopidolo's blog
Move all database objects from one tablespace to another
Submitted by lodopidolo on Wed, 2010-05-26 12:50Sometime is necessary to move all database objects from one tablespace to another.
Basically are tables, indexes and lobs.
This script permit move database objects from one user and/or tablespace to another:
[code]
set echo off
set heading off
var tbs_source varchar2;
var tbs_dest varchar2;
var schema_user varchar2;
-- '' if it isn't relevant.
exec :tbs_source := 'SOURCE_TBS';
-- '' if it isn't relevant.
exec :schema_user := 'SOURCE_USER';
exec :tbs_dest := 'DEST_TBS';
select 'Transporting tablespace ' || :tbs_source || ' or user ' || :schema_user || ' to tables

