oracle 控制文件的重建

目录

  • oracle 控制文件的重建

    • NORESETLOGS
    • RESETLOGS

oracle 控制文件的重建

不到最后时刻,如三个控制文件都已损坏,又没有控制文件的备份。还是不要重建控制文件,处理不好就会有数据丢失。

NORESETLOGS

Set #1. NORESETLOGS case
--
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
-- Additional logs may be required for media recovery of offline
-- Use this only if the current versions of all online logs are
-- available.
-- After mounting the created controlfile, the following SQL
-- statement will place the database in the appropriate
-- protection mode:
--  ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "KYEUPDB" NORESETLOGS  NOARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 4096
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 ‘+DGSYSTEM/kyeupdb/onlinelog/group_1.266.978829167‘  SIZE 200M BLOCKSIZE 512,
  GROUP 2 ‘+DGSYSTEM/kyeupdb/onlinelog/group_2.267.978829169‘  SIZE 200M BLOCKSIZE 512,
  GROUP 3 ‘+DGSYSTEM/kyeupdb/onlinelog/group_3.268.978829173‘  SIZE 200M BLOCKSIZE 512,
  GROUP 4 ‘+DGSYSTEM/kyeupdb/onlinelog/group_4.269.978829183‘  SIZE 200M BLOCKSIZE 512,
  GROUP 5 ‘+DGSYSTEM/kyeupdb/onlinelog/group_5.270.978829193‘  SIZE 200M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
  ‘+DGSYSTEM/kyeupdb/datafile/system.271.978829205‘,
  ‘+DGSYSTEM/kyeupdb/datafile/sysaux.272.978829265‘,
  ‘+DGSYSTEM/kyeupdb/datafile/undotbs1.273.978829323‘,
  ‘+DGSYSTEM/kyeupdb/datafile/users.275.978829391‘,
  ‘+DGSYSTEM/kyeupdb/datafile/ts_example.277.978855421‘,
  ‘+DGSYSTEM/kyeupdb/datafile/kye_tbs02.dbf‘
CHARACTER SET ZHS16GBK
;
-- Commands to re-create incarnation table
-- Below log names MUST be changed to existing filenames on
-- disk. Any one log file from each branch can be used to
-- re-create incarnation records.
-- ALTER DATABASE REGISTER LOGFILE ‘/oracle/app/oracle/product/11.2.0/dbs/arch1_1_978829161.dbf‘;
-- Recovery is required if any of the datafiles are restored backups,
-- or if the last shutdown was not normal or immediate.
RECOVER DATABASE
-- Database can now be opened normally.
ALTER DATABASE OPEN;
-- Files in normal offline tablespaces are now named.
ALTER DATABASE RENAME FILE ‘MISSING00006‘
  TO ‘+DGSYSTEM/kyeupdb/datafile/kye_tbs01.dbf‘;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE ‘+DGSYSTEM/kyeupdb/tempfile/temp.274.978829379‘
     SIZE 1024M REUSE AUTOEXTEND OFF;
-- End of tempfile additions.

操作:

[BEGIN] 2018/6/22 21:28:55
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area 3858223104 bytes
Fixed Size          2259080 bytes
Variable Size         788531064 bytes
Database Buffers     3053453312 bytes
Redo Buffers           13979648 bytes
CREATE CONTROLFILE REUSE DATABASE "KYEUPDB" NORESETLOGS  NOARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 4096
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 ‘+DGSYSTEM/kyeupdb/onlinelog/group_1.266.978829167‘  SIZE 200M BLOCKSIZE 512,
  GROUP 2 ‘+DGSYSTEM/kyeupdb/onlinelog/group_2.267.978829169‘  SIZE 200M BLOCKSIZE 512,
  GROUP 3 ‘+DGSYSTEM/kyeupdb/onlinelog/group_3.268.978829173‘  SIZE 200M BLOCKSIZE 512,
  GROUP 4 ‘+DGSYSTEM/kyeupdb/onlinelog/group_4.269.978829183‘  SIZE 200M BLOCKSIZE 512,
  GROUP 5 ‘+DGSYSTEM/kyeupdb/onlinelog/group_5.270.978829193‘  SIZE 200M BLOCKSIZE 512
DATAFILE
  ‘+DGSYSTEM/kyeupdb/datafile/system.271.978829205‘,
  ‘+DGSYSTEM/kyeupdb/datafile/sysaux.272.978829265‘,
  ‘+DGSYSTEM/kyeupdb/datafile/undotbs1.273.978829323‘,
  ‘+DGSYSTEM/kyeupdb/datafile/users.275.978829391‘,
  ‘+DGSYSTEM/kyeupdb/datafile/ts_example.277.978855421‘,
  ‘+DGSYSTEM/kyeupdb/datafile/kye_tbs02.dbf‘
