简体   繁体   English

Oracle导出:表不存在

[英]Oracle export: table doesn't exist

I am trying to export data in oracle 11g 我想在oracle 11g中导出数据

exp user/password file=dump.dmp tables = (table1)

via sqlplus. 通过sqlplus。

And i get the following error: 我收到以下错误:

About to export specified tables via Conventional Path ... 即将通过常规路径导出指定的表格...
EXP-00011: USER.TABLE1 does not exist EXP-00011:USER.TABLE1不存在
Export terminated successfully with warnings. 导出已成功终止并显示警告。

But when i check who is the owner of this table: 但是,当我检查谁是这个表的所有者时:

SELECT owner, table_name from dba_tables where table_name = 'TABLE1';

I get that the owner of TABLE1 is USER 我得到TABLE1的所有者是USER

What should i do to export this table? 我该怎么做才能导出这张桌子?

UPDATE UPDATE

Actually, i found a solution. 实际上,我找到了解决方案。 I hope it will help someone else. 我希望它会帮助别人。 Since version 11g Oracle has introduced new feature that is called deferred segment creation. 从版本11g开始,Oracle引入了一种称为延迟段创建的新功能。 Thus oracle doesn't create table segment if there are now rows in it. 因此,如果现在有行,oracle不会创建表段。 So i recreated my table with option 'segment creation immediate' 所以我重新创建了我的表,选项'segment creation immediate'

Actually, i found a solution. 实际上,我找到了解决方案。 I hope it will help someone else. 我希望它会帮助别人。 Since version 11g Oracle has introduced new feature that is called deferred segment creation. 从版本11g开始,Oracle引入了一种称为延迟段创建的新功能。 Thus oracle doesn't create table segment if there are no rows in it. 因此,如果没有行,oracle不会创建表段。 And my table didn't contain any data. 而我的表格中没有任何数据。 So i recreated my table with option 'segment creation immediate' 所以我重新创建了我的表,选项'segment creation immediate'

The solution was found here . 解决方案在这里找到。 There are more options how to fix the problem and an explanation why this thing happens to be in oracle 11g. 有更多的选择如何解决问题,并解释为什么这件事恰好在oracle 11g中。 :) :)

In addition to the posted answer from Olivia i would like to add some code: 除了Olivia发布的答案,我想添加一些代码:

SELECT 'alter table ' ||  table_name || ' allocate extent;'
from dba_tables where SEGMENT_CREATED = 'NO';

Execute the output and exp again. 再次执行输出和exp。 Your schema will be exported including empty tables. 将导出您的架构,包括空表。

EDIT: similar question here , maybe you'll find your solution there. 编辑: 这里有类似的问题,也许你会在那里找到你的解决方案。

Change this: 改变这个:

exp user/password file=dump.dmp tables = (table1);

to this: 对此:

exp user/password tables = (table1) file=dump.dmp;

您可以使用以下查询从特定用户获取表级别导出。

exp user/password file=dump.dmp tables = user.table1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM