博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
mysql数据泵导入导出_oracle数据泵导入导出命令
阅读量:7000 次
发布时间:2019-06-27

本文共 2851 字,大约阅读时间需要 9 分钟。

1.在PL/SQL的界面,找到Directories文件夹,找到目录文件的路径

195994071f1091b17980904068485500.png

ce62833241734bb117388375a6a8f731.png

2.通过SSH进入服务器

找到相应的路径 cd /u01/oracle/dpdir

输入指令

df -h   查看资源使用量

su – oracle   进入系统的oracle用户

3.导出数据库文件

expdp userid=hbcxjm/oracle  directory=dpdir dumpfile=hbcxjm.dmp job_name=hbcxjm logfile=hbcxjmlog parallel=2 schemas=hbcxjm

PS:

其中userid是要导出的目标库的用户名密码,directory是建立的路径名称,dumpfile是目标文件名称

4.新建数据库用户

PS:注意表空间问题,确保表空间充足,否则导入会报错

5.导入数据

impdp hbcxjm/oracle directory=dpdir dumpfile=hbcxjm.dmp REMAP_SCHEMA=hbcxjm:hbcxjm REMAP_TABLESPACE=TP_HBCXJM:TP_HBCXJM

table_exists_action = truncate  logfile=hbcxjmimp.log SCHEMAS=hbcxjm

PS:

REMAP_SCHEMA:导出数据用户的名称和导入数据用户的名称

REMAP_TABLESPACE:导出数据用户的表空间和导入数据用户的表空间

table_exists_action:如果表中有数据的处理方式,此处采用truncate处理

logfile:日志文件名称

例子:

文件导出:

expdp userid=hbcxjm/oracle  directory=dpdir dumpfile=hbcxjm.dmp job_name=hbcxjm logfile=hbcxjmlog parallel=2 schemas=hbcxjm

expdp userid=drm_hbcxjm/oracle  directory=dpdir dumpfile=drm_hbcxjm.dmp job_name=drm_hbcxjm logfile=drm_hbcxjmlog parallel=2 schemas=drm_hbcxjm

expdp userid=hbcxjm_report/oracle  directory=dpdir dumpfile=hbcxjm_report.dmp job_name=hbcxjm_report logfile=hbcxjm_reportlog parallel=2 schemas=hbcxjm_report

expdp userid=hbcxjm_siif/oracle  directory=dpdir dumpfile=hbcxjm_siif.dmp job_name=hbcxjm_siif logfile=hbcxjm_siiflog parallel=2 schemas=hbcxjm_siif

expdp userid=hxpt3dd/oracle  directory=dpdir dumpfile=hxpt3dd.dmp job_name=hxpt3dd logfile=hxpt3ddlog parallel=2 schemas=hxpt3dd

expdp userid=drm_hxpt3dd/oracle  directory=dpdir dumpfile=drm_hxpt3dd.dmp job_name=drm_hxpt3dd logfile=drm_hxpt3ddlog parallel=2 schemas=drm_hxpt3dd

文件导入:

impdp hbcxjm/oracle directory=dpdir dumpfile=hbcxjm.dmp REMAP_SCHEMA=hbcxjm:hbcxjm REMAP_TABLESPACE=TP_HBCXJM:TP_HBCXJM table_exists_action = truncate logfile=hbcxjmimp.log SCHEMAS=hbcxjm

impdp drm_hbcxjm/oracle directory=dpdir dumpfile=drm_hbcxjm.dmp REMAP_SCHEMA=drm_hbcxjm:drm_hbcxjm REMAP_TABLESPACE=TP_HBCXJM_DRM:TP_HBCXJM_DRM table_exists_action = truncate logfile=drm_hbcxjmimp.log SCHEMAS=drm_hbcxjm

impdp hbcxjm_report/oracle directory=dpdir dumpfile=hbcxjm_report.dmp REMAP_SCHEMA=hbcxjm_report:hbcxjm_report REMAP_TABLESPACE=TP_HBCXJM_DRM:TP_HBCXJM_DRM table_exists_action = truncate logfile=hbcxjm_reportimp.log SCHEMAS=hbcxjm_report

impdp hbcxjm_siif/oracle directory=dpdir dumpfile=hbcxjm_siif.dmp REMAP_SCHEMA=hbcxjm_siif:hbcxjm_siif REMAP_TABLESPACE=TP_HBCXJM:TP_HBCXJM table_exists_action = truncate logfile=hbcxjm_siifimp.log SCHEMAS=hbcxjm_siif

impdp hxpt3dd/oracle directory=dpdir dumpfile=hxpt3dd.dmp REMAP_SCHEMA=hxpt3dd:hxpt3dd REMAP_TABLESPACE=TP_HBCXJM_YBDD:TP_HBCXJM_YBDD table_exists_action = truncate logfile=hxpt3ddimp.log SCHEMAS=hxpt3dd

impdp drm_hxpt3dd/oracle directory=dpdir dumpfile=drm_hxpt3dd.dmp REMAP_SCHEMA=drm_hxpt3dd:drm_hxpt3dd REMAP_TABLESPACE=TP_HBCXJM_YBDD:TP_HBCXJM_YBDD table_exists_action = truncate logfile=drm_hxpt3ddimp.log SCHEMAS=drm_hxpt3dd

转载地址:http://fbevl.baihongyu.com/

你可能感兴趣的文章
批量查看mysql多从状态和修改多从主库指向
查看>>
【Curl (libcurl) 开发 之一】Cocos2dx之libcurl(curl_easy)的编程教程(帮助手册)!...
查看>>
diff脚本问题及使用IFS解决问题实际案例
查看>>
Windows Server 2012 R2 WSUS-10:流程概述
查看>>
Percona5.6首次提供了审计日志功能
查看>>
安装完 MySQL 后必须调整的 10 项配置
查看>>
Windows Server 8 Beta 初体验之一:安装篇(无技术含量,安装过的人可以略过)
查看>>
05-Windows Server 2012 R2 会话远程桌面-标准部署-RD连接代理高可用性(RemoteApp)
查看>>
Silverlight Telerik控件学习:弹出窗口RadWindow
查看>>
Window.Show()和Window.ShowDialog()区别
查看>>
poj1742
查看>>
JavaScript计算两个文本框内数据的乘积(四舍五入保留两位小数)
查看>>
c++ extern c
查看>>
Asp.net :一个调试错误 Breakpoint will not currently be hit. No symbols loaded for this document....
查看>>
一个单表死锁的示例
查看>>
A Basic Understanding Of screen On Centos | CentOS Help
查看>>
cellForRowAtIndexPath UITableViewCell 选中后的背景颜色设置
查看>>
linux cp命令参数及用法详解---linux 复制文件命令cp
查看>>
不知道坚持什么
查看>>
datepicker示例
查看>>