gpt4 book ai didi

oracle - 从 oracle 转储导入时表的顺序是否相关?

转载 作者:行者123 更新时间:2023-12-02 22:33:20 28 4
gpt4 key购买 nike

我正在尝试从 oracle 转储中导入特定的表,为了避免任何未找到父键的异常,我想按照一定的顺序导入表。例如,如果表 X 依赖于表 A 和 B,我想先导入 A 和 B:

imp user/pass@dbName tables=(A,B,X) rows=y ignore=Y 

这个命令能保证 A 和 B 在 X 之前导入吗?

最佳答案

exp userid=ronr tables=COMM_SCHEDULE_DELIVERY,COMM_SCHEDULE_DETAIL,COMM_SCHEDULE_HEADER file=z.dmp
...
...

imp userid=imp fromuser=ronr touser=imp tables=COMM_SCHEDULE_HEADER,COMM_SCHEDULE_DETAIL,COMM_SCHEDULE_DELIVERY file=z.dmp
Import: Release 11.2.0.3.0 - Production on Tue Aug 7 16:53:34 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

Password:

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Tes

Export file created by EXPORT:V11.02.00 via conventional path

Warning: the objects were exported by RONR, not by you

import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses AL32UTF8 character set (possible charset conversion)
. importing RONR's objects into IMP
. . importing table "COMM_SCHEDULE_DELIVERY" 0 rows imported
. . importing table "COMM_SCHEDULE_DETAIL" 0 rows imported
. . importing table "COMM_SCHEDULE_HEADER" 0 rows imported
Import terminated successfully without warnings.

不,在 imp 上指定的顺序并不能保证表的导入顺序,它是按照它们导出的顺序完成的。

关于oracle - 从 oracle 转储导入时表的顺序是否相关?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11846974/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com