eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« Oracle 10g Release 2 all available | Blog首页 | How to Use Oracle10g release 2 ASM »

Oracle10gR2:New Features-drop empty datafile

在Oracle10gR2中,Oracle允许我们直接从表空间中drop掉空的数据文件,这个删除的文件再也不会讨厌的显示在dba_data_files视图中了。
SQL> create tablespace test;

Tablespace created.

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+ORADG/danaly/datafile/system.264.600016955
+ORADG/danaly/datafile/undotbs1.265.600016969
+ORADG/danaly/datafile/sysaux.266.600016977
+ORADG/danaly/datafile/users.268.600016987
+ORADG/danaly/datafile/test.271.600082589

SQL> alter tablespace test add datafile;

Tablespace altered.

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+ORADG/danaly/datafile/system.264.600016955
+ORADG/danaly/datafile/undotbs1.265.600016969
+ORADG/danaly/datafile/sysaux.266.600016977
+ORADG/danaly/datafile/users.268.600016987
+ORADG/danaly/datafile/test.271.600082589
+ORADG/danaly/datafile/test.272.600082607

6 rows selected.

SQL> select file_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
+ORADG/danaly/datafile/system.264.600016955
+ORADG/danaly/datafile/undotbs1.265.600016969
+ORADG/danaly/datafile/sysaux.266.600016977
+ORADG/danaly/datafile/users.268.600016987
+ORADG/danaly/datafile/test.271.600082589
+ORADG/danaly/datafile/test.272.600082607

6 rows selected.

SQL> alter tablespace test drop datafile '+ORADG/danaly/datafile/test.272.600082607' ;

Tablespace altered.

SQL> select file_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
+ORADG/danaly/datafile/system.264.600016955
+ORADG/danaly/datafile/undotbs1.265.600016969
+ORADG/danaly/datafile/sysaux.266.600016977
+ORADG/danaly/datafile/users.268.600016987
+ORADG/danaly/datafile/test.271.600082589

SQL> 

虽然还有一定的限制,但是这仍然是前进了一步。
SQL> drop tablespace test;

Tablespace dropped.


历史上的今天...
    >> 2013-09-02文章:
    >> 2010-09-02文章:
    >> 2009-09-02文章:
    >> 2008-09-02文章:
    >> 2007-09-02文章:
    >> 2006-09-02文章:

无觅

By eygle on 2005-09-02 09:28 | Comments (3) | Oracle12c/11g | 415 |

3 Comments

其实……这个准确点说是 链接 一下,不是编译

oracle 安装文件基本都是已经编译好的 object ,只是根据不同选项 link 一下 :)

所以在有些平台,比如 AIX 下 没有编译器 ,也可以安装oracle

界面太不友好了,回复错了,ft

这个界面还算不错了:)


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com