Solved

alter table A move tablespace TB1

Posted on 2007-03-22
3
2,560 Views
Last Modified: 2013-12-19
Hi all,
          I want to move a table A using tablespace TB1 to tablespace TB2. In order to achieve this, i can issue     " alter table A move tablespace TB2" , but my question is can we do it on fly? or do we have to restrict anything before carrying this out? And also if the table has any indexes or constraints, is it necessary to move them too? or are they not affected by this?

Thanks,
Harris.
0
Comment
Question by:harris2107
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Accepted Solution

by:
gvsbnarayana earned 100 total points
ID: 18778705
Hi,
  You may consider online redefinition
This link may help you
http://www.dbspecialists.com/presentations/online_redef.html

HTH
Regards,
Badri.
0
 
LVL 4

Assisted Solution

by:kripa_odba
kripa_odba earned 100 total points
ID: 18791464
If you are using
Alter table tblname move tablesspacename   ,you need to restrict transactions which are using this table.
You don't have to move the indexes with the table to new tablespace.Indexes will continue to exists  in the tablespace where they belong previously.

When you move the table to a new tablespace the status of the indexes will become Unusable.So after moving the table you are suppose to rebuild the indexes... If your table is partitioned table and indexes are global indexes then you can use UPDATE GLOBAL INDEXES clause while moving the table.

Or otherwise you can use DBMS_REDEFINITION package for moving the  table to new tablespace as gvsbnarayana specified.In this case ,you don't have to restric the transations which uses the table in question.

Hope this will be helpful to you..

Regards
0
 
LVL 28

Assisted Solution

by:Naveen Kumar
Naveen Kumar earned 50 total points
ID: 18837322
As long as the table is not used by other programs/users for DML operations, you can move it to other tablespace.

But remember to rebuild the indexes of this table otherwise they will be in INVALID status and any program trying to access the data in the table with the help of the index will give an error.

Thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question