重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1456|回复: 0
打印 上一主题 下一主题

往pdb中导入 数据

[复制链接]
跳转到指定楼层
楼主
发表于 2017-2-23 17:33:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
[oracle@dbserver ~]$ impdp 'system/oracle@sztech1' directory=d1 dumpfile=hr.dmp schemas=hr remap_tablespace=%:ts_users
Import: Release 12.2.0.1.0 - Production on Thu Feb 23 19:31:30 2017
Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Master table "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
import done in AL32UTF8 character set and AL16UTF16 NCHAR character set
export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
Warning: possible data loss in character set conversions
Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01":  system/********@sztech1 directory=d1 dumpfile=hr.dmp schemas=hr remap_tablespace=%:ts_users
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"HR" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
ORA-39083: Object type ROLE_GRANT failed to create with error:
ORA-01919: role 'MGMT_USER' does not exist
Failing sql is:
GRANT "MGMT_USER" TO "HR"
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
ORA-31684: Object type SEQUENCE:"HR"."LOCATIONS_SEQ" already exists
ORA-31684: Object type SEQUENCE:"HR"."DEPARTMENTS_SEQ" already exists
ORA-31684: Object type SEQUENCE:"HR"."EMPLOYEES_SEQ" already exists
ORA-31684: Object type SEQUENCE:"HR"."SEQ_TEST" already exists
Processing object type SCHEMA_EXPORT/TABLE/TABLE
ORA-39083: Object type TABLE:"HR"."EXT_EMP_QUERY_RESULTS" failed to create with error:
ORA-06564: object IMP_DIR does not exist
Failing sql is:
CREATE TABLE "HR"."EXT_EMP_QUERY_RESULTS" ("FIRST_NAME" VARCHAR2(20 BYTE), "LAST_NAME" VARCHAR2(20 BYTE), "DEPARTMENT_NAME" VARCHAR2(20 BYTE)) ORGANIZATION EXTERNAL ( TYPE ORACLE_DATAPUMP DEFAULT DIRECTORY "IMP_DIR" LOCATION ( 'emp1.exp', 'emp2.exp', 'emp3.exp' ) )
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "HR"."EXP001"                               137.5 KB    1164 rows
. . imported "HR"."COUNTRIES"                            6.367 KB      25 rows
. . imported "HR"."DEPARTMENTS"                          7.007 KB      27 rows
. . imported "HR"."DEPT"                                 5.476 KB       5 rows
. . imported "HR"."EMP"                                  6.312 KB       3 rows
. . imported "HR"."EMP5"                                 16.80 KB     107 rows
. . imported "HR"."EMPLOYEES"                            16.80 KB     107 rows
. . imported "HR"."JOBS"                                 6.992 KB      19 rows
. . imported "HR"."JOB_HISTORY"                          7.054 KB      10 rows
. . imported "HR"."LOCATIONS"                            8.273 KB      23 rows
. . imported "HR"."REGIONS"                              5.476 KB       4 rows
. . imported "HR"."EMP_1"                                    0 KB       0 rows
. . imported "HR"."EMP_TEST"                                 0 KB       0 rows
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."COUNTRIES" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT REFERENCES ON "HR"."COUNTRIES" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."LOCATIONS" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT REFERENCES ON "HR"."LOCATIONS" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."DEPARTMENTS" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."JOBS" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT REFERENCES ON "HR"."EMPLOYEES" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."EMPLOYEES" TO "OE"
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'OE' does not exist
Failing sql is:
GRANT SELECT ON "HR"."JOB_HISTORY" TO "OE"
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
ORA-31684: Object type PROCEDURE:"HR"."ADD_JOB_HISTORY" already exists
ORA-31684: Object type PROCEDURE:"HR"."SECURE_DML" already exists
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/VIEW/VIEW
ORA-31684: Object type VIEW:"HR"."EMP_DETAILS_VIEW" already exists
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" completed with 19 error(s) at Thu Feb 23 19:31:42 2017 elapsed 0 00:00:12
[oracle@dbserver ~]$

--确认pdb中数据

SQL> conn hr/hr@sztech1
Connected.
SQL> select table_name from tabs;
TABLE_NAME
--------------------------------------------------------------------------------
COUNTRIES
REGIONS
LOCATIONS
DEPARTMENTS
JOBS
EMPLOYEES
JOB_HISTORY
DEPT
EMP
EMP5
EXP001
TABLE_NAME
--------------------------------------------------------------------------------
EMP_TEST
EMP_1
13 rows selected.
SQL>

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-28 16:37 , Processed in 0.108137 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表