手工建立控制檔案

foreverlee發表於2005-03-08

1> 最首要的備份方法是將控制檔案備份為二進位制檔案.
ALTER DATABASE BACKUP CONTROLFILE TO '/oracle/backup/cf.bak' REUSE;
reuse:引數reuse的含義是可以直接將/oracle/backup/cf.bak代替現在的控制檔案
2>
A binary backup is preferable to a trace file backup because it
contains additional information such as the archived log history, offline range for
read-only and offline tablespaces, and backup sets and copies (if you use RMAN).
Note that binary control file backups do not include tempfile entries.
3> to trace方式備份控制檔案,獲取控制檔案建立指令碼,方便手工建立控制檔案.

[@more@]

1> 最首要的備份方法是將控制檔案備份為二進位制檔案.
ALTER DATABASE BACKUP CONTROLFILE TO '/oracle/backup/cf.bak' REUSE;
reuse:引數reuse的含義是可以直接將/oracle/backup/cf.bak代替現在的控制檔案
2>
A binary backup is preferable to a trace file backup because it
contains additional information such as the archived log history, offline range for
read-only and offline tablespaces, and backup sets and copies (if you use RMAN).
Note that binary control file backups do not include tempfile entries.
3> to trace方式備份控制檔案,獲取控制檔案建立指令碼,方便手工建立控制檔案.

SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

資料庫已更改。
SQL> show parameter user_dump_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
user_dump_dest                       string      D:oracleadminliyongudump

透過開啟D:oracleadminliyongudump目錄最近產生的trace檔案,
可以手工建立控制檔案.

CREATE CONTROLFILE REUSE DATABASE "LIYONG" NORESETLOGS  ARCHIVELOG
--  SET STANDBY TO MAXIMIZE PERFORMANCE
    MAXLOGFILES 5
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 1
    MAXLOGHISTORY 226
LOGFILE
  GROUP 1 'D:ORACLEORADATALIYONGREDO01.LOG'  SIZE 100M,
  GROUP 2 'D:ORACLEORADATALIYONGREDO02.LOG'  SIZE 100M,
  GROUP 3 'D:ORACLEORADATALIYONGREDO03.LOG'  SIZE 100M
-- STANDBY LOGFILE
DATAFILE
  'D:ORACLEORADATALIYONGSYSTEM01.DBF',
  'D:ORACLEORADATALIYONGUNDOTBS01.DBF',
  'D:ORACLEORADATALIYONGCWMLITE01.DBF',
  'D:ORACLEORADATALIYONGDRSYS01.DBF',
  'D:ORACLEORADATALIYONGEXAMPLE01.DBF',
  'D:ORACLEORADATALIYONGINDX01.DBF',
  'D:ORACLEORADATALIYONGODM01.DBF',
  'D:ORACLEORADATALIYONGTOOLS01.DBF',
  'D:ORACLEORADATALIYONGUSERS01.DBF',
  'D:ORACLEORADATALIYONGXDB01.DBF',
  'D:ORACLEORADATALIYONGBUSINESS.DBF',
  'D:ORACLEORADATALIYONGBILLING.DBF'
CHARACTER SET ZHS16GBK
;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/76065/viewspace-791939/,如需轉載,請註明出處,否則將追究法律責任。

相關文章