共计 1005 个字符,预计需要花费 3 分钟才能阅读完成。
这期内容当中丸趣 TV 小编将会给大家带来有关 RMAN 常用脚本是怎样的,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。
在学习了 rman 后自我感觉比较好用的脚本,仅供参考。
打开控制文件备份
CONFIGURE CONTROLFILE AUTOBACKUP ON;
备份归档日志
run{
crosscheck archivelog all;
delete noprompt expired archivelog all;
backup archivelog all;
format /backup/archlog/arch_%d_%T_%s
}
备份全库
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE DISK;
ALLOCATE CHANNEL c2 DEVICE TYPE DISK;
cross check backupset;
delete expired archivelog all;
BACKUP database format‘/backup/backupset/rman_full_%d_%T_%s’;
release CHANNEL c1 ;
release channel c2;
}
0 级备份
{
ALLOCATE CHANNEL c1 DEVICE TYPE DISK;
ALLOCATE CHANNEL c2 DEVICE TYPE DISK;
BACKUP incremental level 0 database format‘/backup/backupset/rman_incre_0_%d_%T_%s’;
cross check backupset;
delete noprompt expired backupset;
delete noprompt obsolete;
release CHANNEL :c1 ;
release channel :c2;
}
1 级增量备份
run {
backup incremental level=1 cumulative tag bys001-1 database
format /backup/full/bys001full_%d_%t_%s
plus archivelog
format /backup/full/bys001arch_%d_%t_%s
delete all input;
}
上述就是丸趣 TV 小编为大家分享的 RMAN 常用脚本是怎样的了,如果刚好有类似的疑惑,不妨参照上述分析进行理解。如果想知道更多相关知识,欢迎关注丸趣 TV 行业资讯频道。