ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 9i和10g exp的一个区别

9i和10g exp的一个区别

原创 Linux操作系统 作者:lsq_008 时间:2008-05-11 15:52:53 0 删除 编辑

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 65536 FREELISTS 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 23068672 FREELISTS 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

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10972173/viewspace-265031/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: rman数据迁移测试
请登录后发表评论 登录
全部评论
十余年大型金融及电信系统数据库管理经验,曾服务于中国建设银行、中国移动。对oracle,mysql数据库有深入了解。 擅长python开发,独立开发了开源数据库自动化监控运维平台Power Monitor。

注册时间:2008-02-29

  • 博文量
    335
  • 访问量
    1369116