程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> Oracle教程 >> Oracle12c12.1.0.1.0管理控制文件官方文檔翻譯說明

Oracle12c12.1.0.1.0管理控制文件官方文檔翻譯說明

編輯:Oracle教程

Oracle12c12.1.0.1.0管理控制文件官方文檔翻譯說明


Link: http://download.csdn.net/detail/rlhua/7718571

官方Link:

http://docs.oracle.com/database/121/ADMIN/control.htm#ADMIN006 

版本:

SYS@db12c>select * from v$version;

BANNER CON_ID

--------------------------------------------------------------------------------------------------------- -------------------

OracleDatabase 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 0

PL/SQLRelease 12.1.0.1.0 - Production 0

CORE 12.1.0.1.0 Production 0

TNSfor Linux: Version 12.1.0.1.0 - Production 0

NLSRTLVersion 12.1.0.1.0 - Production 0

0 ManagingControl Files管理控制文件

This chapter contains the following topics:

這章包含以下內容:

· WhatIs a Control File?

什麼是控制文件

· Guidelinesfor Control Files

控制文件指南

· CreatingControl Files

創建控制文件

· TroubleshootingAfter Creating Control Files

創建控制文件後的故障排除

· BackingUp Control Files

備份控制文件

· Recoveringa Control File Using a Current Copy

使用當前副本恢復控制文件

· DroppingControl Files

· 刪除控制文件

· ControlFiles Data Dictionary Views

· 控制文件數據字典視圖

See Also:

o Oracle Database Concepts for an overview of control files

o Chapter17, "Using Oracle Managed Files" for information about creating control files that are bothcreated and managed by the Oracle Database server

1 What Is a Control File?什麼是控制文件

EveryOracle Database has a control file, which is a small binary file thatrecords the physical structure of the database. The control file includes:

每個oracle數據庫都有控制文件,一個小的二進制文件記錄著數據庫的物理結構,控制文件包括以下:

· The database name

數據庫名

· Names and locationsof associated data files and redo log files

相關聯的數據文件和重做日志文件的名稱和位置

· The timestamp of thedatabase creation

數據庫創建的時間戳

· The current logsequence number

目前日志的序列

· Checkpointinformation

檢查點信息

The control file must be available for writing by the OracleDatabase server whenever the database is open. Without the control file, the databasecannot be mounted and recovery is difficult.

當數據庫為打開狀態時,oracle數據庫服務器對控制文件是可寫的,沒有控制文件,數據庫不能裝載,恢復也是一個很難的事情。

The control file of an Oracle Database is created at the sametime as the database. By default, at least one copy of the control file is createdduring database creation. On some operating systems the default is to createmultiple copies. You should create two or more copies of the control fileduring database creation. You can also create control files later, if you losecontrol files or want to change particular settings in the control files.

oracle數據庫的控制文件在數據庫創建的同一時間創建,默認的,當數據庫創建後至少有一個控制文件也會被創建,在一些操作系統中,默認是創建多個副本,你應該在數據庫創建時同時創建兩個或者更多的控制文件副本,如果你丟失了控制文件或者想改變控制文件的特別的設置,你也可以稍後創建控制文件。

2 Guidelines for Control Files控制文件指南

Thissection describes guidelines you can use to manage the control files for adatabase, and contains the following topics:

這個部分主要說明如何管理數據庫的控制文件,包含以下部分:

· ProvideFilenames for the Control Files

提供控制文件的文件名

· MultiplexControl Files on Different Disks

在不同磁盤上的多路復用控制文件

· BackUp Control Files

備份控制文件

· Managethe Size of Control Files

管理控制文件的大小

2.1 Provide Filenames forthe Control Files提供控制文件的文件名

You specify controlfile names using the CONTROL_FILES initializationparameter in the database initialization parameter file (see "CreatingInitial Control Files"). Theinstance recognizes and opens all the listed file during startup, and theinstance writes to and maintains all listed control files during databaseoperation.

你可以在數據庫的初始化參數文件裡使用CONTROL_FILES初始化參數來指定控制文件的名稱,實例在啟動的時候確認並且打開列出的文件,並且實例在數據庫操作中寫入和維護所列出的控制文件。

If you do not specify files for CONTROL_FILES before database creation:

如果你在數據庫創建前沒有在CONTROL_FILES指定文件:

· If you are not usingOracle Managed Files, then the database creates a control file and uses adefault filename. The default name is operating system specific.

如果你沒有使用OMF,那麼數據庫創建一個控制文件,並使用默認的文件名,默認的名稱是操作系統指定的。

· If you are usingOracle Managed Files, then the initialization parameters you set to enable thatfeature determine the name and location of the control files, as described in Chapter17, "Using Oracle Managed Files".

