当前位置:网站首页>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
数据泵具体接的参数可自行百度!!
边栏推荐
- 【QT】资源文件导入
- 35 year old programmer fired Luna millions of assets and returned to zero in three days. Netizen: it's the same as gambling
- 线程同步之读写锁
- Mysql8.0 configuring my SQL in INI file_ mode=NO_ AUTO_ CREATE_ User can start
- Sorting out the examination sites of the 13th Blue Bridge Cup single chip microcomputer objective questions
- Review of number theory
- Analysis of the principle of obxwidget
- ipvs之ipvs0网卡
- Microsoft prohibits Russian users from downloading and installing win10/11
- [QT] resource file import
猜你喜欢
Computer network high frequency interview questions
ctf [RoarCTF 2019]easy_ calc
Force buckle 515 Find the maximum value in each tree row
MySQL enable logbin in Qunhui docker
Chrome page recording and playback function
Quanergy welcomes Lori sundberg as chief human resources officer
win10 系统打开的软件太小,如何变大(亲测有效)
面了个字节拿25k出来的测试,算是真正见识到了基础的天花板
Parse JSON interface and insert it into the database in batch
College C language final exam · multiple choice questions · summary notes of mistakes and difficulties
随机推荐
Matplotlib multi line chart, dot scatter chart
Swagger
asp. Net web page, ASP connects to the database, and uses asp:panel and asp:dropdownlist controls
Introduction Guide to the flutterplugin plug-in in the actual combat of flutter
2021 year end summary
线程同步之读写锁
钉钉开放平台-小程序开发实战(钉钉小程序客户端)
Threejs专用天空盒素材,五种天空盒素材免费下载
R language and machine learning
Zhubo Huangyu: you can try these non-agricultural operation skills
Knowledge about SQL - DML
Li Kou 79 word search
Using jsup to extract images from interfaces
List of provinces, cities and counties in China
win10 系统打开的软件太小,如何变大(亲测有效)
Analysis report on development trend and market demand of global and Chinese molecular diagnostics industry from 2022 to 2028
Install SVN in Pagoda and build SVN version Library
Nailing open platform - applet development practice (nailing applet client)
Daily tests
What are the advantages and risks of paper gold investment