当前位置:网站首页>ORACLE导出表数据-dmp文件
ORACLE导出表数据-dmp文件
2022-07-21 02:24:00 【號先生】
oracle 导出 dmp文件:
参考链接:https://docs.oracle.com/en/database/oracle/oracle-database/19/sutil/oracle-data-pump-export-utility.html#GUID-2BBE8F6C-6D58-4C99-8A49-ED4DA53BECD2
1.切换oracle 用户
su - oracle
2. 登录oracle服务
sqlplus /nolog
3.连接用户
conn / as sysdba
4.连接到SQL后如下命令可创建或查询虚拟路径,为dump文件存放做准备
SQL> select * from dba_directories;
删除逻辑目录
SQL> drop directory dumpdir;
SQL> create directory dumpdir as '/data/data2/bakfiles';
给plsuser用户赋予在指定目录的操作权限, 最好以system等管理员赋予.
SQL> grant read, write on directory dumpdir to plsuser;
-- plsuser 为Oracle用户
-- dumpdir 为导出文件夹路径
最重要一点:退出oracle–sql—shell窗口
5.给导出dmp文件的文件夹赋予oracle用户权限,注意:root用户下 写不进去dmp文件
[[email protected] ~]# chown -R oracle:oinstall /data/data2/ttt/ --备份文件所在目录
6. 切换oracle用户,执行导出命令,
[[email protected] ~]$ expdp plsuser/pls111111 TABLES=policy_info directory=dumpdir dumpfile=beifentest.dmp content=data_only;
-- content=data_only 只导出数据
--content=metadata_only 只导出表结构
按用户导
1)expdp system/manager schemas=scott DIRECTORY=dpdata dumpfile=expdp.dmp ;
2)并行进程parallel
expdp system/manager directory=dpdata dumpfile=scott3.dmp parallel=40 job_name=scott3
3)按表名导
expdp system/manager TABLES=emp,dept directory=dpdata dumpfile=expdp.dmp;
4)按查询条件导
expdp system/manager directory=dpdata dumpfile=expdp.dmp Tables=emp query=‘WHERE deptno=20’;
5)按表空间导
expdp system/manager DIRECTORY=dpdata DUMPFILE=tablespace.dmp TABLESPACES=temp,example;
6)导整个数据库
expdp system/manager DIRECTORY=dpdata DUMPFILE=full.dmp FULL=y;
边栏推荐
- Control in canoe panel: switch/indicator
- 哈夫曼树与哈夫曼编码的考点
- ESB结合UMC云平台开发说明
- pytorch利用nn.unfold重新实现卷积操作
- Natural fit between NFT and luxury culture: NFT meets the human nature of seeking uniqueness and status
- [mathematical modeling] juvenile delinquency | stepwise regression analysis | residual analysis rcoplot
- [translation] principles for designing and deploying extensible applications on kubernetes
- 触发器基础知识(上)
- NFT与奢侈品文化的天然契合:NFT满足了人类寻求独特性和地位的天性
- dp---背包问题
猜你喜欢
随机推荐
Midas Capital向Moonbeam带来Fuse Pools
Involution: Inverting the Inherence of Convolution for Visual Recognition(CVPR2021)
Custom paging label
C语言练习题目+答案:26-30
Face recognition attendance system based on jsp/servlet
DP --- knapsack problem
Okaleido tiger NFT即将登录Binance NFT平台,NFT权益时代即将开启
Kwai wants to grab the shell cake. Is online selling a good business?
数字孪生技术打造智慧矿山可视化解决方案
dp---背包问题
OSPF基础
Player update and corresponding new function addition in easynvs customization project
【04】穿越功耗墙,我们该从哪些方面提升“性能”?
Natural fit between NFT and luxury culture: NFT meets the human nature of seeking uniqueness and status
In the post deep learning era, where is the recommendation system going?
Is it fast to render C4d with cloud?
C language practice topic + answer: 26-30
How to extract the specified column from the database of multiple imputation as a new variable
Ctfhub information disclosure
C language practice topic + answer: 21-25