CHARACTER SET ZHS16GBK
 21  ;

Control file created.

SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required

SQL> alter database open;

Database altered.

SQL> select * from dba_temp_files;

no rows selected

ALTER TABLESPACE TEMP ADD TEMPFILE ‘+DGSYSTEM/kyeupdb/tempfile/temp.274.978829379‘
  2       SIZE 1024M REUSE AUTOEXTEND OFF;

Tablespace altered.

SQL> select * from dba_temp_files;

FILE_NAME
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   FILE_ID TABLESPACE_NAME             BYTES     BLOCKS STATUS  RELATIVE_FNO AUT   MAXBYTES  MAXBLOCKS INCREMENT_BY USER_BYTES USER_BLOCKS
---------- ------------------------------ ---------- ---------- ------- ------------ --- ---------- ---------- ------------ ---------- -----------
+DGSYSTEM/kyeupdb/tempfile/temp.274.978829379
     1 TEMP               1073741824     131072 ONLINE         1 NO            0          0 1072693248      130944

[END] 2018/6/22 21:49:09

RESETLOGS

--     Set #2. RESETLOGS case
--
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
-- The contents of online logs will be lost and all backups will
-- be invalidated. Use this only if online logs are damaged.
-- After mounting the created controlfile, the following SQL
-- statement will place the database in the appropriate
-- protection mode:
--  ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "KYEUPDB" RESETLOGS  NOARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 4096
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 ‘+DGSYSTEM/kyeupdb/onlinelog/group_1.266.978829167‘  SIZE 200M BLOCKSIZE 512,
  GROUP 2 ‘+DGSYSTEM/kyeupdb/onlinelog/group_2.267.978829169‘  SIZE 200M BLOCKSIZE 512,
  GROUP 3 ‘+DGSYSTEM/kyeupdb/onlinelog/group_3.268.978829173‘  SIZE 200M BLOCKSIZE 512,
  GROUP 4 ‘+DGSYSTEM/kyeupdb/onlinelog/group_4.269.978829183‘  SIZE 200M BLOCKSIZE 512,
  GROUP 5 ‘+DGSYSTEM/kyeupdb/onlinelog/group_5.270.978829193‘  SIZE 200M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
  ‘+DGSYSTEM/kyeupdb/datafile/system.271.978829205‘,
  ‘+DGSYSTEM/kyeupdb/datafile/sysaux.272.978829265‘,
  ‘+DGSYSTEM/kyeupdb/datafile/undotbs1.273.978829323‘,
  ‘+DGSYSTEM/kyeupdb/datafile/users.275.978829391‘,
  ‘+DGSYSTEM/kyeupdb/datafile/ts_example.277.978855421‘,
  ‘+DGSYSTEM/kyeupdb/datafile/kye_tbs02.dbf‘
CHARACTER SET ZHS16GBK
;
-- Commands to re-create incarnation table
-- Below log names MUST be changed to existing filenames on
-- disk. Any one log file from each branch can be used to
-- re-create incarnation records.
-- ALTER DATABASE REGISTER LOGFILE ‘/oracle/app/oracle/product/11.2.0/dbs/arch1_1_978829161.dbf‘;
-- Recovery is required if any of the datafiles are restored backups,
-- or if the last shutdown was not normal or immediate.
RECOVER DATABASE USING BACKUP CONTROLFILE
-- Database can now be opened zeroing the online logs.
ALTER DATABASE OPEN RESETLOGS;
-- Files in normal offline tablespaces are now named.
ALTER DATABASE RENAME FILE ‘MISSING00006‘
  TO ‘+DGSYSTEM/kyeupdb/datafile/kye_tbs01.dbf‘;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE ‘+DGSYSTEM/kyeupdb/tempfile/temp.274.978829379‘
     SIZE 1024M REUSE AUTOEXTEND OFF;
-- End of tempfile additions.

操作如下:

[BEGIN] 2018/6/22 21:58:29
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[[email protected] ~]$ sqlplus ‘/as sysdba‘

