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/