步骤:sqlplus/nolog
conn sys/sys as sysdba;
alter system archive log current;alter tablespace test begin backup;
$copy !xcopy E:\oracle\product\10.2.0\oradata\orcl\test.dbf d:\databak/H/R;
alter tablespace test end backup;结束后在d盘 databak下产生了 test.dbf文件。这个文件如何用于oracle恢复我的表空间?
是否还需要备份其他的控制文件,日志文件?
conn sys/sys as sysdba;
alter system archive log current;alter tablespace test begin backup;
$copy !xcopy E:\oracle\product\10.2.0\oradata\orcl\test.dbf d:\databak/H/R;
alter tablespace test end backup;结束后在d盘 databak下产生了 test.dbf文件。这个文件如何用于oracle恢复我的表空间?
是否还需要备份其他的控制文件,日志文件?
数据库必须是归档状态,且初始化参数log_archive_start=true 备份:
alter tablespace 表空间名 begin backup;
然后用操作系统命令把该表空间的所有数据文件都拷到备份目录中.
拷完了,则
alter tablespace 表空间名 end backup; 恢复:
把备份的数据文件拷回到原来的位置.
recover tablespace 表空间名; 注意事项:
从begin backup开始之后的,所有归档日志,都要保持完好