SQL*Plus: Release 11.2.0.4.0 Production on Fri Jun 22 21:58:41 2018

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL> archive log list;
Database log mode          No Archive Mode
Automatic archival         Disabled
Archive destination        /oracle/app/oracle/product/11.2.0/dbs/arch
Oldest online log sequence     10
Current log sequence           14
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
CREATE CONTROLFILE REUSE DATABASE "KYEUPDB" RESETLOGS  NOARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 4096
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 ‘+DGSYSTEM/kyeupdb/onlinelog/group_1.266.978829167‘  SIZE 200M BLOCKSIZE 512,
  GROUP 2 ‘+DGSYSTEM/kyeupdb/onlinelog/group_2.267.978829169‘  SIZE 200M BLOCKSIZE 512,
  GROUP 3 ‘+DGSYSTEM/kyeupdb/onlinelog/group_3.268.978829173‘  SIZE 200M BLOCKSIZE 512,
  GROUP 4 ‘+DGSYSTEM/kyeupdb/onlinelog/group_4.269.978829183‘  SIZE 200M BLOCKSIZE 512,
  GROUP 5 ‘+DGSYSTEM/kyeupdb/onlinelog/group_5.270.978829193‘  SIZE 200M BLOCKSIZE 512
DATAFILE
  ‘+DGSYSTEM/kyeupdb/datafile/system.271.978829205‘,
  ‘+DGSYSTEM/kyeupdb/datafile/sysaux.272.978829265‘,
  ‘+DGSYSTEM/kyeupdb/datafile/undotbs1.273.978829323‘,
  ‘+DGSYSTEM/kyeupdb/datafile/users.275.978829391‘,
  ‘+DGSYSTEM/kyeupdb/datafile/ts_example.277.978855421‘,
  ‘+DGSYSTEM/kyeupdb/datafile/kye_tbs02.dbf‘
CHARACTER SET ZHS16GBK
 21  ;
CREATE CONTROLFILE REUSE DATABASE "KYEUPDB" RESETLOGS  NOARCHIVELOG
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 75347
Session ID: 386 Serial number: 5

SQL>
CREATE CONTROLFILE REUSE DATABASE "KYEUPDB" RESETLOGS  NOARCHIVELOG
SIZE 512,
  GROUP 2 ‘+DGSYSTEM/kyeupdb/onlinelog/group_2.267.978829169‘  SIZE 200M BLOCKSIZE 512,
  GROUP 3 ‘+DGSYSTEM/kyeupdb/onlinelog/group_3.268.978829173‘  SIZE 200M BLOCKSIZE 512,
  GROUP 4 ‘+DGSYSTEM/kyeupdb/onlinelog/group_4.269.978829183‘  SIZE 200M BLOCKSIZE 512,
  GROUP 5 ‘+DGSYSTEM/kyeupdb/onlinelog/group_5.270.978829193‘  SIZE 200M BLOCKSIZE 512
DATAFILE
  ‘+DGSYSTEM/kyeupdb/datafile/system.271.978829205‘,
  ‘+DGSYSTEM/kyeupdb/datafile/sysaux.272.978829265‘,
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 4096
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 ‘+DGSYSTEM/kyeupdb/onlinelog/group_1.266.978829167‘  SIZE 200M BLOCKSIZE 512,
  GROUP 2 ‘+DGSYSTEM/kyeupdb/onlinelog/group_2.267.978829169‘  SIZE 200M BLOCKSIZE 512,
  GROUP 3 ‘+DGSYSTEM/kyeupdb/onlinelog/group_3.268.978829173‘  SIZE 200M BLOCKSIZE 512,
  GROUP 4 ‘+DGSYSTEM/kyeupdb/onlinelog/group_4.269.978829183‘  SIZE 200M BLOCKSIZE 512,
  GROUP 5 ‘+DGSYSTEM/kyeupdb/onlinelog/group_5.270.978829193‘  SIZE 200M BLOCKSIZE 512
DATAFILE
  ‘+DGSYSTEM/kyeupdb/datafile/system.271.978829205‘,
  ‘+DGSYSTEM/kyeupdb/datafile/sysaux.272.978829265‘,
  ‘+DGSYSTEM/kyeupdb/datafile/undotbs1.273.978829323‘,
  ‘+DGSYSTEM/kyeupdb/datafile/users.275.978829391‘,
  ‘+DGSYSTEM/kyeupdb/datafile/ts_example.277.978855421‘,
  ‘+DGSYSTEM/kyeupdb/datafile/kye_tbs02.dbf‘
CHARACTER SET ZHS16GBK
 21  ;
CREATE CONTROLFILE REUSE DATABASE "KYEUPDB" RESETLOGS  NOARCHIVELOG
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 75347
Session ID: 386 Serial number: 5

SQL> startup nomount;
ORACLE instance started.

