zoukankan      html  css  js  c++  java
  • 14.3.2 调用IMPDP —— 导入方案

    一、删除用户

    C:\>sqlplus system/orcl@orcl

    SQL*Plus: Release 10.2.0.1.0 - Production on 星期日 1月 4 17:48:51 2009

    Copyright (c) 1982, 2005, Oracle.  All rights reserved.

    连接到:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options

    SQL> drop user scott cascade;

    用户已删除。

    二、创建用户(为了方便,赋予DBA 权限)

    SQL> create user scott identified by tiger;

    用户已创建。

    SQL> grant dba to scott;

    授权成功。

    三、导入自身方案

    C:\>impdp scott/tiger@orcl directory=dump_dir dumpfile=schema.dmp schemas=scott

    Import: Release 10.2.0.1.0 - Production on 星期日, 04 1月, 2009 18:02:46

    Copyright (c) 2003, 2005, Oracle.  All rights reserved.

    连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    已成功加载/卸载了主表 "SCOTT"."SYS_IMPORT_SCHEMA_01"
    启动 "SCOTT"."SYS_IMPORT_SCHEMA_01":  scott/********@orcl directory=dump_dir dum
    pfile=schema.dmp schemas=scott
    处理对象类型 SCHEMA_EXPORT/USER
    ORA-31684: 对象类型 USER:"SCOTT" 已存在
    处理对象类型 SCHEMA_EXPORT/SYSTEM_GRANT
    处理对象类型 SCHEMA_EXPORT/ROLE_GRANT
    处理对象类型 SCHEMA_EXPORT/DEFAULT_ROLE
    处理对象类型 SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
    处理对象类型 SCHEMA_EXPORT/TABLE/TABLE
    处理对象类型 SCHEMA_EXPORT/TABLE/TABLE_DATA
    . . 导入了 "SCOTT"."DEPT"                              5.656 KB       4 行
    . . 导入了 "SCOTT"."EMP"                               7.820 KB      14 行
    . . 导入了 "SCOTT"."SALGRADE"                          5.585 KB       5 行
    . . 导入了 "SCOTT"."BONUS"                                 0 KB       0 行
    处理对象类型 SCHEMA_EXPORT/TABLE/INDEX/INDEX
    处理对象类型 SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    处理对象类型 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    处理对象类型 SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
    处理对象类型 SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    作业 "SCOTT"."SYS_IMPORT_SCHEMA_01" 已经完成, 但是有 1 个错误 (于 18:02:56 完成)

    四、导入到其他方案

    C:\>impdp system/orcl@orcl directory=dump_dir dumpfile=schema.dmp remap_schema=s
    cott:system

    Import: Release 10.2.0.1.0 - Production on 星期日, 04 1月, 2009 18:05:55

    Copyright (c) 2003, 2005, Oracle.  All rights reserved.

    连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    已成功加载/卸载了主表 "SYSTEM"."SYS_IMPORT_FULL_01"
    启动 "SYSTEM"."SYS_IMPORT_FULL_01":  system/********@orcl directory=dump_dir dum
    pfile=schema.dmp remap_schema=scott:system
    处理对象类型 SCHEMA_EXPORT/USER
    处理对象类型 SCHEMA_EXPORT/SYSTEM_GRANT
    处理对象类型 SCHEMA_EXPORT/ROLE_GRANT
    …………………………………………………………………………………………………………………………

    处理对象类型 SCHEMA_EXPORT/TABLE/POST_TABLE_ACTION
    处理对象类型 SCHEMA_EXPORT/POST_SCHEMA/PROCACT_SCHEMA
    作业 "SYSTEM"."SYS_IMPORT_FULL_01" 已经完成, 但是有 136 个错误 (于 18:06:37 完成)

  • 相关阅读:
    Codeforces 1167E(思路、数据处理)
    Codeforces 185D(发现性质、欧拉定理)
    BUPT2017 springtraining(16) #4 ——基础数论
    Codeforces Round #404 (Div. 2)——ABCDE
    BUPT2017 springtraining(15) #3
    BUPT2017 springtraining(16) #3 ——搜索与动态规划
    BUPT2017 springtraining(16) #2 ——基础数据结构
    Codeforces Round #413(Div. 1 + Div. 2, combined)——ABCD
    BUPT2017 springtraining(16) #1 ——近期codeforces简单题目回顾
    Codeforces Round #400 (Div. 1 + Div. 2, combined)——ABCDE
  • 原文地址:https://www.cnblogs.com/yiwuya/p/1368367.html
Copyright © 2011-2022 走看看