导入 Oracle .dmp 文件时出现问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2669162/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Problem importing Oracle .dmp file
提问by Bitfiddler
So I have looked at all the suggested ways of importing .dmp files and non of them seem to answer this question: where does the data go once you import it?
因此,我查看了所有建议的导入 .dmp 文件的方法,但似乎没有一个方法可以回答这个问题:导入后数据会去哪里?
Context: I created a user like so:
上下文:我像这样创建了一个用户:
SQL> create user IMPORTER identified by "12345";
SQL> grant connect, unlimited tablespace, resource to IMPORTER;
I then ran the 'imp' command as follows:
然后我运行了“imp”命令,如下所示:
C:\>imp system/password FROMUSER=OVIEDOE TOUSER=IMPORTER file=c:\database1.dmp
Now there were 9 .dmp files, after each one it asked me for the next one and then I received the message "Import terminated successfully with warnings."
现在有 9 个 .dmp 文件,在每个文件之后它询问我下一个,然后我收到消息“导入成功终止并出现警告”。
The warning was:
警告是:
Warning: the objects were exported by OVIEDOE, not by you
import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
export client uses WE8ISO8859P1 character set (possible charset conversion)
IMP-00046: using FILESIZE value from export file of 2147483648
Now it says it was terminated successfully so my assumption (I am new to oracle so this may be wrong) is that the data was loaded. However, when I use SQL developer to connect to the database and look under the 'tables' node under the IMPORTER user, there is nothing there. What is going on? Did the data load? If so, where can I find it?
现在它说它已成功终止,所以我的假设(我是 oracle 的新手,所以这可能是错误的)是数据已加载。但是,当我使用 SQL developer 连接到数据库并查看 IMPORTER 用户下的“表”节点下时,那里什么也没有。到底是怎么回事?数据加载了吗?如果是这样,我在哪里可以找到它?
回答by Gary Myers
Are you sure that the file actually contains object owned by OVIEDOE ? Normally I'd expect a list of the objects being imported as it processes them.
您确定该文件实际上包含 OVIEDOE 拥有的对象吗?通常,我希望在处理它们时导入对象的列表。
This result is what I'd expect if I'd done an export for USER1 and then tried to import with FROMUSER=USER_1 (and yes, I've done plenty of typos in my time).
如果我为 USER1 完成导出然后尝试使用 FROMUSER=USER_1 导入(是的,我在我的时间里做了很多错别字),这个结果就是我所期望的。
Try IMP SHOW=Y to show the contents of the dump file.
尝试使用 IMP SHOW=Y 来显示转储文件的内容。
回答by Bitfiddler
DCookie: Turns out system did not have IMP_FULL_DATABASE privileges, I have granted them.
DCookie:原来系统没有 IMP_FULL_DATABASE 权限,我已经授予了它们。
So I tried to run:
所以我试着跑:
C:\oraclexe\app\oracle\product.2.0\server\BIN>imp.exe system/password file=C:\exp_schema\database1.dmp show=y full=y
the result was:
结果是:
Import: Release 10.2.0.1.0 - Production on Mon Apr 19 18:21:11 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
Export file created by EXPORT:V09.02.00 via conventional path
Warning: the objects were exported by OVIEDOE, not by you
import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
export client uses WE8ISO8859P1 character set (possible charset conversion)
IMP-00046: using FILESIZE value from export file of 2147483648
. importing OVIEDOE's objects into SYSTEM
. importing PDQ_CLNR's objects into PDQ_CLNR
After this there were a series of alternating blocks that have what looks like the creation of tables followed by the skipping of a table like:
在此之后,有一系列交替块,它们看起来像创建表,然后跳过表,例如:
. . skipping table "CHAINED_ROWS"
There is no indication as to why these tables were skipped and there are many of them. Then at the end, instead of asking for the next file (which is database2.dmp), it stops and displays:
没有迹象表明为什么跳过这些表格,而且有很多表格。然后在最后,它不再询问下一个文件(即 database2.dmp),而是停止并显示:
Import file: EXPDAT.DMP >
Now I don't know what this dump file is or why it is expected. Any ideas?
现在我不知道这个转储文件是什么或者为什么会出现这种情况。有任何想法吗?
回答by DCookie
In SQL Developer, are you logged in as IMPORTER? The user you're logged in as must have privileges on the IMPORTER schema to see its objects.
在 SQL Developer 中,您是否以 IMPORTER 身份登录?您登录的用户必须拥有 IMPORTER 架构的权限才能查看其对象。
Also, make sure that the SYSTEM user has IMP_FULL_DATABASE privileges.
此外,请确保 SYSTEM 用户具有 IMP_FULL_DATABASE 权限。
回答by Juraj
It is well possible that 'imp' created the OVIEDOE schema for you, then you need to look there (in SQL Developer open "Other users" node).
'imp' 很可能为您创建了 OVIEDOE 模式,然后您需要查看那里(在 SQL Developer 中打开“其他用户”节点)。
And if that is not what you want, try fromuser/touser switches of imp.
如果这不是您想要的,请尝试使用 imp 的 fromuser/touser 开关。