如果你使用OMF,那麼初始化參數將啟用這個特性來指定控制文件名稱和位置。

· If you are usingOracle Automatic Storage Management (Oracle ASM), you can place incompleteOracle ASM filenames in the DB_CREATE_FILE_DEST andDB_RECOVERY_FILE_DEST initialization parameters. Oracle ASMthen automatically creates control files in the appropriate places. See thesections "About Oracle ASM Filenames" and "Creating a DatabaseThat Uses Oracle ASM" in Oracle Automatic Storage Management Administrator's Guide for more information.

如果你使用ASM,你可以設置在DB_CREATE_FILE_DEST和DB_RECOVERY_FILE_DEST初始化參數,ASM就可以自動的在合適的位置創建控制文件。

2.2 Multiplex ControlFiles on Different Disks在不同磁盤上的控制文件的多路復用

Every Oracle Database should have at least two control files, each stored on a different physical disk. If a controlfile is damaged due to a disk failure, the associated instance must be shutdown. Once the disk drive is repaired, the damaged control file can be restoredusing the intact copy of the control file from the other disk and the instancecan be restarted. In this case, no media recovery is required.

每個oracle數據庫應該有至少兩個控制文件,每個存在都不同的物理磁盤上,如果其中一個控制文件由於磁盤損壞而損壞,那麼相關聯的實例必須被關閉。一旦這個磁盤恢復,損壞的控制文件可以使用另外磁盤上好的控制文件的副本來還原,那麼實例就可以重新啟動了,在這種情況下,不需要介質恢復。

The behavior of multiplexed control files is this:

控制文件多路復用的行為:

· The database writesto all filenames listed for the initialization parameter CONTROL_FILES in the database initializationparameter file.

在初始化文件參數裡的CONTROL_FILES參數列出所有文件名,數據庫將數據寫入這些文件

· The database readsonly the first file listed in the CONTROL_FILES parameter during database operation.

在數據庫進行操作時,數據庫僅僅只讀CONTROL_FILES參數裡列出的第一個文件

· If any of thecontrol files become unavailable during database operation, the instancebecomes inoperable and should be aborted.

如果在數據庫操作時,控制文件的任何一個不可用,那麼實例將變得不能操作,並且會被強制關閉

Note:

Oracle strongly recommends that your database has a minimum oftwo control files and that they are located on separate physical disks.

Oracle強烈建議,你的數據庫最少有兩個控制文件,並且它們放置在不同的物理磁盤上。

One way to multiplexcontrol files is to store a control file copy on every disk drive that storesmembers of redo log groups, if the redo log is multiplexed. By storing controlfiles in these locations, you minimize the risk that all control files and allgroups of the redo log will be lost in a single disk failure.

多路復用控制文件的一個方法是在每個磁盤上都存儲一個控制文件副本,如果重做日志是多路復用的,那麼也會在每個磁盤上存儲重做日志組的成員。將控制文件存儲在這些地方,可以減少單點故障風險,即可以減少所有的控制文件和所有的重做日志組在一個單一磁盤上丟失的危險。 

2.3 Back Up Control Files備份控制文件

It is very important that you back up your control files. Thisis true initially, and every time you change the physical structure of yourdatabase. Such structural changes include:

備份控制文件是很重要的,在數據庫最初始狀態或者每次你改變了數據庫的物理結構時,結構改變的內容包括以下:

· Adding, dropping, orrenaming data files

增加,刪除,重命名數據文件

· Adding or dropping atablespace, or altering the read/write state of the tablespace

增加或者刪除表空間,或者改變表空間的讀/寫狀態

· Adding or droppingredo log files or groups

增加或刪除重做日志或重做日志組 

The methods for backing up control files are discussed in "BackingUp Control Files".

備份控制文件的方法在“備份控制文件”中討論。 

2.4 Manage the Size ofControl Files管理控制文件的大小

The maindeterminants of the size of a control file are the values set for the MAXDATAFILES, MAXLOGFILES, MAXLOGMEMBERS, MAXLOGHISTORY,and MAXINSTANCESparametersin the CREATEDATABASE statementthat created the associated database. Increasing the values of these parametersincreases the size of a control file of the associated database.

在使用CREATE DATABASE語句創建相關的數據庫時, MAXDATAFILES, MAXLOGFILES, MAXLOGMEMBERS, MAXLOGHISTORY,MAXINSTANCES參數決定了控制文件的大小,增加這些參數的值即增加了相關數據庫控制文件的大小。 

See Also:

· Your operatingsystem specific Oracle documentation contains more information about themaximum control file size.

· Oracle Database SQL Language Reference for a description of the CREATEDATABASE statement 

3 Creating Control Files創建控制文件