Total System Global Area 3858223104 bytes
Fixed Size          2259080 bytes
Variable Size         788531064 bytes
Database Buffers     3053453312 bytes
Redo Buffers           13979648 bytes
CREATE CONTROLFILE REUSE DATABASE "KYEUPDB" RESETLOGS  NOARCHIVELOG
    MAXLOGFILES 16
0M BLOCKSIZE 512,
  GROUP 5 ‘+DGSYSTEM/kyeupdb/onlinelog/group_5.270.978829193‘  SIZE 200M BLOCKSIZE 512
DATAFILE
  ‘+DGSYSTEM/kyeupdb/datafile/system.271.978829205‘,
  ‘+DGSYSTEM/kyeupdb/datafile/sysaux.272.978829265‘,
  ‘+DGSYSTEM/kyeupdb/datafile/undotbs1.273.978829323‘,
  ‘+DGSYSTEM/kyeupdb/datafile/users.275.978829391‘,
  ‘+DGSYSTEM/kyeupdb/datafile/ts_example.277.978855421‘,
  ‘+DGSYSTEM/kyeupdb/datafile/kye_tbs02.dbf‘
CHARACTER SET ZHS16GBK
    MAXLOGMEMBERS 3
    MAXDATAFILES 4096
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 ‘+DGSYSTEM/kyeupdb/onlinelog/group_1.266.978829167‘  SIZE 200M BLOCKSIZE 512,
  GROUP 2 ‘+DGSYSTEM/kyeupdb/onlinelog/group_2.267.978829169‘  SIZE 200M BLOCKSIZE 512,
  GROUP 3 ‘+DGSYSTEM/kyeupdb/onlinelog/group_3.268.978829173‘  SIZE 200M BLOCKSIZE 512,
  GROUP 4 ‘+DGSYSTEM/kyeupdb/onlinelog/group_4.269.978829183‘  SIZE 200M BLOCKSIZE 512,
  GROUP 5 ‘+DGSYSTEM/kyeupdb/onlinelog/group_5.270.978829193‘  SIZE 200M BLOCKSIZE 512
DATAFILE
  ‘+DGSYSTEM/kyeupdb/datafile/system.271.978829205‘,
  ‘+DGSYSTEM/kyeupdb/datafile/sysaux.272.978829265‘,
  ‘+DGSYSTEM/kyeupdb/datafile/undotbs1.273.978829323‘,
  ‘+DGSYSTEM/kyeupdb/datafile/users.275.978829391‘,
  ‘+DGSYSTEM/kyeupdb/datafile/ts_example.277.978855421‘,
  ‘+DGSYSTEM/kyeupdb/datafile/kye_tbs02.dbf‘
CHARACTER SET ZHS16GBK
 21  ;

Control file created.

SQL> ALTER DATABASE OPEN RESETLOGS;

Database altered.

ALTER TABLESPACE TEMP ADD TEMPFILE ‘+DGSYSTEM/kyeupdb/tempfile/temp.274.978829379‘
  2       SIZE 1024M REUSE AUTOEXTEND OFF;

Tablespace altered.

SQL> select * from dba_temp_files;

FILE_NAME
--------------------------------------------------------------------------------
   FILE_ID TABLESPACE_NAME             BYTES     BLOCKS STATUS
---------- ------------------------------ ---------- ---------- -------
RELATIVE_FNO AUT   MAXBYTES  MAXBLOCKS INCREMENT_BY USER_BYTES USER_BLOCKS
------------ --- ---------- ---------- ------------ ---------- -----------
+DGSYSTEM/kyeupdb/tempfile/temp.274.978829379
     1 TEMP               1073741824     131072 ONLINE
       1 NO       0      0        0 1072693248      130944
SQL> archive log list;
Database log mode          No Archive Mode
Automatic archival         Disabled
Archive destination        /oracle/app/oracle/product/11.2.0/dbs/arch
Oldest online log sequence     1
Current log sequence           1
SQL> 

[END] 2018/6/22 22:10:06

如果使用 resetlogs 打开的数据库,就需要对 DB 做一次备份。

resetlogs 命令表示一个数据库逻辑生存期的结束和另一个数据库逻辑生存期的开始, 每次使用 resetlogs 命令的时候,SCN 不会被重置,不过 oracle 会重置日志序列号, 而且会重置联机重做日志内容.

这样做是为了防止不完全恢复后日志序列会发生冲突(因为现有日志和数据文件间有 了时间差)。

在上面RESETLOGS重建控制文件的时候,归档是关闭的,如果是开启的,在开启RESETLOG之前,需要执行RECOVER DATABASE USING BACKUP CONTROLFILE

原文地址:https://www.cnblogs.com/kyeup/p/9286703.html

时间: 2024-10-27 06:24:04

