rman備份腳本和rman增量備份腳本分享
一、單獨(dú)備份
1、經(jīng)典整庫備份:backup as compressed backupset database include current controlfile plus archivelog delete all input;
2、tablespace:backup tablespace 名字;
3、數(shù)據(jù)文件:backup datafile n; (n:具體的數(shù)據(jù)文件編號(hào)select file_name,file_id,tablespace_name from dba_data_files;)
4、控制文件:backup current controlfile;或者backup database include current controlfile;
5、日志文件:backup archivelog all;或者 database plus archivelog;
6、參數(shù)文件:backup spfile;
7、全庫備份腳本:
run{
allocate channel c1 type disk;
backup full tag ‘dbfull' format ‘/backup/full%u_%s_%p' database
include current controlfile;
sql ‘a(chǎn)lter system archive log current'; #在數(shù)據(jù)庫進(jìn)行全備份完成之后,需要執(zhí)行該條命令將當(dāng)前日志歸檔,備份歸檔日志時(shí)應(yīng)該包括最后生成的歸檔
backup filesperset 3 format ‘/backup/arch%u_%s_%p'#filesperset 3設(shè)定每個(gè)備份集里文件不超過3個(gè)
archivelog all delete input; #備份歸檔可選,可以單獨(dú)定期備份
release channel c1;
}
二、增量備份
1、0級增量備份
run{
allocate channel c1 type disk;
backup incremental level 0 tag ‘db0' format ‘/backup/db0%u_%s_%p'database
include current controlfile; ;
sql 'alter system archive log current';#在數(shù)據(jù)庫進(jìn)行全備份完成之后,需要執(zhí)行該條命令將當(dāng)前日志歸檔,備份歸檔日志時(shí)應(yīng)該包括最后生成的歸檔
backup filesperset 3 format ‘/backup/arch%u_%s_%p'#filesperset 3設(shè)定每個(gè)備份集里文件不超過3個(gè)
archivelog all delete input; #備份歸檔可選,可以單獨(dú)定期備份
release channel c1;
}
2、1級備份腳本
run{
allocate channel c1 type disk;
backup incremental level 1 tag ‘db1' format ‘/backup/db1%u_%s_%p'
database skip readonly include current controlfile;
backup filesperset 3 format ‘/backup/arch%u_%s_%p'#filesperset設(shè)定每個(gè)備份集里文件不超過3個(gè)
archivelog all delete input; #備份歸檔可選,可以單獨(dú)定期備份
release channel c1;
}
- catalog方式的rman備份與恢復(fù)示例
- win平臺(tái)oracle rman備份和刪除dg備庫歸檔日志腳本
- ORACLE 數(shù)據(jù)庫RMAN備份恢復(fù)
- rman配置及rman常用命令操作
- rman恢復(fù)方案和oracle異機(jī)恢復(fù)
- .NET性能調(diào)優(yōu)之一:ANTS Performance Profiler的使用介紹
- High Performance JavaScript(高性能JavaScript)讀書筆記分析
- Oracle RMAN快速入門指南
- JDBCTM 指南:入門3 - DriverManager
- linux自動(dòng)運(yùn)行rman增量備份腳本
相關(guān)文章
Oracle創(chuàng)建自增字段--ORACLE SEQUENCE的簡單使用介紹
在oracle中sequence就是所謂的序列號(hào),每次取的時(shí)候它會(huì)自動(dòng)增加,一般用在需要按序列號(hào)排序的地方接下來為大家介紹下Oracle創(chuàng)建自增字段方法感興趣的各位可不要錯(cuò)過了哈2013-03-03
Oracle?11g+windows?環(huán)境下Ecology7系統(tǒng)安裝過程
這篇文章主要介紹了Oracle?11g+windows?環(huán)境下Ecology7系統(tǒng)安裝,安裝步驟是以管理員模式運(yùn)行Oracle setup.exe文件,根據(jù)提示安裝Oracle,創(chuàng)建數(shù)據(jù)庫,注意修改連接數(shù),本文給大家詳細(xì)講解,需要的朋友可以參考下2022-10-10
win x64下安裝oracle 12c出現(xiàn)INS-30131報(bào)錯(cuò)的解決方法
這篇文章主要介紹了win x64下安裝oracle 12c出現(xiàn)INS-30131報(bào)錯(cuò)的解決方法,感興趣的小伙伴們可以參考一下2016-07-07
Oracle客戶端版本及位數(shù)(Windows系統(tǒng))查看方法
這篇文章主要介紹了Windows系統(tǒng)下Oracle客戶端版本及位數(shù)查看方法,感興趣的小伙伴們可以參考一下2016-08-08
怎么才能限制SQL Server只能讓指定的機(jī)器連接
怎么才能限制SQL Server只能讓指定的機(jī)器連接...2007-03-03
解決Oracle?11g?導(dǎo)出數(shù)據(jù)報(bào)?“ORA-01455:?轉(zhuǎn)換列溢出整數(shù)數(shù)據(jù)類型”的問題
這篇文章主要介紹了Oracle?11g?導(dǎo)出數(shù)據(jù)報(bào)?“ORA-01455:?轉(zhuǎn)換列溢出整數(shù)數(shù)據(jù)類型”的問題,文中給大家介紹了ORACLE?11g?導(dǎo)出數(shù)據(jù)的操作步驟,需要的朋友可以參考下2021-12-12
Oracle使用TRUNCATE TABLE清空多個(gè)表的應(yīng)用實(shí)例
在數(shù)據(jù)庫管理中,TRUNCATE TABLE 是一個(gè)非常實(shí)用的命令,然而,在Oracle數(shù)據(jù)庫中,TRUNCATE TABLE 命令是針對單個(gè)表的操作,不直接支持在一個(gè)語句中清空多個(gè)表,本文探討如何在Oracle環(huán)境中高效地對多個(gè)表執(zhí)行 TRUNCATE TABLE,并提供實(shí)際的應(yīng)用場景示例2024-05-05
Oracle CBO優(yōu)化模式中的5種索引訪問方法淺析
這篇文章主要介紹了Oracle CBO優(yōu)化模式中的5種索引訪問方法淺析,包含索引唯一掃描、索引范圍掃描、索引全掃描、索引跳躍掃描、索引快速全掃描等內(nèi)容,需要的朋友可以參考下2014-07-07

