Home » RDBMS Server » Performance Tuning » move all objects from tbs to new tbs /rebuild all indexes to new tbs
move all objects from tbs to new tbs /rebuild all indexes to new tbs [message #199996] Fri, 27 October 2006 06:03 Go to next message
caraless
Messages: 7
Registered: October 2006
Location: Pomigliano D'arco
Junior Member
Hy,
I needed to know the mode to move the objects from two tablespace (data and index) in the two new tablespace (data and index) and after if need rebuild all indexes to new tbs.
example :
alter index BDB000000.AGAAA00 rebuild tablespace TSB0000001
thank you
Re: move all objects from tbs to new tbs /rebuild all indexes to new tbs [message #200107 is a reply to message #199996] Sat, 28 October 2006 00:05 Go to previous message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

YOu have to create one script for move object from one to another.


http://asktom.oracle.com/pls/ask/f?p=4950:8:1471693842006157951::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:47812348053


just go through above link.
[code]
SQL> column segment_name format a30
SQL> column tablespace_name format a30
SQL> select segment_name , tablespace_name from user_segments;

SEGMENT_NAME TABLESPACE_NAME
------------------------------ ------------------------------
FLASSH USERS
TEST_SYN USERS
USR_INFO USERS
EMP_HIST USERS
EMPLOYEES USERS
TEST_DATE USERS
DATE_TEST USERS
AVGSAL USERS
TTAA USERS
........
......

SQL> set heading off
SQL> set verify off
SQL> set feedback off
SQL> spool on
SQL> spool temp.sql
SQL> select 'alter table' || segment_name || ' move tablespace example '
2 from user_segments;

alter tableFLASSH move tablespace example
alter tableDUMMY move tablespace example
alter tableTEST_SYN move tablespace example
alter tableUSR_INFO move tablespace example
alter tableEMP_HIST move tablespace example
alter tableEMPLOYEES move tablespace example
.............
sql>spool off
sql>@temp.sql

*********
sql>

[Updated on: Sat, 28 October 2006 00:26]

Report message to a moderator

Previous Topic: problem when dropping table
Next Topic: Find the Explain Plan from Trace File
Goto Forum:
  


Current Time: Mon Apr 29 16:31:18 CDT 2024