当前位置:网站首页>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
边栏推荐
猜你喜欢

如何将二叉搜索树转化为一个有序的双向链表(原树上修改)

ctfshow终极考核web654
![[larave]关于laravel使用form submit()不能获取值问题](/img/2f/a7a17b1497390509edd6d096e8e473.png)
[larave]关于laravel使用form submit()不能获取值问题

OD-Model【6】:YOLOv2

Rocketchip RISC-V Debug调试硬件相关(四)hartIsInReset

rk3399 驱动屏参的几种方式
![[Linear Algebra 03] Elimination method display and 4 solutions of AX=b](/img/29/fd79222e5bec26851974abd86a2013.png)
[Linear Algebra 03] Elimination method display and 4 solutions of AX=b

mysql基础

JWT actively checks whether the Token has expired

AXI interface application of Zynq Fpga image processing - the use of axi_lite interface
随机推荐
DSPE-PEG-Aldehyde,DSPE-PEG-CHO,磷脂-聚乙二醇-醛基一种疏水18碳磷脂
matlab drawing
LocalDateTime的详细使用方法
Pinduoduo open platform order information query interface [pdd.order.basic.list.get order basic information list query interface (according to transaction time)] code docking tutorial
数电快速入门(一)(BCD码和三种基本逻辑运算的介绍)
Autowired自动装配
milvus配置相关
UDP communication
UDP通信
Cocoa Application-test
EasyGBS接入最新版海康摄像头后无法传递告警信息该如何解决?
Ramnit感染型病毒分析与处置
基于声卡实现的音频存储示波器,可作为电磁学实验的测量仪表
数电快速入门(三)(卡诺图化简法的介绍)
LayaBox---TypeScript---Problems encountered at first contact
Three ways to set a specific device UWP XAML view
buu web
中大型商业银行堡垒机升级改造方案!必看!
OC-拷贝
rk3399-0.0 svc命令