当前位置:网站首页>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
数据泵具体接的参数可自行百度!!
边栏推荐
- Matplotlib line chart, text display, win10
- Analysis of updatechild principle of widget update mechanism of fluent
- 【QT】对话框dialog
- R language and machine learning
- Swagger
- [Nuggets' operation routine disclosure] the routine of being truly Nuggets
- 线程同步之互斥量(互斥锁)
- English version of ternary loss
- Ipvs0 network card of IPVS
- SQL related knowledge - DDL
猜你喜欢

六、项目实战---识别猫和狗

2021 year end summary

Read / write lock for thread synchronization

Wechat applet is bound to a dynamic array to implement a custom radio box (after clicking the button, disable the button and enable other buttons)

Ten important basic principles of software debugging and testing

线程同步之读写锁

OSS CDN alicloud configuration method

線程同步之讀寫鎖

College C language final exam · multiple choice questions · summary notes of mistakes and difficulties

Clickhouse stand alone installation
随机推荐
[Flink] Flink batch mode map side data aggregation normalizedkeysorter
What should I do if I don't understand the precious metal indicators
35岁程序员炒Luna 千万资产3天归零,网友:和赌博一样
Microsoft prohibits Russian users from downloading and installing win10/11
Force buckle 515 Find the maximum value in each tree row
How to use EEPROM in 51 Single Chip Microcomputer?
Understand CGI and fastcgi
CTF serialization and deserialization
Analysis of updatechild principle of widget update mechanism of fluent
(15) Blender source code analysis flash window display menu function
Ueeditor automatically appends P tags to rich text.br tags always wrap.br tag solutions
Detailed explanation of widget construction process of fluent
1064 (42000) error occurred when installing MySQL and modifying root password
What preparation should I make before learning SCM?
MySQL enable logbin in Qunhui docker
Chrome page recording and playback function
CTF crypto (I) some simple encoding and encryption
Dix critères de base importants pour les essais de débogage de logiciels
YOLOv5改进:更换骨干网(Backbone)
力扣 515. 在每个树行中找最大值