---------- oracle rman 备份与恢复 ------
-- rman 自动备份脚本 2011/7/23 14:32:55
rman target / log=/oracle/bk_rman/rmanbackup.log <<!
# -- as compressed backupset 压缩备份
# -- filesperset 2 用多少个线程;---好像翻译名字不对;
backup as compressed backupset filesperset 2 database format '/oracle/bk_rman/%u';
backup archivelog all format '/oracle/bk_rman/%u.bk';
delete noprompt obsolete;
!
-- 玩恢复;2011/7/23 14:38:36
-- 做业务
col NAME for a50
select FILE#, name from V$datafile;
update scott.emp set sal=sal+1;
commit;
alter system switch logfile;
-- rman 恢复到新的位置 2011/7/23 15:15:48
-- 假如 源文件 为 去哪
-- 到哪去
-- 源文件
-- 源文件
-- 到哪去
-- 去 rman 中执行;
RUN
{
ALLOCATE CHANNEL d1 DEVICE TYPE DISK;
SQL "ALTER TABLESPACE users OFFLINE IMMEDIATE";
SET NEWNAME FOR DATAFILE '/oracle/oradata/orcl_new/users01.dbf'
TO '/oracle/oradata/users01.QQ';
RESTORE DATAFILE '/oracle/oradata/orcl_new/users01.d
oracle rman 备份与恢复 临时表空间的文件问题解决 留痕
最新推荐文章于 2023-11-10 23:15:38 发布