Oracle OMF(Oracle Managed Files ) 说明

一.官网说明

 Using Oracle Managed Files

http://docs.oracle.com/cd/E11882_01/server.112/e25494/omf.htm#ADMIN003

 

1.1 What Are Oracle ManagedFiles?

官网链接:

http://docs.oracle.com/cd/E11882_01/server.112/e25494/omf001.htm#i1006122

 

Using Oracle Managed Files simplifies the administrationof anOracle Database. Oracle Managed Files eliminate the need foryou, the DBA, todirectly manage the operating system files thatcomprise an Oracle Database.With Oracle Managed Files, you specifyfile system directories in which thedatabase automatically creates,names, and manages files at the database objectlevel. For example,you need only specify that you want to create a tablespace;you donot need to specify the name and path of the tablespace's datafilewiththe DATAFILE clause. Thisfeature works well with a logical volumemanager (LVM).

--使用OMF可以简化Oracle数据库的管理,通过OMF,可以指定filesystem 目录,之后就可以在这个目录下创建和管理数据库。比如创建表空间时,不需要指定datafile的名称,默认会将数据文件创建到这个目录下面。

 

The databaseinternally uses standard file system interfaces tocreate and delete files asneeded for the following databasestructures:

--Oracle默认使用标准的文件系统接口来创建和删除如下的数据库结构:

(1)Tablespaces

(2)Redo log files

(3)Control files

(4)Archived logs

(5)Block change tracking files

(6)Flashback logs

(7)RMAN backups

 

Throughinitialization parameters, you specify the file systemdirectory to be used fora particular type of file. The databasethen ensures that a unique file, anOracle managed file, is createdand deleted when no longer needed.

--在初始化参数里指定特殊类型文件的文件系统目录,这样就可以保证文件的唯一性。

This featuredoes not affect the creation or naming ofadministrative files such as tracefiles, audit files, alert logs,and core files.

 

1.2 WhoCan Use Oracle ManagedFiles?

Oracle Managed Files are most useful forthe following types ofdatabases:

--OMF 在如下情况使用最多:

(1)Databases that are supported by thefollowing:

1)A logical volume manager thatsupports striping/RAID anddynamically extensible logical volumes

2)A file system that provides large,extensible files

(2)Low end or test databases

 

The OracleManaged Files feature is not intended to easeadministration of systems thatuse raw disks. This feature providesbetter integration with operating systemfunctionality for diskspace allocation. Since there is no operating systemsupport forallocation of raw disks (it is done manually), this featurecannothelp. However, because Oracle Managed Files require that youuse the operatingsystem file system (unlike raw disks), you losecontrol over how files are laidout on the disks and thus, you losesome I/O tuning ability.

--OMF 没有简化raw disks的管理,OMF提供了一个整体的磁盘空间分配系统。因为OMF需要使用OS文件系统,所以可以丢失了一些对磁盘的控制,比如具体的文件存放那个磁盘,I/O性能调整的。

 

1.3 WhatIs a Logical VolumeManager? –什么是LVM

logical volume manager (LVM) is a softwarepackageavailable with most operating systems. Sometimes it iscalled a logical diskmanager (LDM). It allows pieces of multiplephysical disks to be combined intoa single contiguous address spacethat appears as one disk to higher layers ofsoftware. An LVM canmake the logical volume have better capacity,performance,reliability, and availability characteristics than anyof the underlyingphysical disks. It uses techniques such asmirroring, striping, concatenation,and RAID 5 to implement thesecharacteristics.

--LVM 在大多数系统下都可以用,LVM 也称LDM。LVM可以让逻辑卷有更好的容量,性能和可靠性。LVM可以使用mirror,strip,concatenation和RAID技术。

 

Some LVMs allowthe characteristics of a logical volume to bechanged after it is created, evenwhile it is in use. The volume maybe resized or mirrored, or it may berelocated to different physicaldisks.

--一些LVM允许在其创建之后改变其特性,甚至在使用时,如resize或mirror或relocated到不同的物理磁盘。

 

1.4 WhatIs a File System?–什么是文件系统

filesystem is a data structure built inside a contiguousdisk addressspace. A file manager (FM) is a software package thatmanipulatesfile systems, but it is sometimes called the filesystem. All operating systemshave file managers. The primary taskof a file manager is to allocate anddeallocate disk space intofiles within a file system.

--文件系统是一个连续磁盘空间上的一个数据结构,FM软件可以管理多个文件系统,File manager 有时也称为file system。 所有的操作系统都有file managers。File manager 的主要任务是分配和收集file system 上的磁盘空间。

 

A file systemallows the disk space to be allocated to a largenumber of files. Each file ismade to appear as a contiguous addressspace to applications such as OracleDatabase. The files may notactually be contiguous within the disk space of thefile system.Files can be created, read, written, resized, and deleted. Eachfilehas a name associated with it that is used to refer to thefile.

      --file system 允许磁盘空间分配给大量的文件。每个文件看起来在一个连续的磁盘空间上,但是实际上并不是一个连续的空间。文件可以被创建,读取,resize,和 删除.

 

