RUN{
SQL “alter tablespace users offline immediate”;
SET NEWNAME FOR datafile ‘/ORADATA/u03/users01.dbf’#u03 is not exists
to ‘/ORADATA/u04/users01.dbf’; #Specify where to restore the file
RESTORE tablespace users; #Restore the datafile
SWITCH datafile 3;#Update the control file and recovery catalog
RECOVER TABLESPACE users; #Recover the tablespace
SQL “alter tablespace users online”;}
SQL “alter tablespace users offline immediate”;
SET NEWNAME FOR datafile ‘/ORADATA/u03/users01.dbf’#u03 is not exists
to ‘/ORADATA/u04/users01.dbf’; #Specify where to restore the file
RESTORE tablespace users; #Restore the datafile
SWITCH datafile 3;#Update the control file and recovery catalog
RECOVER TABLESPACE users; #Recover the tablespace
SQL “alter tablespace users online”;}
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12807983/viewspace-698019/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12807983/viewspace-698019/
本文介绍了一种Oracle数据库中用户表空间的迁移方法,包括离线表空间、更改数据文件路径、恢复及切换数据文件等步骤,并最终使表空间重新上线。
1614

被折叠的 条评论
为什么被折叠?