oracle 控制文件的重建的相关文章

Oracle控制文件与参数文件管理_超越OCP精通Oracle视频教程培训13

Oracle视频教程目标 Oracle视频教程,风哥本套oracle教程培训学习Oracle Parameter参数文件与Oracle控制文件controlfile的深入解析,如何修改参数文件,Oracle控制文件的作用,针对Resetlogs和NoResetlogs的分析,oracle控制文件的重建/镜像/备份/恢复等日常管理与维护. 适用人群 IT相关从业人员.Oracle数据库技术人员.想加工资的.想升职的都可以. 视频在线学习地址: http://edu.51cto.com/course

Oracle 控制文件(CONTROLFILE)

--============================= -- Oracle 控制文件(CONTROLFILE) --============================= 一.Oracle 控制文件 为二进制文件,初始化大小由CREATE DATABASE指定,可以使用RMAN备份 记录了当前数据库的结构信息,同时也包含数据文件及日志文件的信息以及相关的状态,归档信息等等 在参数文件中描述其位置,个数等等.通常采用分散放开,多路复用的原则.在mount阶段被读取,open阶段一直被使

oracle控制文件

转载请注明出处  控制文件(Control File)是Oracle的物理文件之一,它记录了数据库的物理结构(数据文件.日志文件等的名称和位置),数据库转载和打开都需要控制文件, 还记录了日志序列号,检查点和日志历史信息,同步和恢复数据库都需要控制文件. 控制文件包含以下信息: 数据名称 数据文件名称和位置 重做日志名称和位置 表空间名称和位置 当前日志序列号 检查点信息 日志历史信息 RMAN信息 查询控制文件T-SQL: SQL> col name format a30 SQL> sele

RAC环境下控制文件损坏重建过程

处理过程参考了: https://blogs.oracle.com/Database4CN/entry/%E5%A6%82%E4%BD%95%E9%87%8D%E5%BB%BArac%E7%9A%84%E6%8E%A7%E5%88%B6%E6%96%87%E4%BB%B6 问题现象: 现场有学校提报 登录PL/SQL连接数据库是报错“ORA-12541: TNS:无监听程序 ”:排查日志,发现 Tue Nov 25 14:46:58 2014 Thread 2 advanced to log s

Oracle控制文件移动

Oracle移动控制文件 OS:Windows oracle:10g 移动控制文件即将当前的控制文件由当前位置迁移到另一个新位置. 六步完成控制文件移动: 1.获取控制文件名: SQL> select status,name from v$controlfile; 2.修改SPFILE中的控制文件名: SQL> alter system set control_files= 'D:\oracle\new\CONTROL01.CTL', 'D:\oracle\new\CONTROL02.CTL'

oracle 控制文件误删除手动恢复小测试

测试系统 OLinux 5.9 oracle版本 11.2.0.4 备份控制文件 1.备份到trace文件 SQL> alter database backup controlfile to trace; Database altered. 查看告警日志,确定备份控制文件trace的位置信息 alter database backup controlfile to trace Backup controlfile written to trace file /u01/app/oracle/dia

ORACLE控制文件一致性【weber出品】

一.首先控制文件有什么作用呢? 控制文件记录了如下信息:1.数据库的创建时间2.数据文件的位置3.日志文件的位置等作用是指导数据库 找到数据文件,日志文件并将数据库启动到 open 状态. 与其用文字来描述,不如我们来看看control_file里面有些什么好了.然后在一一分析: SQL> show parameter control_file NAME TYPE VALUE ------------------------------------ ----------- -----------

Oracle控制文件多路复用

一.控制文件多路复用 1.show parameter control --查看控制文件信息 show parameter spfile --查看是否有spfile create pfile from spfile; --生成pfile shutdown immediate --关库 2.修改pfile文件,添加多个路径 vi $ORACLE_HOME/dbs/initORCL.ora 将原有controlfile拷贝到新添加路径目录: cp -- 3.create spfile from pf

oracle 控制文件多路复用

网上有很多关于控制文件的操作,我大概看了下.有很多都是炒来炒去转来转去.下面以自己理解和操作为例来对oracle的控制文件进行下介绍. 首先介绍下控制文件 在oralce数据库中,控制文件是一个很小的二进制文件,一般大小在10MB左右在数据库创建时被自动创建,并在数据库变化时更新.控制文件不断被更新,并且在任何时候都要保证控制文件可用.控制文件在oracle中扮演者很重要的角色,没有控制文件或者控制文件损坏数据库必然down掉.控制文件包含有数据库结构信息,数据文件和日志文件信息. 由于控制文件