<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>惜分飞 &#187; dmp 加密</title>
	<atom:link href="https://www.xifenfei.com/tag/dmp-%e5%8a%a0%e5%af%86/feed" rel="self" type="application/rss+xml" />
	<link>https://www.xifenfei.com</link>
	<description>提供7*24专业数据库(Oracle,SQL Server,MySQL,PostgreSQL等)恢复和技术支持@Tel:17813235971</description>
	<lastBuildDate>Thu, 29 Oct 2026 15:31:46 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>给你的dmp文件(datapump)加上密码锁</title>
		<link>https://www.xifenfei.com/2015/02/%e7%bb%99%e4%bd%a0%e7%9a%84dmp%e6%96%87%e4%bb%b6datapump%e5%8a%a0%e4%b8%8a%e5%af%86%e7%a0%81%e9%94%81.html</link>
		<comments>https://www.xifenfei.com/2015/02/%e7%bb%99%e4%bd%a0%e7%9a%84dmp%e6%96%87%e4%bb%b6datapump%e5%8a%a0%e4%b8%8a%e5%af%86%e7%a0%81%e9%94%81.html#comments</comments>
		<pubDate>Wed, 11 Feb 2015 08:39:07 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle 安全]]></category>
		<category><![CDATA[dmp 加密]]></category>
		<category><![CDATA[ORA-39174]]></category>
		<category><![CDATA[ORA-39176]]></category>
		<category><![CDATA[pumpdata 加密]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=5743</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2015/02/%e7%bb%99%e4%bd%a0%e7%9a%84dmp%e6%96%87%e4%bb%b6datapump%e5%8a%a0%e4%b8%8a%e5%af%86%e7%a0%81%e9%94%81.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2015/02/%e7%bb%99%e4%bd%a0%e7%9a%84dmp%e6%96%87%e4%bb%b6datapump%e5%8a%a0%e4%b8%8a%e5%af%86%e7%a0%81%e9%94%81.html" target="_blank">给你的dmp文件(datapump)加上密码锁</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>从oracle 11.1.0.7开始oracle 支持data pump导出加密,从而实现dmp文件安全.不会因为dmp文件丢失而导致数据泄露.涉及数据泵加密参数主要有：ENCRYPTION,ENCRYPTION_ALGORITHM,ENCRYPTION_MODE,ENCRYPTION_PASSWORD几个参数.这里测试的是使用最简单方式实现datapump加密功能,如果需要更好的数据安全可以考虑实时密码钱包<br />
<br />
<strong>ENCRYPTION</strong><br />
Encrypt part or all of a dump file.<br />
Valid keyword values are: ALL, DATA_ONLY, ENCRYPTED_COLUMNS_ONLY, METADATA_ONLY and NONE.<br />
ENCRYPTION为加密dmp文件加密部分，其参数值可以有ALL, DATA_ONLY, ENCRYPTED_COLUMNS_ONLY, METADATA_ONLY and NONE，<br />
如果只有ENCRYPTION_PASSWORD指定值，那么ENCRYPTION默认值为ALL<br />
如果ENCRYPTION_PASSWORD和ENCRYPTION均为指定，那么默认值为NONE<br />
<br />
<strong>ENCRYPTION_ALGORITHM</strong><br />
Specify how encryption should be done.<br />
Valid keyword values are: [AES128], AES192 and AES256.<br />
ENCRYPTION_ALGORITHM是指加密算法，参数值可以有AES128, AES192 and AES256。默认值为AES128<br />
<br />
<strong>ENCRYPTION_MODE</strong><br />
Method of generating encryption key.<br />
Valid keyword values are: DUAL, PASSWORD and [TRANSPARENT].<br />
ENCRYPTION_MODE指定加密方式，其参数值有DUAL, PASSWORD and TRANSPARENT。默认值为TRANSPARENT<br />
DUAL表示你指定的加密的dmp文件在导入的时候可以通过密码方式或者加密钱包方式导入<br />
PASSWORD表示指定密码方式创建dmp文件，你导入也需要提供密码<br />
TRANSPARENT需要加密钱包方式导出和导入<br />
<br />
<strong>ENCRYPTION_PASSWORD</strong><br />
Password key for creating encrypted data within a dump file.<br />
ENCRYPTION_PASSWORD指定加密密码<br />
<br />
<strong>创建测试表</strong></p>
<pre class="brush: sql; title: ; notranslate">
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 11 14:52:32 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL&gt; conn chf/xifenfei
Connected.
SQL&gt; create table xifenfei (id number,name varchar2(50));

Table created.

SQL&gt; insert into xifenfei values(&amp;id,'&amp;name');
Enter value for id: 1
Enter value for name: xifenfei
old   1: insert into xifenfei values(&amp;id,'&amp;name')
new   1: insert into xifenfei values(1,'xifenfei')

1 row created.

SQL&gt; /
Enter value for id: 2
Enter value for name: www.xifenfei.com
old   1: insert into xifenfei values(&amp;id,'&amp;name')
new   1: insert into xifenfei values(2,'www.xifenfei.com')

1 row created.

SQL&gt; /
Enter value for id: 3
Enter value for name: www.orasos.com
old   1: insert into xifenfei values(&amp;id,'&amp;name')
new   1: insert into xifenfei values(3,'www.orasos.com')

1 row created.

SQL&gt; commit;

Commit complete.

SQL&gt; col name for a50
SQL&gt; set lines 100
SQL&gt; select * from xifenfei;

        ID NAME
---------- --------------------------------------------------
         1 xifenfei
         2 www.xifenfei.com
         3 www.orasos.com
</pre>
<p><strong>创建目录</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; create directory dir_xff as '/tmp';

Directory created.
</pre>
<p><strong>不加密导出</strong></p>
<pre class="brush: bash; title: ; notranslate">
[oracle@localhost ~]$ expdp chf/xifenfei tables=xifenfei directory=dir_xff dumpfile=none.dmp logfile=none.log

Export: Release 11.2.0.4.0 - Production on Wed Feb 11 15:29:13 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting &quot;CHF&quot;.&quot;SYS_EXPORT_TABLE_01&quot;:  chf/******** tables=xifenfei 
directory=dir_xff dumpfile=none.dmp logfile=none.log 
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported &quot;CHF&quot;.&quot;XIFENFEI&quot;                            5.460 KB       3 rows
Master table &quot;CHF&quot;.&quot;SYS_EXPORT_TABLE_01&quot; successfully loaded/unloaded
******************************************************************************
Dump file set for CHF.SYS_EXPORT_TABLE_01 is:
  /tmp/none.dmp
Job &quot;CHF&quot;.&quot;SYS_EXPORT_TABLE_01&quot; successfully completed at Wed Feb 11 15:29:37 2015 elapsed 0 00:00:14
</pre>
<p><strong>数据字典和数据都加密导出</strong></p>
<pre class="brush: bash; title: ; notranslate">
[oracle@localhost ~]$ expdp chf/xifenfei tables=xifenfei directory=dir_xff  ENCRYPTION=ALL dumpfile=ALL.dmp 
logfile=ALL.log ENCRYPTION_MODE=PASSWORD ENCRYPTION_PASSWORD=www.xifenfei.com

Export: Release 11.2.0.4.0 - Production on Wed Feb 11 15:33:06 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting &quot;CHF&quot;.&quot;SYS_EXPORT_TABLE_01&quot;:  chf/******** tables=xifenfei directory=dir_xff ENCRYPTION=ALL 
dumpfile=ALL.dmp logfile=ALL.log ENCRYPTION_MODE=PASSWORD ENCRYPTION_PASSWORD=******** 
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported &quot;CHF&quot;.&quot;XIFENFEI&quot;                            5.468 KB       3 rows
Master table &quot;CHF&quot;.&quot;SYS_EXPORT_TABLE_01&quot; successfully loaded/unloaded
******************************************************************************
Dump file set for CHF.SYS_EXPORT_TABLE_01 is:
  /tmp/ALL.dmp
Job &quot;CHF&quot;.&quot;SYS_EXPORT_TABLE_01&quot; successfully completed at Wed Feb 11 15:33:13 2015 elapsed 0 00:00:06
</pre>
<p><strong>数据加密导出</strong></p>
<pre class="brush: bash; title: ; notranslate">
[oracle@localhost ~]$ expdp chf/xifenfei tables=xifenfei directory=dir_xff  ENCRYPTION=DATA_ONLY 
dumpfile=DATA_ONLY.dmp logfile=DATA_ONLY.log ENCRYPTION_MODE=PASSWORD ENCRYPTION_PASSWORD=www.xifenfei.com

Export: Release 11.2.0.4.0 - Production on Wed Feb 11 15:33:52 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting &quot;CHF&quot;.&quot;SYS_EXPORT_TABLE_01&quot;:  chf/******** tables=xifenfei directory=dir_xff ENCRYPTION=DATA_ONLY 
dumpfile=DATA_ONLY.dmp logfile=DATA_ONLY.log ENCRYPTION_MODE=PASSWORD ENCRYPTION_PASSWORD=******** 
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported &quot;CHF&quot;.&quot;XIFENFEI&quot;                            5.468 KB       3 rows
Master table &quot;CHF&quot;.&quot;SYS_EXPORT_TABLE_01&quot; successfully loaded/unloaded
******************************************************************************
Dump file set for CHF.SYS_EXPORT_TABLE_01 is:
  /tmp/DATA_ONLY.dmp
Job &quot;CHF&quot;.&quot;SYS_EXPORT_TABLE_01&quot; successfully completed at Wed Feb 11 15:33:57 2015 elapsed 0 00:00:04
</pre>
<p><strong>数据字典加密导出</strong></p>
<pre class="brush: bash; title: ; notranslate">
[oracle@localhost tmp]$ expdp chf/xifenfei tables=xifenfei directory=dir_xff  ENCRYPTION=METADATA_ONLY 
dumpfile=METADATA_ONLY.dmp logfile=METADATA_ONLY.log ENCRYPTION_MODE=PASSWORD ENCRYPTION_PASSWORD=www.xifenfei.com

Export: Release 11.2.0.4.0 - Production on Wed Feb 11 15:50:00 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting &quot;CHF&quot;.&quot;SYS_EXPORT_TABLE_01&quot;:  chf/******** tables=xifenfei directory=dir_xff ENCRYPTION=METADATA_ONLY 
dumpfile=METADATA_ONLY.dmp logfile=METADATA_ONLY.log ENCRYPTION_MODE=PASSWORD ENCRYPTION_PASSWORD=******** 
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported &quot;CHF&quot;.&quot;XIFENFEI&quot;                            5.460 KB       3 rows
Master table &quot;CHF&quot;.&quot;SYS_EXPORT_TABLE_01&quot; successfully loaded/unloaded
******************************************************************************
Dump file set for CHF.SYS_EXPORT_TABLE_01 is:
  /tmp/METADATA_ONLY.dmp
Job &quot;CHF&quot;.&quot;SYS_EXPORT_TABLE_01&quot; successfully completed at Wed Feb 11 15:50:04 2015 elapsed 0 00:00:03
</pre>
<p><strong>删除测试表</strong></p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; drop table xifenfei purge;

Table dropped.
</pre>
<p><strong>导入数据未输入密码</strong></p>
<pre class="brush: bash; title: ; notranslate">
[oracle@localhost tmp]$ impdp chf/xifenfei tables=xifenfei directory=dir_xff 
dumpfile=METADATA_ONLY.dmp logfile=xifenfei.log

Import: Release 11.2.0.4.0 - Production on Wed Feb 11 16:03:13 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39174: Encryption password must be supplied.
</pre>
<p><strong>导入数据密码错误</strong></p>
<pre class="brush: bash; title: ; notranslate">
[oracle@localhost tmp]$ impdp chf/xifenfei tables=xifenfei directory=dir_xff   
dumpfile=METADATA_ONLY.dmp logfile=METADATA_ONLY.log ENCRYPTION_PASSWORD=www.orasos.com

Import: Release 11.2.0.4.0 - Production on Wed Feb 11 16:05:46 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39176: Encryption password is incorrect.
</pre>
<p><strong>导入数据密码正确</strong></p>
<pre class="brush: bash; title: ; notranslate">
[oracle@localhost tmp]$ impdp chf/xifenfei tables=xifenfei directory=dir_xff   
dumpfile=METADATA_ONLY.dmp logfile=METADATA_ONLY.log ENCRYPTION_PASSWORD=www.xifenfei.com

Import: Release 11.2.0.4.0 - Production on Wed Feb 11 16:06:00 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table &quot;CHF&quot;.&quot;SYS_IMPORT_TABLE_01&quot; successfully loaded/unloaded
Starting &quot;CHF&quot;.&quot;SYS_IMPORT_TABLE_01&quot;:  chf/******** tables=xifenfei directory=dir_xff 
dumpfile=METADATA_ONLY.dmp logfile=METADATA_ONLY.log ENCRYPTION_PASSWORD=******** 
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported &quot;CHF&quot;.&quot;XIFENFEI&quot;                            5.460 KB       3 rows
Job &quot;CHF&quot;.&quot;SYS_IMPORT_TABLE_01&quot; successfully completed at Wed Feb 11 16:06:04 2015 elapsed 0 00:00:02
</pre>
<p><strong>验证数据</strong></p>
<pre class="brush: sql; title: ; notranslate">
[oracle@localhost tmp]$ sqlplus chf/xifenfei

SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 11 16:06:09 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL&gt; set lines 150
SQL&gt; col name for a50
SQL&gt; select * from xifenfei;

        ID NAME
---------- --------------------------------------------------
         1 xifenfei
         2 www.xifenfei.com
         3 www.orasos.com
</pre>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2015/10/exp-00104-datatype-binary_double-%e9%94%99%e8%af%af.html" rel="bookmark" class="crp_title">EXP-00104: datatype (BINARY_DOUBLE) 错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/data-pump-%e4%b8%adnetwork_link%e5%8f%82%e6%95%b0%e7%9a%84%e4%bd%bf%e7%94%a8.html" rel="bookmark" class="crp_title">Data pump 中network_link参数的使用</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/data-pump-%e4%b8%adnetwork_link%e5%8f%82%e6%95%b0%e7%9a%84%e4%bd%bf%e7%94%a8%e7%bb%ad%e7%99%bb%e5%bd%95%e7%94%a8%e6%88%b7%e5%92%8c%e6%ba%90%e7%ab%af%e7%94%a8%e6%88%b7%e4%b8%8d%e4%b8%80%e8%87%b4.html" rel="bookmark" class="crp_title">Data pump 中network_link参数的使用续(登录用户和源端用户不一致处理)</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/12/oracle-12c%e5%8f%af%e4%bb%a5%e9%80%9a%e8%bf%87expdp%e5%af%bc%e5%87%baview%e6%95%b0%e6%8d%ae.html" rel="bookmark" class="crp_title">ORACLE 12C可以通过expdp导出view数据</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/03/expdp%e4%b8%adparallel%e5%92%8cdumpfile%e5%85%b3%e7%b3%bb.html" rel="bookmark" class="crp_title">expdp中PARALLEL和DUMPFILE关系</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2017/04/impdp-disable_archive_logging.html" rel="bookmark" class="crp_title">impdp中的DISABLE_ARCHIVE_LOGGING参数测试</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/12/impdp-transform.html" rel="bookmark" class="crp_title">impdp TRANSFORM参数</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/impdp-create-index-ora-00942.html" rel="bookmark" class="crp_title">impdp 创建index提示ORA-00942: table or view does not exist</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/09/dul%e5%ae%9e%e7%8e%b0expdp-dump%e6%96%87%e4%bb%b6%e8%bd%ac%e6%8d%a2sqlldr%e6%a0%bc%e5%bc%8f.html" rel="bookmark" class="crp_title">密码保护：dul实现expdp dump文件转换sqlldr格式</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/10/expdp%e9%81%ad%e9%81%87ora-39006ora-39213%e6%95%85%e9%9a%9c%e8%a7%a3%e5%86%b3.html" rel="bookmark" class="crp_title">expdp遭遇ORA-39006/ORA-39213故障解决</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/05/ora-39083-ora-14102.html" rel="bookmark" class="crp_title">impdp报ORA-39083 ORA-14102错误处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/impdp-missing-sys-priv.html" rel="bookmark" class="crp_title">impdp导入数据丢失sys授权问题分析</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2015/02/%e7%bb%99%e4%bd%a0%e7%9a%84dmp%e6%96%87%e4%bb%b6datapump%e5%8a%a0%e4%b8%8a%e5%af%86%e7%a0%81%e9%94%81.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
