oracle備份
備份
1 冷備份
完全離線備份(achivelog|noarchivelog)
shutdown
copy
2部分離線備份(歸檔模式)表空間
offline
os copy
3部分聯機備份
alter tablespace users begin backup;
oracle10g支援alter database begin backup;
select * from v$backup(裡面就是恢復的起點);
比change#小得都已經記錄在資料檔案裡面
備份也需要copy資料
這個我覺得只是記錄一個點。。就是從哪裡開始恢復
alter tablespace users end backup;
copy完需要給這個命令來結束備份
這種備份有風險
看看oracle的解釋
Detection of Fractured Blocks During Open Backups
One danger in making online backups is the possibility of inconsistent data within a block. For example, assume that you are backing up block 100 in datafile users.dbf. Also, assume that the copy utility reads the entire block while DBWR is in the middle of updating the block. In this case, the copy utility may read the old data in the top half of the block and the new data in the bottom top half of the block. The result is called a fractured block, meaning that the data contained in this block is not consistent. at a given SCN.
When performing backups of an open tablespace without using RMAN, you must put tablespaces in backup mode to prevent the creation of fractured blocks in your backup. When not in backup mode, the database records only changed bytes in the redo stream. When a tablespace is in backup mode, each time a block is changed the database writes the before-image of the entire block to the redo stream before modifying the block. Then, the database also records the changes to the block in the redo log. During user-managed recovery using SQL*Plus, the database applies both the captured block images and the recorded block changes from the redo logs. Applying the block images repairs any possible fractured blocks in the backup being restored and recovered.
RMAN does not require that you put datafiles into backup mode. During an RMAN backup, a database server session reads each block of the datafile and checks whether each block is fractured by comparing the block header and footer. If a block is fractured, the session re-reads the block. If the same fracture is found, then the block is considered permanently corrupt. If MAXCORRUPT is exceeded, the backup stops.
4,rman
run{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
backup as compressed backupset database
}
list backup;
crosscheck backupset;
delete expired backupset;
list backup of database;
restore preview database;預覽oracle使用哪個來恢復
from tag= 或者空格
delete noprompt obsolete;
backup archivelog all;
1shutdown
2copy
copy
online
事物之後 offline 損壞
online
rman target catalog
connect ,resouce,recovery_catalog_owner;角色;授予catalog裡面的rman使用者;
create catalog:建立一堆的物件到catalog資料庫;
現在還沒關聯上
register database;讀取target的控制檔案內容放到catalog表裡。
resync catalog;
catalog 命令。如果控制檔案損壞,重建控制檔案丟失備份資訊,可以把以前的備份檔案重新註冊到catalog裡面。
coverting column overflows integer datatype;
在rman裡面可以建立指令碼。必須在catalog模式;
create script. scr1
{backup as compressed backupset database;
delete noprompt obsolete;
backup archivelog all;
}
輸出指令碼內容print script. scr1;
指令碼必須在run裡面執行
execute script. scr1; }
print script. scr1 to file 'c:\1.txt';
replace script. scr1 from file 'c:\1.txt';
增量備份
backup incremental level=0 database;
bakkup incremental level=1 database;增量1;
backup incremental level=1 cumulative database;累計增量備份;
dbv檢查壞塊
也可以對單獨的資料檔案檢查;
rman可以單獨恢復壞塊。
blockrecover datafile 4 block 730;
drop表了。要恢復到drop之前
recover database until timestamp to_timestamp('')
必要條件v$datafile 和v$datafile_header;
線上聯機日誌損壞就不行了。做不完全恢復。
until sequence 就是恢復到比這個小的;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22374393/viewspace-710514/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle備份--離線備份Oracle
- oracle 備份Oracle
- oracle的熱備份和冷備份Oracle
- Oracle備份及備份策略及基於Linux下 Oracle 備份策略(RMAN)OracleLinux
- Oracle 冷備份Oracle
- Oracle 熱備份Oracle
- oracle rac 備份Oracle
- ORACLE備份策略Oracle
- ORACLE 備份表Oracle
- Oracle 聯機備份 離線備份 物理備份 恢復Oracle
- Oracle 11g RMAN備份-增量備份Oracle
- Oracle裡邏輯備份、物理備份、Rman備份的區別Oracle
- 揭祕ORACLE備份之--冷備份(也叫離線備份)Oracle
- 揭祕ORACLE備份之--熱備份(也叫聯機備份)Oracle
- oracle資料庫備份之exp增量備份Oracle資料庫
- Oracle 11g RMAN備份-備份標籤Oracle
- Oracle冷備份和熱備份的處理Oracle
- 揭祕ORACLE備份之--邏輯備份(EXP)Oracle
- 揭祕ORACLE備份之--邏輯備份(EXPDP)Oracle
- Oracle 熱備份和冷備份的區別Oracle
- Oracle冷備份(一致備份)指令碼Oracle指令碼
- ORACLE備份策略(轉)Oracle
- ORACLE備份指令碼Oracle指令碼
- oracle之rman備份Oracle
- ORACLE備份策略(1)Oracle
- ORACLE備份策略(2)Oracle
- ORACLE備份策略(3)Oracle
- ORACLE備份策略(4)Oracle
- Oracle RMAN 增量備份Oracle
- oracle rman備份命令Oracle
- oracle資料備份Oracle
- oracle 備份指令碼Oracle指令碼
- 【轉】Oracle rman備份Oracle
- oracle 如何不備份已經備份的歸檔Oracle
- Oracle 11g RMAN備份-一致備份Oracle
- ORACLE備份和恢復 - 邏輯備份 exp/impOracle
- 揭祕ORACLE備份之----RMAN之二(備份方式)Oracle
- Oracle學習系列—資料庫備份—熱備份Oracle資料庫