oracle导入导出

oracle导入导出

1、查询当前创建的所有dmp导出目录

select * from dba_directories;

2、创建expdp导出目录(可不创建,选择已有目录,创建后使用上一命令检查是否创建成功,如果未成功,导出会报错)

create or replace directory dmp as 'D:/app/dmp';

3、创建之后需要授权

grant read,write on directory dmp to PUser;

4、导出(使用cmd命令编辑器)

expdp Test/JSxry@192.168.123.74/orcl schemas=Test directory=DIRPATH dumpfile=Test20220623.dmp logfile=Test.log;

5、导入

create user tuser_szhtest identified by tuser_szhtest default tablespace tuser;

grant connect, resource to tuser_szhtest;

create tablespace tuser datafile 'D:\user_data.dbf' size 1G autoextend on next 500m maxsize 20G extent management local;

impdp tuser_szhtest/tuser_szhtest@bsoft directory=DMP dumpfile=tuser20220408.dmp schemas=tuser

相关推荐
多弗朗皮卡丘4 小时前
MySQL表的约束
数据库·mysql
Flynn Liang8 小时前
AI Agent Redis 生产踩坑实录:13 类故障的根因、复现与调优
数据库·人工智能·redis·缓存·ai agent·故障分析
SelectDB9 小时前
开源日志平台怎么选?ELK、Loki、ClickHouse、Apache Doris 四大方案对比与选型指南
数据库
SelectDB10 小时前
ELK 磁盘空间不足怎么办?Elasticsearch 存储膨胀原因、排查步骤与 3 种降本方案
数据库
满小满10 小时前
为什么我先 ANALYZE,而不是先加索引
数据库·dba
SelectDB10 小时前
日志分析用什么数据库好?Elasticsearch、ClickHouse、Doris 选型对比与 3 个企业案例
数据库
inferno12 小时前
十三、存储过程(PROCEDURE)
数据库·sql·mysql
数据库急诊室_阿哲12 小时前
一周慢查询日志审计:1200 条里有多少真问题
运维·数据库·dba
zhangjw3413 小时前
2-4 集合运算 union /union all /intersect/except
数据库·postgresql
Decay__14 小时前
PostgreSQL DBA 日常运维手册 —— 会话、锁阻塞、慢查询、膨胀与每日巡检
运维·数据库·sql·postgresql