Anonymous
Anonymous asked in 電腦與網際網路軟體 · 1 decade ago

如何透過ORACLE-RMAN來執行熱備份?

冷備份是先SHUTDOWN DB後再BACKUPDATABASE

那如何在RMAN下實現熱備份?

不是很想使用EXP或IMP~

Update:

run

{

allocate channel c1 type disk;

allocate channel c2 type disk;

allocate channel c3 type disk;

backup database

format 'd:\rman\%d_%s_%p_full'

plus

archivelog delete input

format 'd:\rman\%d_%s_%p_arch';

}

這段是sh嗎?

allocate channel c1 type disk;

plus

這兩個用途為何?

Update 2:

另外請教一下

我下

SQL> archive log list

卻出現ORA-01031:insufficient privileges

1 Answer

Rating
  • 1 decade ago
    Favorite Answer

    1.首先,要確認database 要把 archive log mode 打開,

    可以下

    SQL> archive log list

    查詢

    2.如果是 noarchivelog mode ,那必須把 DB shutdown,再 mount 起來,更改為 archivelog mode

    sqlplus / as sysdba

    shutdown immediate;

    startup mout

    alter database archivelog;

    alter database open;

    3.命令列用 rman 登入目標資料庫,再用以下指令備份,

    相關路徑檔名請配合實際情況加以修改即可

    例如:

    c:\ rman target /

    RMAN>

    run

    {

    allocate channel c1 type disk;

    allocate channel c2 type disk;

    allocate channel c3 type disk;

    backup database

    format 'd:\rman\%d_%s_%p_full'

    plus

    archivelog delete input

    format 'd:\rman\%d_%s_%p_arch';

    }

    2009-04-06 10:53:23 補充:

    這段是sh嗎?

    allocate channel c1 type disk;

    plus

    這兩個用途為何?

    ===> allocate channel c1 type disk

    是配置一個備份的通道給rman,類型是磁碟方式(有時候是磁帶),依您的設備而定

    ===> plus

    archivelog delete input

    連同歷史交易記錄一起備份,備份完後一併從磁碟機上刪除

    2009-04-06 10:53:33 補充:

    ==>ORA-01031:insufficient privileges

    您需要以 sysdba 的角色登入資料庫,才能查詢這些資訊

    例如:

    sqlplus sys/sys-password as sysdba 或

    sqlplus / as sysdba

Still have questions? Get your answers by asking now.