DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: What happens if I rebuild a table online?

  1. #1
    Join Date
    Apr 2001
    Location
    Congleton
    Posts
    258
    I want to rebuild an 'active' table online, e.g. alter table ... move .... Will this cause any problems to users, i.e. locks etc.
    Thanks.

  2. #2
    Join Date
    Oct 2001
    Posts
    83
    I found this in METALINK :

    "When you move a table, Oracle will take out an exclusive lock on it as it does with any other ALTER TABLE operation. Any DML the users issue will hang waiting for the lock to be released. "



  3. #3
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    in 8i you get a lock, in 9i you should be able to move online

  4. #4
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by pando
    in 8i you get a lock, in 9i you should be able to move online
    No, even in 9i (at least in release 1) you can't move table online (that is by using command "ALTER TABLE .... MOVE ONLINE;" unless it is index-organized table (IOT). So you still get a lock on the table and no DML activities are possible for the duration of the MOVE process.

    Mybe this has changed in 9iRel2, haven't check yet....
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  5. #5
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    I havent checked neither, I was told by a guy who works as on-site dba in oracle (but then again this guy is clueless.... even working in oracle but well I took his word since he could get some interesting notes from web iv heh)

  6. #6
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Jurij's right. Even in 9iR2, there is no 'alter table emp rebuild online' command. But there is a new package called DBMS_REDEFINITON. With it, you can rebuild tables online by using incrementally maintainable materialized views. There are some restrictions however:

    1. The table must have a primary key.

    2. Tables with materialized views and snapshot logs cannot be rebuilt online.

    3. MVIEW container tables and AQ tables cannot be reorganized online.

    4. IOT overflow tables cannot be reorganized online.

    5. Tables containing user-defined types, bfile or long columns cannot be rebuilt online.
    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g,12c
    email: ocp_9i@yahoo.com

  7. #7
    Join Date
    Mar 2001
    Location
    Ireland/Dublin
    Posts
    688
    When you movig table all indexes become invalid.
    Best wishes!
    Dmitri

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width