關於Oracle eXpress Edition 資料檔案的限制
在oracle XE版的官方文檔中對其限制說明如下:
1. Express Edition is limited to a single instance on any server;
2. Express Edition may be installed on a multiple CPU server, but may only be executed on one processor in any server;
3. Express Edition may only be used to support up to 4GB of user data (not including Express Edition system data);
4. Express Edition may use up to 1 GB RAM of available memory.
其中第3項說明支援的使用者資料為4GB(不包括系統資料),測試如下:
C:\Documents and Settings\User>SQLPLUS "/ AS SYSDBA"
SQL*Plus: Release 9.2.0.1.0 - Production on 星期日 6月 6 10:44:37 2010
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
串連到:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
JCQ0> select * from v$dbfile;
FILE#
----------
NAME
--------------------------------------------------------------------------------
4
E:\ORACLEXE\ORADATA\XE\USERS.DBF
3
E:\ORACLEXE\ORADATA\XE\SYSAUX.DBF
2
E:\ORACLEXE\ORADATA\XE\UNDO.DBF
1
E:\ORACLEXE\ORADATA\XE\SYSTEM.DBF
JCQ0> alter database datafile 4 resize 5G;
alter database datafile 4 resize 5G
*
ERROR 位於第 1 行:
ORA-12952: 請求超出了允許的最大資料庫大小 4 GB
JCQ0> create tablespace test datafile 'E:\ORACLEXE\ORADATA\XE\test01.dbf' size 4g;
資料表空間已建立。
JCQ0> alter database datafile 5 resize 5G;
alter database datafile 5 resize 5G
*
ERROR 位於第 1 行:
ORA-12952: 請求超出了允許的最大資料庫大小 4 GB
JCQ0> alter tablespace add datafile 'E:\ORACLEXE\ORADATA\XE\test02.dbf' size 5g;
alter tablespace add datafile 'E:\ORACLEXE\ORADATA\XE\test02.dbf' size 5g
*
ERROR 位於第 1 行:
ORA-02140: 無效的資料表空間名
JCQ0> alter tablespace test
2 add datafile 'E:\ORACLEXE\ORADATA\XE\test02.dbf' size 5g;
alter tablespace test
*
ERROR 位於第 1 行:
ORA-12952: 請求超出了允許的最大資料庫大小 4 GB
JCQ0> alter tablespace test
2 add datafile 'E:\ORACLEXE\ORADATA\XE\test02.dbf' size 4g;
alter tablespace test
*
ERROR 位於第 1 行:
ORA-12952: 請求超出了允許的最大資料庫大小 4 GB
JCQ0> alter tablespace test
2 add datafile 'E:\ORACLEXE\ORADATA\XE\test02.dbf' size 1g;
alter tablespace test
*
ERROR 位於第 1 行:
ORA-12952: 請求超出了允許的最大資料庫大小 4 GB
JCQ0> create tablespace test2 'E:\ORACLEXE\ORADATA\XE\test201.dbf' size 4g;
create tablespace test2 'E:\ORACLEXE\ORADATA\XE\test201.dbf' size 4g
*
ERROR 位於第 1 行:
ORA-02180: 無效的 CREATE TABLESPACE 選項
JCQ0> create tablespace test2 datafile 'E:\ORACLEXE\ORADATA\XE\test201.dbf' size
4g;
create tablespace test2 datafile 'E:\ORACLEXE\ORADATA\XE\test201.dbf' size 4g
*
ERROR 位於第 1 行:
ORA-12952: 請求超出了允許的最大資料庫大小 4 GB
JCQ0> create tablespace test2 datafile 'E:\ORACLEXE\ORADATA\XE\test201.dbf' size
1g;
create tablespace test2 datafile 'E:\ORACLEXE\ORADATA\XE\test201.dbf' size 1g
*
ERROR 位於第 1 行:
ORA-12952: 請求超出了允許的最大資料庫大小 4 GB
JCQ0> -----database excluing system tablespace is 4GB--------------
JCQ0> select sum(bytes)/1024/1024/1024 from dba_data_files;
SUM(BYTES)/1024/1024/1024
-------------------------
4.9375
JCQ0> alter database datafile 1 resize 4g;
alter database datafile 1 resize 4g
*
ERROR 位於第 1 行:
ORA-12952: 請求超出了允許的最大資料庫大小 4 GB
JCQ0> alter database datafile 1 resize 2g;
alter database datafile 1 resize 2g
*
ERROR 位於第 1 行:
ORA-12952: 請求超出了允許的最大資料庫大小 4 GB
JCQ0> alter database datafile 2 resize 2g;
資料庫已更改。
JCQ0>
JCQ0> alter database datafile 3 resize 2g;
alter database datafile 3 resize 2g
*
ERROR 位於第 1 行:
ORA-12952: 請求超出了允許的最大資料庫大小 4 GB
在建立一個大小為4GB的資料表空間後,無法為該資料表空間添加新的資料檔案,系統資料表空間無法resize,但是undo資料表空間可以resize。
看來在該版本中的限制還是極其嚴格的。