Solved

alter table A move tablespace TB1

Posted on 2007-03-22
3
2,547 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
Create table from select - oracle 6 65
ORA-02288: invalid OPEN mode 2 79
Need SQL Query to Find Foreign-keys Without Indexed Columns 4 33
error in oracle form 11 19
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

735 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