Oracle Managed Files(OMF)

文章出处:http://blog.chinaunix.net/uid-7819458-id-2043175.html

Oracle9i introduces a new feature that simplifies tablespace creation. This new feature, Oracle Managed Files (OMF), makes life easier for Oracle DBAs by removing the tedium from creating and managing Oracle data files.

在OMF出来之前,DBA必须Oracle数据文件目录与数据文件大小,SQL如下:

column file_name  format a40
column tablespace format a15
column bytes      format 999,999,999
select   file_name,   t.tablespace_name tablespace,   bytes from    dba_data_files  d,   dba_tablespaces t
where   t.tablespace_name = d.tablespace_name ;

创建表空间语句如下:
create tablespace   users_02 add   'c:\oracle\oradata\diogenes\users02.dbf' size    20m ;

必须满足三个条件,如下:

  • The proper file location
  • The proper filename
  • The proper file size
Oracle公司也是为了减少添加数据文件时的步骤及制定文件详细信息创建OMF,具体优点如下:

       


 

  • Easier Oracle file management—All files are placed into the proper OS directory.

  • Easier third-party application integration—Third-party apps don’t have to be aware of OS-specific environments.
     
  • Reduction of Oracle file management errors—No risk of human error.
     
  • Enforcement of Optimal Flexible Architecture (OFA) standards—OMF will comply with the OFA standards for filename and file locations.
     
  • Default file sizes—OMF allows files to have standard, uniform sizes.

使用OMF时的一些数据格式如下:

 u% is a unique 8 digit code,
  g% is the logfile group number,
  %t is the tablespace name:
 
Controlfiles        ora_%u.ctl
Redo Log Files      ora_%g_%u.log
Datafiles           ora_%t_%u.dbf
Temporary Datafiles ora_%t_%u.tmp
使用OMF,创建表空间,语句可简化如下:


SQL> create tablespace new_ts;

如想改变创建默认路径,可如下操作:

alter system set db_create_file_dest=’c:\oracle\oradata\diogenes\;

改变redo log的创建路径方法如下:

改变db_create_online_log_dest_*

db_create_online_log_dest_1 = ‘/u01/oracle/oradata/diogenes’









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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值