73.undo文件迁移

UNDO文件迁移
1.开归档
2.新建一个undo表空间
create undo tablespace undotbs2 datafile 'xxxx' size 1g autoextend on;
3.切换表空间
alter system set undo_tablespace='undotbs2';
4.停用undo
alter tablespace  undotbs1 offline;
5.offline 需要迁移的undo文件
alter database  datafile  'xxxxxx'  offline;
6.通过rman迁移数据文件
rman target /
copy datafile  '原位置' to '目标位置';
run{
    set newname for datafile 'xxxxx' to 'xxxxxx';
    switch datafile all;
}
7.把刚迁移过的数据文件和表空间online
alter database datafile 'xxxxx' online;
alter tablespace undotbs1 online;

8.切换原undo
alter system set undo_tablespace='undotbs1';
9.下线临时添加的undotbs2
drop tablespace undotbs2  including contents and datafiles;
10.手工删除没有用的undo文件
11.关归档,重启

posted on 2024-05-15 08:54  太白金星有点烦  阅读(13)  评论(0编辑  收藏  举报

导航