Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Moving Table with Long columns

RE: Moving Table with Long columns

From: Eric Buddelmeijer <Eric.Buddelmeijer_at_elegant.nl>
Date: Thu, 16 Dec 2004 12:14:00 +0100
Message-Id: <20041216111403.931974830A@orange.qinip.net>


Hi,

I used below script to create sql to move tables containing CLOB's and BLOB's to another tablespace. I suspect it will work for LONG's as well, after some adaptation.

Kind regards,
Eric.

select 'alter table '||table_name||' move tablespace <some new name>;' from dba_tables
where tablespace_name = '<some old name>' order by table_name

select 'alter table ' ||t.table_name||' move lob ('||c.column_name||') store as (tablespace <some new name>);'
from dba_tab_columns c
join dba_tables t on c.owner = t.owner and c.table_name = t.table_name where data_type like '%LOB%'
and tablespace_name = '<some old name>'

-----Oorspronkelijk bericht-----

Van: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] Namens pawan.dalmia_at_pharma.novartis.com
Verzonden: donderdag 16 december 2004 11:54 Aan: oracle-l_at_freelists.org
Onderwerp: Moving Table with Long columns

Hi
I want to move the table to different tablespace but table has long column how this thing can be done.

Regards
Pawan Dalmia
Oracle DBA-Business Intelligence
Desk-566
Cell 9819718753

--

http://www.freelists.org/webpage/oracle-l

--

http://www.freelists.org/webpage/oracle-l Received on Thu Dec 16 2004 - 05:15:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US