This section describes ways to create control files, andcontains the following topics:

這章節主要描述創建控制文件的方法,包含以下內容:

· CreatingInitial Control Files

創建初始的控制文件

· CreatingAdditional Copies, Renaming, and Relocating Control Files

創建額外的副本,重命名或者遷移控制文件

· CreatingNew Control Files

創建新的控制文件 

3.1 Creating InitialControl Files創建初始控制文件

The initial control files of an Oracle Database are created whenyou issue the CREATEDATABASE statement.The names of the control files are specified by theCONTROL_FILES parameter in the initializationparameter file used during database creation. The filenames specified in CONTROL_FILES should be fully specified and areoperating system specific. The following is an example of a CONTROL_FILES initialization parameter:

當你使用CREATE DATABASE語句創建oracle數據庫的初始控制文件,控制文件的名字使用CONTROL_FILES初始化參數在數據庫創建時來執行,在該參數中指定文件名字必須指定全路徑,以下為該參數的例子: 

CONTROL_FILES = (/u01/oracle/prod/control01.ctl,
                 /u02/oracle/prod/control02.ctl, 
                 /u03/oracle/prod/control03.ctl) 

If files with the specified names currently exist at the time ofdatabase creation, you must specify the CONTROLFILEREUSE clause in the CREATEDATABASEstatement, or else an error occurs. Also, if the size ofthe old control file differs from the SIZE parameter of the new one, you cannotuse the REUSE clause.

如果在數據庫創建時,指定的文件名已經存在,那麼,你在CREATE DATABASE語句時必須指定 CONTROLFILE REUSE子句,否則會出現錯誤。同樣,如果舊的控制文件的大小和之前不一樣,則需要為新的控制文件指定SIZE參數,你不能使用REUSE子句。 

The size of the control file changes between some releases ofOracle Database, as well as when the number of files specified in the controlfile changes. Configuration parameters such as MAXLOGFILES, MAXLOGMEMBERS, MAXLOGHISTORY, MAXDATAFILES,and MAXINSTANCES affect control file size.

Oracle數據庫的一些發行版本之間的控制文件的大小,即是當控制文件變化時執行的文件數量,配置如下參數MAXLOGFILES, MAXLOGMEMBERS, MAXLOGHISTORY, MAXDATAFILES,MAXINSTANCES會影響到控制文件的大小。 

You can subsequently change the value of the CONTROL_FILES initialization parameter to add morecontrol files or to change the names or locations of existing control files.

你隨後可以改變CONTROL_FILES初始化參數的值,添加更多的控制文件或者改變名稱或者改變現有存在的控制文件的位置

See Also:

Your operating system specific Oracle documentation containsmore information about specifying control files.

你的操作系統指定oracle文檔包含更多指定控制文件的信息 

3.2 Creating AdditionalCopies, Renaming, and Relocating Control Files創建新增副本,重命名,遷移控制文件

You can create an additional control file copy for multiplexingby copying an existing control file to a new location and adding the file nameto the list of control files. Similarly, you rename an existing control file bycopying the file to its new name or location, and changing the file name in thecontrol file list. In both cases, to guarantee that control files do not changeduring the procedure, shut down the database before copying the control file.

你拷貝一個已存在的控制文件來創建一個額外的控制文件副本來做多路復用到一個新的位置,並且將文件名添加到控制文件列表中,同樣的,你可以通過拷貝文件來重命名一個已存在的控制文件為新的名稱或者位置,並且改變控制文件列表的名字。在這樣的情況下,保證控制文件在數據庫運行中不能改變,在拷貝控制文件之前要關閉數據庫。 

To add a multiplexed copy of the current control file or torename a control file:

增加一個多路復用的副本或者重命名控制文件按照以下步驟: 

1. Shut down thedatabase.

關閉數據庫

2. Copy an existingcontrol file to a new location, using operating system commands.

使用操作系統命令拷貝一個已存在的控制文件到一個新路徑

3. Edit the CONTROL_FILES parameter in the databaseinitialization parameter file to add the new control file name, or to changethe existing control filename.

編輯數據庫裡的初始化參數CONTROL_FILES參數來增加一個新的控制文件名稱,或者改變已存在的控制文件的文件名

4. Restart thedatabase.

重啟數據庫 

3.2.1 使用靜態參數pfile來添加或刪除或遷移控制文件

使用spfile創建pfile,操作系統拷貝或刪除,使用vi編輯CONTROL_FILES參數,使用pfile啟動數據庫,創建spfile,再使用spfile重新啟動數據庫。

通過服務器端初始化參數文件建立靜態初始化參數,並修改靜態初始化參數文件,增加一個控制文件;(刪除同樣方法) 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved