Oracle控制文件(Control Files)

控制文件包含:

数据库名

数据文件名称及位置

redo位置及名称

当前的log序列号

检查点信息

rman备份信息

 

创建新的控制文件:

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;


备份控制文件
ALTER DATABASE BACKUP CONTROLFILE TO '/oracle/backup/control.bkp';


控制文件数据字典相关视图

ViewDescription

V$DATABASE

Displays database information from the control file

V$CONTROLFILE

Lists the names of control files

V$CONTROLFILE_RECORD_SECTION

Displays information about control file record sections

V$PARAMETER

Displays the names of control files as specified in the CONTROL_FILESinitialization parameter



 

posted @ 2019-12-16 10:47  阿西吧li  阅读(681)  评论(0编辑  收藏  举报