oracle9i帶來了許多令人興奮的新特性,操作系統(tǒng)級別上的oracle的自動管理文件——即oracle managed files(omf)——就是其中之一。在oracle9i出現(xiàn)之前,dba必須在卸載表空間時手工移除數(shù)據(jù)文件(datafile)并在創(chuàng)建新的表空間之前仔細檢查文件的位置。
為了理解omf是如何工作的,讓我們首先定義一個叫著db_cteate_file_dest的新參數(shù)。
alter system set db_create_file_dest='/u01/oradata/prod';
一旦設(shè)置好了db_cteate_file_dest參數(shù),我們就可以創(chuàng)建表空間而無須指定文件名。
createtablespace
omf1
datafile size 100m
locally managed;
文件創(chuàng)建之后,oracle就可以分配和命名這些文件。oracle omf使用如下的命名轉(zhuǎn)換慣例。默認的文件大小為100m,并按如下格式命名:
where
%u is a unique 8 digit code
%g is the log file group number
%t is the tablespace name
controlfiles ora_%u.ctl
redo log files ora_%g_%u.log
datafiles ora_%t_%u.dbf
temporary datafilesora_%t_%u.tmp
oracle9i omf工具還有一個新的警告日志消息(alert log message),它用來告訴我們omf數(shù)據(jù)文件何時發(fā)生了改動。下面是關(guān)于警告日志的一個例子。
fri mar 23 01:44:46 2001
create tablespace omf1 datafile size 10m autoextend off
fri mar 23 01:44:47 2001
created oracle managed file /databases/ed25/omf1/ora_omf1_xcp6rg84.dbf
completed: create tablespace omf1 datafile size 10m autoexte
fri mar 23 01:45:45 2001
drop tablespace omf1
fri mar 23 01:45:45 2001
deleted oracle managed file /databases/ed25/omf1/ora_omf_xcp6rg84.dbf
completed: drop tablespace omf1
中國最大的web開發(fā)資源網(wǎng)站及技術(shù)社區(qū),
新聞熱點
疑難解答
圖片精選