oracle 11g 导入\导出(expdp impdp)详解之导入

上一个环节,我们讲了导出(expdp )操作,这个环节则讲导出操作
准备文件: 注意:扩展名SEC.DMP,不可为SEC.DMP;,必须把;去掉。
在这里插入图片描述

可变量详细
expdirdirectory对象名
E:/expexpdir对象导入文件储存位置
sec.dmp导入的文件名
system系统用户

三、导入(impdp)
1、建立directory
首先建立 directory – expdir (导入导出都要建立,expdir为directory 对象名,对应的 E:/exp 文件夹如果不存在,需要手工建立) 注意:该步骤在sys用户下完成
在这里插入图片描述

SQL> create or replace directory expdir as 'E:/exp';
目录已创建。
SQL> grant read,write on directory expdir to system;
授权成功。
SQL> select * from dba_directories;

2、导入语句
注意:该步骤在cmd下完成

C:\Users\TTOM>impdp system/1234 directory=expdir dumpfile=SEC.dmp

Import: Release 11.2.0.1.0 - Production on 星期三 7月 17 21:55:47 2019
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
已成功加载/卸载了主表 "SYSTEM"."SYS_IMPORT_FULL_01"
......
. . 导入了 "TEST"."T1"                                 5.015 KB       1 行
. . 导入了 "TEST"."T2"                                 5.015 KB       1 行
. . 导入了 "TEST"."T3"                                 5.015 KB       1 行
作业 "SYSTEM"."SYS_IMPORT_FULL_01" 已于 21:55:49 成功完成

在这里插入图片描述
3、更改密码
如果不知道TEST用户的密码,则我们需要更改该用户的密码,需要登录超级用户(sysdba)
注意:该步骤在sys用户下完成

C:\Users\TTOM>sqlplus sys/1234 as sysdba;
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> alter user test identified by 1234;
用户已更改。

二、导出(expdp)
https://blog.csdn.net/yantao19930905/article/details/96328721

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值