How to reorganize the table online??
i am new bee
i have faced one question in an interview.how to reorganize the existing table without disturbing the active users??
could u help me to find out the answer?
thanx in advance
there is always some price to pay...
use "alter table move" to reorg the table.
use "alter index rebuild online" to reorg the indexes.
At least your users will have table always available, with non-usable indexes at some point in time.
Pablo (Paul) Berzukov
Author of Understanding Database Administration
available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
better question is why you think you need to do it
Davey, nicely done. That's precisely the answer the interviewer should have been looking for.
you can try DBMS_REDEFINITION
Originally Posted by KenEwald
Or maybe the interview expect you to return a question like:
"In what version are we talking about here?"
if it's 10g then as what pando says "try DBMS_REDIFINITION"
DBMS_REDEFINITION is also available in 9i.
Originally Posted by reydp
Actually, though I've heared this before, I haven't used this.
Seems like new things to experiment.
Click Here to Expand Forum to Full Width