oracle檔案管理之 control file

polestar123發表於2009-07-21

1、備份控制檔案:

ALTER DATABASE BACKUP CONTROLFILE TO '/oracle/backup/control.bkp';
ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

2、損壞 重建

CREATE CONTROLFILE
SET DATABASE prod
LOGFILE GROUP 1 ('/u01/oracle/prod/redo01_01.log',
'/u01/oracle/prod/redo01_02.log'),
GROUP 2 ('/u01/oracle/prod/redo02_01.log',
'/u01/oracle/prod/redo02_02.log'),
GROUP 3 ('/u01/oracle/prod/redo03_01.log',
'/u01/oracle/prod/redo03_02.log')
RESETLOGS
DATAFILE '/u01/oracle/prod/system01.dbf' SIZE 3M,
'/u01/oracle/prod/rbs01.dbs' SIZE 5M,
'/u01/oracle/prod/users01.dbs' SIZE 5M,
'/u01/oracle/prod/temp01.dbs' SIZE 5M
MAXLOGFILES 50
MAXLOGMEMBERS 3
MAXLOGHISTORY 400
MAXDATAFILES 200
MAXINSTANCES 6
ARCHIVELOG;

3、一般情況下,多路中的一路損壞

1)shutdown

2)編輯pfile CONTROL_FILES;copy一個好的到新位置。

3)startup

4、control file相關檢視

select * from V$DATABASE;
select * from V$CONTROLFILE;
select * from V$CONTROLFILE_RECORD_SECTION;
select * from V$PARAMETER where name = 'control_files';

[@more@]

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

相關文章