WEB开发网
开发学院数据库Oracle oracle rman备份命令-备份恢复 阅读

oracle rman备份命令-备份恢复

 2008-11-10 12:59:55 来源:WEB开发网   
核心提示: 备份单独数据文件run {allocate channel c1 type disk;backup format '/export/home/oracle/oradata/bak_tab/%d_%u'(datafile '/export/home/oracle/or

备份单独数据文件

run {
allocate channel c1 type disk;
backup format '/export/home/oracle/oradata/bak_tab/%d_%u'
(datafile '/export/home/oracle/oradata/ECOM/block01.dbf');
release channel c1;
}

复制目标数据库数据文件:

run {
allocate channel c1 type disk;
copy datafile '/export/home/oracle/oradata/ECOM/block02.dbf' to '/export/home/oracle/oradata/bak_tab/block02.dbf' tag=u1215;
release channel c1;
}

备份控制文件:

run {
allocate channel c1 type disk;
backup format '/export/home/oracle/oradata/bak_cont/cf_t%t_s%s_p%p'
tag cf_monday_night (current controlfile);
release channel c1;
}
  
run {
allocate channel d1 type disk;
backup current controlfile format '/export/home/oracle/oradata/bak_tab/%d%t%s.ctl';
}
run {
allocate channel d1 type disk;
copy current controlfile to '/export/home/oracle/oradata/bak_tab/%d%t%s.ctl';
}

/////////////////////归档模式使用RMAN备份//////////////////////

归档日志备份:

run {
allocate channel c1 type disk;
backup format '/export/home/oracle/oradata/bak_log/log_t%t_s%s_p%p'
(archivelog all);
release channel c1;
}

下面的脚本归档日志从# 90 to 100:

run {
allocate channel c1 typye disk;
backup format '/export/home/oracle/oradata/bak_log/log_t%t_s%s_p%p'
(archivelog from logseq=90 until logseq=100 thread 1);
release channel c1;
}

上一页  1 2 3 4 5 6 7  下一页

Tags:oracle rman 备份

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接