【发布时间】:2014-07-22 19:22:11
【问题描述】:
我使用原始 exp(不是 expdp)(EXPORT:V10.02.01,Oracle 10g)创建了 Oracle 转储文件。它们仅包含四个表的表数据。
1) 我想将表数据提取到文件(平面/固定宽度、CVS 或其他文本文件)中,而不将它们导入另一个 Oracle DB。 [首选]
2) 或者,我需要一个可以将它们导入普通用户(不是 SYSDBA)的解决方案,以便我可以使用其他工具来提取数据。
我的数据库是 11g,但如果需要,我可以找到 10g 的数据库。我可以使用 TOAD for Oracle Xpert 11.6.1.6。我是一名经验丰富的 Oracle 程序员,但我之前没有使用过 EXP/IMP。
(以下信息已被隐藏以保护数据。)
以下是转储文件的创建方式:
exp FILE=data.dmp \
LOG=data.log \
TABLES=USER1.TABLE1,USER1.TABLE2,USER1.TABLE3,USER1.TABLE4 \
INDEXES=N TRIGGERS=N CONSTRAINTS=N GRANTS=N
这是日志:
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
Note: grants on tables/views/sequences/roles will not be exported
Note: indexes on tables will not be exported
Note: constraints on tables will not be exported
About to export specified tables via Conventional Path ...
Current user changed to USER1
. . exporting table TABLE1 271 rows exported
. . exporting table TABLE2 272088 rows exported
. . exporting table TABLE3 2770 rows exported
. . exporting table TABLE4 21041 rows exported
Export terminated successfully without warnings.
提前谢谢你。
【问题讨论】:
-
是什么阻止您使用
imp导入它们? -
我有转储文件。我需要数据。但我在数据库中不需要它,这些是我宁愿避免的特权命令。我只想在一个平面文件中的表格数据。也就是说,我正在使用 imp 和服务器来获取数据并将其导出。我把这个问题留了一会儿,看看有没有其他人试过这个。
-
您说您可以导入它们并以标志文件格式导出它们。是什么阻止您使用
imp这样做?除非您以某种方式将它们放入数据库,否则您将无法将它们放入平面文件中,因为 dmp 文件是二进制、专有的 Oracle 格式。