当前位置:网站首页>Oracle 数据泵导表
Oracle 数据泵导表
2022-06-26 04:18:00 【大胖某人】
Oracle 数据泵导表记录
sqlplus / as sysdba
create directory dir_dp as ‘/app/oracle/product/11.2.0/dbhome_1/dump’; --创建逻辑目录
select * from dba_directories;–查看逻辑目录名称及目录位置
导入时需将dmp文件放在directory目录下
导出全量表结构,不导数据
expdp system/[email protected]:1521/lcfa schemas=system directory=dir_dp dumpfile=expdpcas317.dmp logfile=expdp.log content=metadata_only
impdp system/[email protected]:1521/lcfa schemas=system directory=dir_dp dumpfile=expdpcas317.dmp logfile=impdp.log content=metadata_only
exp导入导出指定表:
将aaa用户下的某张表导出,并在ccc用户下导入
exp aaa/[email protected] tables=name_userinfo FILE=name_userinfo.dmp log=20220423.log;
imp ccc/[email protected] tables=name_userinfo FILE=/data/wgdata/name_userinfo.dmp log=0423.log;
按用户导出所有表并排除数据量较大的表:
导出test用户下所有表并排除几张不需要的表
EXCLUDE接IN 精确匹配—接LIKE 模糊匹配
EXCLUDE参数可同时接IN或LIKE
expdp “/ as sysdba” schemas=test directory=DUMP_ABSADMIN dumpfile=testquanbiao.dmp logfile=expdp.log cluster=no PARALLEL=4 EXCLUDE=TABLE:“IN ‘B_DET09_28’”,EXCLUDE=TABLE:“LIKE’B_DET02_%'”,EXCLUDE=TABLE:“LIKE ‘B_SONLINE0%’”,EXCLUDE=TABLE:“LIKE ‘B_AUTHFAIL%’”,EXCLUDE=TABLE:“LIKE ‘B_FILTER%’”,EXCLUDE=TABLE:“IN ‘B_DET12_31’”
impdp “/ as sysdba” content=all table_exists_action=replace directory=DATA_PUMP_DIR dumpfile=testquanbiao.dmp logfile=impdp_test.log parallel=24 cluster=n schemas=test
导出指定表结构
INCLUDE参数不可同时接IN或LIKE,需分开操作
expdp “/ as sysdba” SCHEMAS=test INCLUDE=TABLE:“IN (‘B_DET09_28’,‘B_DET12_31’)” CONTENT=METADATA_ONLY DIRECTORY=DATA_PUMP_DIR DUMPFILE=danbiao.dmp LOGFILE=expdp_hntest.log
impdp “/ as sysdba” SCHEMAS=test INCLUDE=TABLE:“IN (‘B_DET09_28’,‘B_DET12_31’)” CONTENT=METADATA_ONLY DIRECTORY=DIR_DP DUMPFILE=danbiao.dmp
导出指定表结构(模糊查找)
B_DET02_开头的所有表都导出
expdp “/ as sysdba” SCHEMAS=test INCLUDE=TABLE:“LIKE (‘B_DET02_%’)” CONTENT=METADATA_ONLY DIRECTORY=DATA_PUMP_DIR DUMPFILE=danbiao1.dmp LOGFILE=expdp_hntest1.log
impdp “/ as sysdba” SCHEMAS=test INCLUDE=TABLE:“LIKE (‘B_DET02_%’)” CONTENT=METADATA_ONLY DIRECTORY=DIR_DP DUMPFILE=danbiao1.dmp
数据泵具体接的参数可自行百度!!
边栏推荐
- Use soapUI to access the corresponding ESB project
- Video label forbids downloading. The test is valid. Hide button. The test is valid at three points
- Ubuntu installs PostgreSQL and uses omnidb to view
- [Flink] a brief analysis of the writing process of Flink sort shuffle
- WPF 值转换
- How does virtual box virtual machine software accelerate the network speed in the virtual system?
- Zhubo Huangyu: all the precious metals you want to know are here
- Analysis of the principle of obxwidget
- OSS CDN alicloud configuration method
- 線程同步之讀寫鎖
猜你喜欢

Oracle technology sharing Oracle 19.14 upgrade 19.15

How much do you make by writing a technical book? To tell you the truth, 2million is easy!

Quanergy welcomes Lori sundberg as chief human resources officer

How does virtual box virtual machine software accelerate the network speed in the virtual system?

钉钉开放平台-小程序开发实战(钉钉小程序客户端)
![[MySQL] MySQL export database](/img/e3/1aa31760dc5447b7c3c0d942644116.jpg)
[MySQL] MySQL export database

1. foundation closing

【掘金运营套路揭露】真心被掘金的套路....
![[Flink] Flink source code analysis - creation of jobgraph in batch mode](/img/8e/1190eec23169a4d2a06e1b03154d4f.jpg)
[Flink] Flink source code analysis - creation of jobgraph in batch mode

SQL related knowledge - DDL
随机推荐
Spark - 一文搞懂 parquet
Zhubo Huangyu: all the precious metals you want to know are here
Oracle technology sharing Oracle 19.14 upgrade 19.15
捕获数据包(Wireshark)
But the Internet began to have a new evolution and began to appear in a new state
[Nuggets' operation routine disclosure] the routine of being truly Nuggets
使用Jsoup提取接口中的图片
1. foundation closing
钉钉开放平台-小程序开发实战(钉钉小程序客户端)
Ten important basic principles of software debugging and testing
Nailing open platform - applet development practice (nailing applet server side)
解析JSON接口并批量插入到数据库中
What preparations should be made to develop an app from scratch
[Qunhui] no port access (reverse proxy + intranet penetration)
High performance computing center roce overview
Database related knowledge
VHDL design
[Qunhui] command line acme SH automatically apply for domain name certificate
MySQL est livré avec l'outil de test de performance MySQL lap pour effectuer des tests de résistance
【QT】对话框dialog