纸上得来终觉浅,绝知此事要躬行

9i和10g exp的一个区别

上一篇 / 下一篇  2008-05-11 15:52:53 / 个人分类:oracle管理

9i环境下测试如下:

sys@TEST>select* from v$version;
 
BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
PL/SQL Release 9.2.0.4.0 - Production
CORE    9.2.0.3.0       Production
TNS for Linux: Version 9.2.0.4.0 - Production
NLSRTL Version 9.2.0.4.0 - Production

加参数compress=n情况下导出:

[oracle@single oracle]$ exp scott/tiger tables=test file=test_n.dmp compress=n
 
Export: Release 9.2.0.4.0 - Production on Sun May 11 15:47:13 2008
 
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
 
 
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)
 
About to export specified tables via Conventional Path ...
. . exporting table                           TEST          0 rows exported
Export terminated successfully without warnings.

查看生成的dump文件,创建表test的语句如下:

TABLE "TEST"
CREATE TABLE "TEST" ("EMPNO" NUMBER(4, 0), "ENAME" VARCHAR2(10), "JOB" VARCHAR2(9), "MGR" NUMBER(4, 0), "HIREDATE" DATE, "SAL" NUMBER(7, 2), "COMM" NUMBER(7, 2), "DEPTNO" NUMBER(2, 0))  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "USERS" LOGGING NOCOMPRESS

其中红色字体为初始化区大小。

再看10g环境下测试:

SQL> select * from v$version;
 
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

加参数compress=n情况下导出同样一张表test:

[oracle@oracle-10g ~]$ exp scott/tiger tables=test file=test_n.dmp compress=n
 
Export: Release 10.2.0.1.0 - Production on Sun May 11 15:40:57 2008
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
 
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)
 
About to export specified tables via Conventional Path ...
. . exporting table                           TEST          0 rows exported
Export terminated successfully without warnings.

查看生成的dump文件,创建表test的语句如下:

CREATE TABLE "TEST" ("EMPNO" NUMBER(4, 0), "ENAME" VARCHAR2(10), "JOB" VARCHAR2(9), "MGR" NUMBER(4, 0), "HIREDATE" DATE, "SAL" NUMBER(7, 2), "COMM" NUMBER(7, 2), "DEPTNO" NUMBER(2, 0))  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 23068672FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" LOGGING NOCOMPRESS

其中送色字体为初始化区的大小,而此表的记录数为0,23068672是test表所占空间大小,

SQL> select segment_name,bytes from user_segments where segment_name='TEST';
 
SEGMENT_NAME                                            BYTES
-------------------------------------------------- ----------
TEST                                                 23068672

可见,在10g下,export和import时,高水位线不会发生变化,这似乎很不合理,哪位高手能解释一些为什么呢?

另外,9i和10g的区管理分时和段管理方式如下:

9i:

select tablespace_name,EXTENT_MANAGEMENT,ALLOCATION_TYPE,SEGMENT_SPACE_MANAGEMENT from dba_tablespaces where tablespace_name='USERS';
 
TABLESPACE_NAME                EXTENT_MAN ALLOCATIO SEGMEN

------------------------------ ---------- --------- ------
USERS                          LOCAL      SYSTEM    MANUAL

10g:

SQL> select tablespace_name,EXTENT_MANAGEMENT,ALLOCATION_TYPE,SEGMENT_SPACE_MANAGEMENT from dba_tablespaces where tablespace_name='USERS';
 
TABLESPACE_NAME                EXTENT_MAN ALLOCATIO SEGMEN
------------------------------ ---------- --------- ------
USERS                          LOCAL      SYSTEM    AUTO


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-07-25  
  12345
6789101112
13141516171819
20212223242526
2728293031  

数据统计

  • 访问量: 1247
  • 日志数: 57
  • 影音数: 1
  • 建立时间: 2008-02-29
  • 更新时间: 2008-07-24

RSS订阅

Open Toolbar