RMAN備份
-----------------------------------------------------------------------------------------

# rman target / nocatalog

RMAN> run {
2> allocate channel c1 type disk;
3> backup format 'd:/rman_back/tab_back_%u_%u_%p'
4> tablespace testback;
5> release channel c1;
6> }

RMAN> show all;

RMAN> exit




RMAN還原
-----------------------------------------------------------------------------------------

查詢需要修復的TABLE,我們要找的是FILE#,也可以使用FILE NAME

在修復之前,最好把該DATAFILE OFFLINE

SQL>alter database datafile '資料檔名' offline;

SQL> select * from v$recover_file;

FILE#  ONLINE         ONLINE_STATUS     ERROR                            CHANGE#   TIME
    6         ONLINE         ONLINE                     FILE NOT FOUND          0

RMAN> run{
2> allocate channel c1 type disk;
3> restore datafile 6;
4> recover datafile 6;
5> release channel c1;
6> }
arrow
arrow
    全站熱搜

    keven 發表在 痞客邦 留言(0) 人氣()