Presentation is loading. Please wait.

Presentation is loading. Please wait.

6 Copyright © Oracle Corporation, 2001. All rights reserved. 维护控制文件.

Similar presentations


Presentation on theme: "6 Copyright © Oracle Corporation, 2001. All rights reserved. 维护控制文件."— Presentation transcript:

1 6 Copyright © Oracle Corporation, 2001. All rights reserved. 维护控制文件

2 6-2 Copyright © Oracle Corporation, 2001. All rights reserved. 目标 学完这个课程,你应该可以掌握你下内容 : 解释控制文件的使用 列出控制文件的内容 Multiplex and manage the control file Manage the control file with Oracle Managed Files (OMF) 获得控制文件的信息

3 6-3 Copyright © Oracle Corporation, 2001. All rights reserved. Control File 一个简单的二进制文件 定义数据库的当前运行的物理状态 维护数据库的完整性 条件 : –At MOUNT state during database startup –To operate the database Linked to a single database 如果丢失,需要恢复 Sized initially by CREATE DATABASE Control files Database

4 6-4 Copyright © Oracle Corporation, 2001. All rights reserved.

5 6-5 Copyright © Oracle Corporation, 2001. All rights reserved. 控制文件的内容 一个控制文件包含以下实体 : 数据库名字和标示符 数据库创建的时间戳 表空间的名字 数据文件和重做日志文件的名字和路径 当前重做日志文件的序列号 Checkpoint 信息 Begin and end of undo segments 重做日志的归档信息 备份信息

6 6-6 Copyright © Oracle Corporation, 2001. All rights reserved.

7 6-7 Copyright © Oracle Corporation, 2001. All rights reserved. Multiplexing the Control File CONTROL_FILES= $HOME/ORADATA/u01/ctrl01.ctl, $HOME/ORADATA/u02/ctrl02.ctl Disk 1 (u01) Disk 2 (u02) ctrl02.ctl ctrl01.ctl

8 6-8 Copyright © Oracle Corporation, 2001. All rights reserved. Multiplexing the Control File When Using SPFILE 1.Alter the SPFILE : 2.Shutdown the database: 3.Create additional control files: 4.Start the database: ALTER SYSTEM SET control_files = '$HOME/ORADATA/u01/ctrl01.ctl', '$HOME/ORADATA/u02/ctrl02.ctl' SCOPE=SPFILE; cp $HOME/ORADATA/u01/ctrl01.ctl $HOME/ORADATA/u02/ctrl02.ctl startup shutdown immediate

9 6-9 Copyright © Oracle Corporation, 2001. All rights reserved. Multiplexing the Control File When Using PFILE 1.Shut down the database: 2.Create additional control files: 3.Add control file names to PFILE : 4.Start the database: shutdown immediate CONTROL_FILES = (/DISK1/control01.ctl, /DISK3/control02.ctl) cp $HOME/ORADATA/u01/ctrl01.ctl $HOME/ORADATA/u02/ctrl02.ctl startup

10 6-10 Copyright © Oracle Corporation, 2001. All rights reserved. Managing Control Files with OMF OMF created if the CONTROL_FILES parameter is not specified Locations are defined by DB_CREATE_ONLINE_LOG_DEST_n Names are uniquely generated and displayed in the alertSID.log

11 6-11 Copyright © Oracle Corporation, 2001. All rights reserved. 获得控制文件的信息 可以通过查询以下视图来返回控制文件的状态和路径信息. V$CONTROLFILE : Lists the name and status of all control files associated with the instance V$PARAMETER : Lists status and location of all parameters V$CONTROLFILE_RECORD_SECTION : Provides information about the control file record sections SHOW PARAMETER CONTROL_FILES : Lists the name, status, and location of the control files

12 6-12 Copyright © Oracle Corporation, 2001. All rights reserved.

13 6-13 Copyright © Oracle Corporation, 2001. All rights reserved.

14 6-14 Copyright © Oracle Corporation, 2001. All rights reserved. Summary In this lesson, you should have learned how to: Multiplex the control file when using an SPFILE Multiplex the control file when using an init.ora Manage the control files using OMF

15 6-15 Copyright © Oracle Corporation, 2001. All rights reserved. Practice 6 Overview This practice covers the following topics: Starting the database without a control file Multiplexing an existing control file

16 6-16 Copyright © Oracle Corporation, 2001. All rights reserved.


Download ppt "6 Copyright © Oracle Corporation, 2001. All rights reserved. 维护控制文件."

Similar presentations


Ads by Google