- 浏览: 76538 次
- 性别:
- 来自: 成都
文章分类
最新评论
Parameter DIRECT: Conventional Path Export Versus Direct Path Export
- 博客分类:
- oracle管理
1. Introduction.
1.1. Starting with Oracle7 release 7.3, the Export utility provides two methods for exporting table data:
- Conventional Path Export
- Direct Path Export
1.2. Conventional path Export.
Conventional path Export uses the SQL SELECT statement to extract data from tables. Data is read from disk into the buffer cache, and rows are transferred to the evaluating buffer. The data, after passing expression evaluation, is transferred to the Export client, which then writes the data into the export file.
1.3. Direct path Export.
When using a Direct path Export, the data is read from disk directly into the export session's program global area (PGA): the rows are transferred directly to the Export session's private buffer. This also means that the SQL command-processing layer (evaluation buffer) can be bypassed, because the data is already in the format that Export expects. As a result, unnecessary data conversion is avoided. The data is transferred to the Export client, which then writes the data into the export file.
1.4. The parameter DIRECT specifies whether you use the direct path Export (DIRECT=Y) or the conventional path Export (DIRECT=N).
1.5. To use direct path Export, specify the DIRECT=Y parameter on the command line or in the parameter file. The default is DIRECT=N, which extracts the table data using the conventional path.
中文:
从Oracle7的release7.3开始,Oracle开始在exp工具中提供两种方法导出表的数据:Direct Path导出和Conventional Path导出。通过exp的参数Direct来判断选用那种导出方式。这个参数有两个值Y/N,如果指定为Y,则表明exp是使用Direct Path的模式导出数据,指定为N,表明数据库是用Conventional Path的模式导出数据的。如果不明确指定direct的值,默认是N,也就是用Conventional Path的模式导出数据
一、两种导出的模式在导出的原理上是存在差别的。
Ø Conventional Path模式导出相当于使用select语句从表中取出数据,数据从磁盘上先读到buffer cache中,记录被转移到一个评估检测的缓冲区中,数据经过语法检测后没有问题,将数据传给exp的客户端,最后写入导出的文件中。
Ø 如果使用Direct Path模式导出,数据直接从磁盘上读取到导出的PGA中:记录直接被转换导出会话的私有buffer中。这也就是意味着SQL语句处理层被忽略掉了,因为数据已经是符合导出的格式了,不需要其他的转换处理了。数据直接被传送给导出的客户端,最后写入导出文件。
二、两种导出模式性能上也有一定的差异。
Ø Direct Path导出模式速度上明显快于Conventional Path导出模式,因为Direct Path导出模式忽略了SQL语句处理这一层。
Ø 当使用Direct Path导出模式的时候,可以增大参数RECORDLENGTH的值来提高导出的性能。导出的性能主要取决以下的因素:DB_BLOCK_SIZE、导出表上列的类型、导出文件的I/O层(主要是指导出文件尽量要和数据库的数据文件在不同的磁盘上,避免I/O上的竞争)。一般来说,参数RECORDLENGTH设置为操作系统I/O的block size或者是DB_BLOCK_SIZE的整数倍,例如64K。
Ø 使用哪种模式导出数据都不会影响导入数据,也就是说导入数据的时间是一样的。
三、两种导出模式都存在一些限制,在某些情况下只能使用其中的一种。
Ø Direct Path导出模式只能使用命令行或者参数文件的方式来导出,不能使用交互式的方式导出数据,只有Conventional Path导出模式可以使用交互式的方式。
Ø Direct Path导出模式不能用于导出表空间,即设置参数TRANSPORT_TABLESPACES=Y,其他的FULL、USER、TABLE模式均可以使用Direct Path导出模式。
Ø 在Oracle8i以前的版本里面,如果表里面存在LOB的对象,是不能使用Direct Path导出模式导出表的,如果使用Direct Path导出模式导出表,那些存在LOB对象的记录是不会被导出的。自从Oracle8i之后,这种限制就被取消了。对于Oracle8i之后的版本,如果使用Direct Path导出模式导出表,那些存在LOB对象的记录是会自动以Conventional Path导出模式来导出。但是如果你用低于Oracle8i的客户端的exp工具的Direct Path导出模式导出Oracle8i以上的数据库存在LOB对象的表,那些包含LOB的记录还是同样不会被导出。
Ø Exp工具中的QUERY参数只能用于Conventional Path导出模式,QUERY参数允许导出一个表的满足一定条件的部分记录。
Ø Exp工具中的BUFFER参数只能用于Conventional Path导出模式,BUFFER参数设置了用于fetch记录的缓存的大小,以字节为单位,即在array中最大数量的记录。
Ø 参数RECORDLENGTH指定文件记录的最大长度,以字节为单位,即导出I/O的buffer,最大为64K。这个参数决定了在没写入导出文件中缓存中堆积数据的多少。如果没有设置这个参数,在大多数平台的默认值是1024字节。
Ø 只有当环境变量中的NLS_LANG设置成跟导出数据库中的字符集一致的时候才能使用Direct Path导出模式导出数据。如果环境变量中的NLS_LANG和数据库的字符集不一致的时候,导出就会报类似下面的错误:
EXP-41 "Export done in server's UTF8, different from user's character set WE8ISO8859P1"
EXP-0 "Export terminated unsuccessfully".
这种限制只对于Oracle8i及其更低版本的Oracle有效,Oracle8i以上的版本不会出现此类错误。
四、两种导出模式在安全方面的一些差异。
Ø 对于虚拟数据库(Virtual Private Database)和Oracle Label Security如果强制使用Conventional Path导出模式导出数据,导出会成功的中止,但是存在类似下面的提示警告:EXP-79 "Data in table %s is protected. Conventional path may only be exporting partial table."
Ø 对于SYS用户和被授予了EXEMPT ACCESS POLICY权限的用户,在导出数据的时候是不受虚拟数据库(Virtual Private Database)和Oracle Label Security的影响的,两种导出模式均可以使用。但是我们需要注意的是,EXEMPT ACCESS POLICY的权限很大,在管理数据库用户的时候一般不要轻易授予,但是这个权限不会影响对传统对象执行SELECT、INSERT、DELETE、UPDATE的操作。
1.1. Starting with Oracle7 release 7.3, the Export utility provides two methods for exporting table data:
- Conventional Path Export
- Direct Path Export
1.2. Conventional path Export.
Conventional path Export uses the SQL SELECT statement to extract data from tables. Data is read from disk into the buffer cache, and rows are transferred to the evaluating buffer. The data, after passing expression evaluation, is transferred to the Export client, which then writes the data into the export file.
1.3. Direct path Export.
When using a Direct path Export, the data is read from disk directly into the export session's program global area (PGA): the rows are transferred directly to the Export session's private buffer. This also means that the SQL command-processing layer (evaluation buffer) can be bypassed, because the data is already in the format that Export expects. As a result, unnecessary data conversion is avoided. The data is transferred to the Export client, which then writes the data into the export file.
1.4. The parameter DIRECT specifies whether you use the direct path Export (DIRECT=Y) or the conventional path Export (DIRECT=N).
1.5. To use direct path Export, specify the DIRECT=Y parameter on the command line or in the parameter file. The default is DIRECT=N, which extracts the table data using the conventional path.
中文:
从Oracle7的release7.3开始,Oracle开始在exp工具中提供两种方法导出表的数据:Direct Path导出和Conventional Path导出。通过exp的参数Direct来判断选用那种导出方式。这个参数有两个值Y/N,如果指定为Y,则表明exp是使用Direct Path的模式导出数据,指定为N,表明数据库是用Conventional Path的模式导出数据的。如果不明确指定direct的值,默认是N,也就是用Conventional Path的模式导出数据
一、两种导出的模式在导出的原理上是存在差别的。
Ø Conventional Path模式导出相当于使用select语句从表中取出数据,数据从磁盘上先读到buffer cache中,记录被转移到一个评估检测的缓冲区中,数据经过语法检测后没有问题,将数据传给exp的客户端,最后写入导出的文件中。
Ø 如果使用Direct Path模式导出,数据直接从磁盘上读取到导出的PGA中:记录直接被转换导出会话的私有buffer中。这也就是意味着SQL语句处理层被忽略掉了,因为数据已经是符合导出的格式了,不需要其他的转换处理了。数据直接被传送给导出的客户端,最后写入导出文件。
二、两种导出模式性能上也有一定的差异。
Ø Direct Path导出模式速度上明显快于Conventional Path导出模式,因为Direct Path导出模式忽略了SQL语句处理这一层。
Ø 当使用Direct Path导出模式的时候,可以增大参数RECORDLENGTH的值来提高导出的性能。导出的性能主要取决以下的因素:DB_BLOCK_SIZE、导出表上列的类型、导出文件的I/O层(主要是指导出文件尽量要和数据库的数据文件在不同的磁盘上,避免I/O上的竞争)。一般来说,参数RECORDLENGTH设置为操作系统I/O的block size或者是DB_BLOCK_SIZE的整数倍,例如64K。
Ø 使用哪种模式导出数据都不会影响导入数据,也就是说导入数据的时间是一样的。
三、两种导出模式都存在一些限制,在某些情况下只能使用其中的一种。
Ø Direct Path导出模式只能使用命令行或者参数文件的方式来导出,不能使用交互式的方式导出数据,只有Conventional Path导出模式可以使用交互式的方式。
Ø Direct Path导出模式不能用于导出表空间,即设置参数TRANSPORT_TABLESPACES=Y,其他的FULL、USER、TABLE模式均可以使用Direct Path导出模式。
Ø 在Oracle8i以前的版本里面,如果表里面存在LOB的对象,是不能使用Direct Path导出模式导出表的,如果使用Direct Path导出模式导出表,那些存在LOB对象的记录是不会被导出的。自从Oracle8i之后,这种限制就被取消了。对于Oracle8i之后的版本,如果使用Direct Path导出模式导出表,那些存在LOB对象的记录是会自动以Conventional Path导出模式来导出。但是如果你用低于Oracle8i的客户端的exp工具的Direct Path导出模式导出Oracle8i以上的数据库存在LOB对象的表,那些包含LOB的记录还是同样不会被导出。
Ø Exp工具中的QUERY参数只能用于Conventional Path导出模式,QUERY参数允许导出一个表的满足一定条件的部分记录。
Ø Exp工具中的BUFFER参数只能用于Conventional Path导出模式,BUFFER参数设置了用于fetch记录的缓存的大小,以字节为单位,即在array中最大数量的记录。
Ø 参数RECORDLENGTH指定文件记录的最大长度,以字节为单位,即导出I/O的buffer,最大为64K。这个参数决定了在没写入导出文件中缓存中堆积数据的多少。如果没有设置这个参数,在大多数平台的默认值是1024字节。
Ø 只有当环境变量中的NLS_LANG设置成跟导出数据库中的字符集一致的时候才能使用Direct Path导出模式导出数据。如果环境变量中的NLS_LANG和数据库的字符集不一致的时候,导出就会报类似下面的错误:
EXP-41 "Export done in server's UTF8, different from user's character set WE8ISO8859P1"
EXP-0 "Export terminated unsuccessfully".
这种限制只对于Oracle8i及其更低版本的Oracle有效,Oracle8i以上的版本不会出现此类错误。
四、两种导出模式在安全方面的一些差异。
Ø 对于虚拟数据库(Virtual Private Database)和Oracle Label Security如果强制使用Conventional Path导出模式导出数据,导出会成功的中止,但是存在类似下面的提示警告:EXP-79 "Data in table %s is protected. Conventional path may only be exporting partial table."
Ø 对于SYS用户和被授予了EXEMPT ACCESS POLICY权限的用户,在导出数据的时候是不受虚拟数据库(Virtual Private Database)和Oracle Label Security的影响的,两种导出模式均可以使用。但是我们需要注意的是,EXEMPT ACCESS POLICY的权限很大,在管理数据库用户的时候一般不要轻易授予,但是这个权限不会影响对传统对象执行SELECT、INSERT、DELETE、UPDATE的操作。
发表评论
-
Oracle 9i/10g/11g数据库升级路线图upgrade
2011-09-14 14:17 998From: http://www.orac ... -
相关网址
2011-08-17 14:58 715锁:http://blog.csdn.net/tianleso ... -
10g11gConfiguration of TAF(Transparent Application Failover) and Load Balancing
2010-09-26 15:01 142210g & 11g :Configuration of ... -
SELECT containing a MIN or MAX into a CHAR variable inside a PL/SQL block Fails
2010-09-08 09:50 1784简单描述下:主机HP 11.31 数据库ORACLE 920 ... -
在UNIX裸设备和文件系统之间移动ORACLE(转载)
2010-09-04 17:19 1378一、关于裸设备 1.1 什 ... -
Troubleshooting ORA-29740 in a RAC Environment
2010-06-10 16:15 1918最近要更换新存储,早上在机房布置光纤的时候,不小心把HP服务器 ... -
HP-UX: Asynchronous i/o [ID 139272.1](转metalink)
2010-05-11 16:49 2364HP-UX: Asynchronous i/o [ID 139 ... -
(转metalink)Troubleshooting ORA-27300 ORA-27301 ORA-27302 errors [ID 579365.1]
2010-05-11 14:47 8396Troubleshooting ORA-27300 ORA-2 ... -
ORA-27054 ERRORS WHEN RUNNING RMAN WITH NFS
2010-05-07 14:43 1895Subject: ORA-27054 ERRORS WHEN ... -
DBA日常工作职责(转载 eygle)
2010-01-13 09:12 1853DBA的工作职责是什么?每天DBA应该做哪些工作?稳定环境中的 ... -
ORA-600 [srsnext_1] when running 9.2 on AIX 5.2 [ID 262851.1]
2009-12-02 14:49 1031ORA-600 [srsnext_1] when runnin ... -
PSU--Oracle数据库补丁管理的重要改进
2009-11-30 15:23 29312009年10月20日,Oracle公 ... -
监听文件 LISTENER.ORA 各参数意思
2009-11-20 21:55 2070监听文件 LISTENER.ORA 各参数意思 The fo ... -
dba要做的事
2009-11-14 18:40 946dba要做的事 ORACLE数据库管理员应按如下方式对ORAC ... -
ORA-00600 [kglobpn_1] -- metalink
2009-11-11 13:35 1572Application Received ORA-00600 ... -
软分析--快速软分析
2009-10-06 15:48 1139一、SQL执行过程 客户端发出一个SQL,会经历如下步骤后才会 ... -
ORACLE 查看用户密码修改时间
2009-10-06 15:46 5912ORACLE 查看用户密码修改时间 1。当前数据库版本为 ...
相关推荐
Freud's Unfinished Journey: Conventional and Critical Perspectives in Psychoanalytic Theory. London: Routledge and Kegan Paul, 1981, 145 pp., [dollar]15.00 Book Reviews 575 young; and the many ...
传统的 符合规范的轻量级库,用于处理。 注意:目前,此库仅在我... import 'package:conventional/conventional.dart' ; main () { final List < Commit> commits = Commit . parseCommits (testLog); if ( hasRelea
Conventional
cz-常规更改日志 状态: 该部分家庭。 提示使用标准。组态package.json 与... default values "config" : { "commitizen" : { "path" : "./node_modules/cz-conventional-changelog" , "disableScopeLowerCase
npm install --global git-conventional-commits 用法 创建git-conventional-commits init 根据您的需要调整config git-conventional-commits.json 指令 :information: 在命令中添加帮助参数-h以列出所有可能的...
高阶谱MATLAB工具箱,内含应用说明,Higher-Order Spectrum Estimation:conventional methods,parametric methods,Quadratic Phase Coupling等
配置创建github 操作工作流: # .github/workflows/conventional-pr.ymlname : conventional-pron : pull_request : branches : - main - master types : - opened - edited - synchronizejobs : lint-pr : runs-on...
RC-4&5_Conventional,安装程序
软件工程英文教学课件:Ch18 Testing Conventional Applications.ppt
传统路径:(conventional path):SQLLDR会利用SQL插入为我们加载数据。 直接路径(direct path):采用这种模式,SQLLDR不使用SQL;而是直接格式化数据库块。 利用直接路径加载,你能从一个平面文件读数据,并将其...
国外的一本《电路》教材 《Electric Circuits》 第十版,作者是詹姆斯
However, there is an inherent problem with conventional stereo playback - crosstalk. Crosstalk happens naturally as the sound from the left speaker goes into both the listener’s left and right ears ...
Combing the time-correlated ... Here we present a comprehensive investigation on the performance of two data analysis methods, the first moment (M1) method and the conventional least squares (Fittin
软件工程教学课件:Chapter_15_Testing Conventional Applications.ppt
软件工程英文教学课件:Ch18-Testing-Conventional-Applications.pptx
:globe_with_meridians: 常规变更日志 :open_book: 介绍 提示基于标准,该标准似乎已被放弃。 因此,我们决定制作自己的程序包,并包括一些PR,切换到ES6并添加... Juste用@ weareopensource / conventional-changel
作为全局实用程序安装npm install --global commitizen @metahub/cz-conventional-commit 在您的主目录中创建一个.czrc文件,其内容如下: { " path " : " @metahub/cz-conventional-commit " , " cz-conventional-...
about to export ORACLE's tables via Conventional Path ... . . exporting table BOOK 1 rows exported . . exporting table CLASS 0 rows exported . . exporting table CUSTOMER 0 rows exported EXP-00091: ...
rows = Number of rows in conventional path bind array or between direct path data saves nolog = no logging方式导入 (默认FALSE) Export Valid Keywords: query = select语句,只支持单表查询 table = ...