导出导入oracle

时间:2018-05-28 02:27:14

标签: sql oracle import

在对Datawarehouse数据库的导入操作期间,我遇到了以下问题。使用代码ORA-39002ORA-39166

导致这些错误的原因可能是什么
C:\Users\kmaaz>expdp bank/b123 tables=employee,transaction,branch,account directory=my_dir dumpfile=tables_dump.dmp logfile=tables_log.log

Export: Release 12.1.0.2.0 - Production on Mon May 28 07:21:51 2018

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

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Starting "BANK"."SYS_EXPORT_TABLE_01":  bank/******** tables=employee,transaction,branch,account directory=my_dir dumpfile=tables_dump.dmp logfile=tables_log.log
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 192 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
. . exported "BANK"."ACCOUNT"                            10.21 KB       1 rows
. . exported "BANK"."BRANCH"                             6.789 KB       1 rows
. . exported "BANK"."EMPLOYEE"                           7.632 KB       1 rows
. . exported "BANK"."TRANSACTION"                            0 KB       0 rows
Master table "BANK"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for BANK.SYS_EXPORT_TABLE_01 is:
  D:\EXPORT\TABLES_DUMP.DMP
Job "BANK"."SYS_EXPORT_TABLE_01" successfully completed at Mon May 28 07:21:59 2018 elapsed 0 00:00:07


C:\Users\kmaaz>impdp dwh/d123 tables=employee,transaction,branch,account directory=my_dir dumpfile=tables_dump.dmp logfile=tables_log.log

Import: Release 12.1.0.2.0 - Production on Mon May 28 07:22:08 2018

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

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
ORA-39002: invalid operation
ORA-39166: Object DWH.ACCOUNT was not found or could not be exported or imported.
ORA-39166: Object DWH.BRANCH was not found or could not be exported or imported.
ORA-39166: Object DWH.TRANSACTION was not found or could not be exported or imported.
ORA-39166: Object DWH.EMPLOYEE was not found or could not be exported or imported.

Screenshot about importing data

1 个答案:

答案 0 :(得分:2)

  • 首先,确保您拥有IMP_FULL_DATABASE权限 理所当然的。
  • 最有可能ORA-39166 [无法找到对象]错误 由于 impdp中缺少 REMAP_SCHEMA=BANK:DWH 子句而引发 声明。因此,对象的位置不能 确定。
相关问题