Oracle 11g rename. Guaranteed to be atomic?

前端 未结 5 1773
伪装坚强ぢ
伪装坚强ぢ 2021-01-13 13:00

I have some (5) rename statements in a plsql script

drop table new;
rename old to new;

\"old\" tables hold very valuable information.

5条回答
  •  执念已碎
    2021-01-13 13:33

    I'm guessing you're worried that concurrent DML (inserts/updates/deletes) on the old table might get missed during the rename? In which case, don't worry - RENAME is DDL and it locks the table for the duration.

提交回复
热议问题