当前位置:网站首页>Oracle使用expdp和impdp导出导入数据
Oracle使用expdp和impdp导出导入数据
2022-08-04 21:47:00 【李长渊哦】
一、创建表
[[email protected] ~]$ sqlplus /nolog;
#连接
conn /as sysdba;
#创建表
create tablespace BLZK logging datafile '/opt/oracle/oradata/ewell/BLZK.dbf' size 500m autoextend on next 50m maxsize 20480m extent management local;
二、创建用户
#创建hlzk_liuzhou用户并指定表空间
create user BLZK identified by BLZK123 default tablespace BLZK temporary tablespace temp profile default;
#授权
grant connect,resource to BLZK ;
grant dba to BLZK ;
Grant imp_full_database to BLZK ;
三、绑定目录
#root用户:
mkdir -p /opt/oracle/oradata/ewell/my_dbdata;
chmod -R 777 /opt/oracle/oradata/ewell/my_dbdata;
#oracle用户:
[[email protected] ~]$ sqlplus /nolog;
SQL> conn /as sysdba;
#绑定
CREATE DIRECTORY my_dbdata AS '/opt/oracle/oradata/ewell/my_dbdata';
#查看创建是否成功
select * from dba_directories where DIRECTORY_NAME = 'my_dbdata';
#授权
GRANT read, write ON DIRECTORY my_dbdata TO BLZK;
#其他(不执行)
drop directory my_dbdata;
四、导入导出
#开始用 datapump 导出
#"my_dbdata" 为导出目录;
#"HLZK.DMP" 为导出的 datadump 文件;
[[email protected] ~]$ expdp BLZK/[email protected]:1521/ewell directory=my_dbdata dumpfile=HLZK.DMP schemas=BLZK version=11.1.0.6.0
#导入到另一个数据库
[[email protected] ~]$ impdp system/oracle DIRECTORY=my_dbdata DUMPFILE=BLZK.dmp
边栏推荐
- 【线性代数03】消元法展示以及AX=b的4种解情况
- 2022强网杯web(部分)
- 数电快速入门(一)(BCD码和三种基本逻辑运算的介绍)
- CountDownLatch使用及原理
- ES6高级-Promise的用法
- rk3399-9.0一级二级休眠
- 【PCBA program design】Grip dynamometer program
- 未知点云结构文件转换需求
- ROS播包可视化
- How to solve the problem that the alarm information cannot be transmitted after EasyGBS is connected to the latest version of Hikvision camera?
猜你喜欢
随机推荐
rk3399-9.0一级二级休眠
How to solve the problem that the alarm information cannot be transmitted after EasyGBS is connected to the latest version of Hikvision camera?
The upgrade and transformation plan of the fortress machine for medium and large commercial banks!Must see!
C language knowledge (1) - overview of C language, data types
如何为Web3.0世界启动完美的DAO
ini怎么使用? C#教程
Webmine Webpage Mining Trojan Analysis and Disposal
[Linear Algebra 02] 2 interpretations of AX=b and 5 perspectives of matrix multiplication
【线性代数02】AX=b的2种解释和矩阵乘法的5种视角
大势所趋之下的nft拍卖,未来艺术品的新赋能
可视化工作流引擎开发OA系统,让企业少花冤枉钱
buu web
JdbcTemplate概述和测试
Altium Designer 19.1.18 - Protecting Locked Objects
docker 搭建mysql 主从复制
如何将二叉搜索树转化为一个有序的双向链表(原树上修改)
MySQL查询为啥慢了?
Why is MySQL query slow?
如何一键重装win7系统?重装win7系统详细教程
国际项目管理师PMP证书,值得考嘛?


![[QT] Implementation of callback function](/img/df/500ae0625eccf83f39d9a8ddfd3533.png)