A file system iscommonly built on top of a logical volumeconstructed by an LVM. Thus all thefiles in a particular filesystem have the same performance, reliability, andavailabilitycharacteristics inherited from the underlying logical volume. Afilesystem is a single pool of storage that is shared by all the filesin thefile system. If a file system is out of space, then none ofthe files in thatfile system can grow. Space available in one filesystem does not affect spacein another file system. However someLVM/FM combinations allow space to beadded or removed from a filesystem.

 

An operatingsystem can support multiple file systems. Multiplefile systems are constructedto give different storagecharacteristics to different files as well as todivide theavailable disk space into pools that do not affect each other.

 

1.5 Benefitsof Using OracleManaged Files

Consider the following benefitsofusing Oracle Managed Files:

--使用OMF有如下好处:

(1)They make the administration of thedatabase easier.

      --简化数据库管理

There is no needto invent filenames and define specific storagerequirements. A consistent setof rules is used to name all relevantfiles. The file system defines the characteristicsof the storageand the pool where it is allocated.

 

(2)They reduce corruption caused byadministrators specifying thewrong file.

      --降低管理员指定错误文件的可能性。

Each Oraclemanaged file and filename is unique. Using the samefile in two differentdatabases is a common mistake that can causevery large down times and loss ofcommitted transactions. Using twodifferent names that refer to the same fileis another mistake thatcauses major corruptions.

 

(3)They reduce wasted disk spaceconsumed by obsolete files.

      --减少空间浪费

Oracle Databaseautomatically removes old Oracle Managed Fileswhen they are no longer needed.Much disk space is wasted in largesystems simply because no one is sure if aparticular file is stillrequired. This also simplifies the administrative taskof removingfiles that are no longer required on disk and prevents themistakeof deleting the wrong file.

--DB 会自动移除长时间不用的旧OMF文件。

 

(4)They simplify creation of test anddevelopment databases.

      --简化测试库的创建

You can minimizethe time spent making decisions regarding filestructure and naming, and youhave fewer file management tasks. Youcan focus better on meeting the actualrequirements of your test ordevelopment database.

 

(5)Oracle Managed Files makedevelopment of portable third-partytools easier.

Oracle ManagedFiles eliminate the need to put operating systemspecific file names in SQLscripts.

 

1.6 OracleManaged Files andExisting Functionality

Using OracleManaged Files does not eliminate any existingfunctionality. Existing databasesare able to operate as they alwayshave. New files can be created as managedfiles while old ones areadministered in the old way. Thus, a database can havea mixture ofOracle managed and unmanaged files.

 

二. Enabling the Creation and Useof OracleManaged Files

The followingtable lists the initialization parameters thatenable the use of Oracle ManagedFiles.

启动OMF的初始化参数如下表:

Initialization Parameter

Description

DB_CREATE_FILE_DEST

Defines the location of the default file system directory orOracle ASM disk group where the database creates datafiles ortempfiles when no file specification is given in the createoperation. Also used as the default location for redo log andcontrol filesif DB_CREATE_ONLINE_LOG_DEST_n arenot specified.

DB_CREATE_ONLINE_LOG_DEST_n

Defines the location of the default file system directory orOracle ASM disk group for redo log files and control file creationwhen no file specification is given in the create operation. Bychanging n, you can use thisinitialization parameter multiple times,where n specifies amultiplexed copy of the redo log or control file. You can specifyup to five multiplexed copies.

DB_RECOVERY_FILE_DEST

Defines the location of the Fast Recovery Area, which is thedefault file system directory or Oracle ASM disk group where thedatabase creates RMAN backups when no format option is used,archived logs when no other local destination is configured, andflashback logs. Also used as the default location for redo log andcontrol files or multiplexed copies of redo log and control filesif DB_CREATE_ONLINE_LOG_DEST_n arenot specified.

 

The file systemdirectories specified by these parameters mustalready exist; the database doesnot create them. The directory mustalso have permissions to allow the databaseto create the files init.

 

The defaultlocation is used whenever a location is notexplicitly specified for theoperation creating the file. Thedatabase creates the filename, and a file thuscreated is an Oraclemanaged file.

 

Both of theseinitialization parameters are dynamic, and can beset usingthe ALTERSYSTEM or ALTERSESSION statement.

--这些参数可以使用alter system 或者 altersession 动态修改。

 

2.1Settingthe DB_CREATE_FILE_DEST InitializationParameter

Includethe DB_CREATE_FILE_DEST initializationparameter in yourinitialization parameter file to identify thedefault location for the databaseserver to create:

-- DB_CREATE_FILE_DEST指定如下参数的默认位置:

(1)Datafiles

(2)Tempfiles

(3)Redo log files

(4)Control files

(5)Block change tracking files

 

You specify thename of a file system directory that becomes thedefault location for thecreation of the operating system files forthese entities. The followingexamplesets /u01/app/oracle/oradata asthe default directory to usewhen creating Oracle Managed Files:

DB_CREATE_FILE_DEST= '/u01/app/oracle/oradata'

 

SQL> show parameter db_create_file_dest

NAME                                TYPE       VALUE

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

db_create_file_dest                 string

--默认为空

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值