expdp数据泵导出实验

expdp参数

compression  压缩
parallel     并行
cluster      集群
schemas      用户对象
tables       表
tablespaces  表空间
full=y       整库

1.创建数据库用户

create user test identified by test;

2.授予用户权限

grant connect,resource to test;

3.创建expdp导出目录

create  directory expdpdir as '/home/oracle/expdp';

4.验证导出目录是否存在

select * from dba_directories;

5.为创建的目录赋权限

grant read,write on directory expdpdir to test;

6.直接导出用户方式(以SYSDBA用户直接导出)

expdp  \' / as sysdba\' directory=testdir dumpfile=testpdb_%U.dump schemas=test logfile=expdp.log compression=all;

7.12C以上版本直接导出PDB用户方式

expdp test/test@ttpdb directory=testdir dumpfile=testpdb_%U.dump schemas=test logfile=expdp.log compression=all;

7.结果


Export: Release 12.2.0.1.0 - Production on Sun Dec 19 11:08:05 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Starting "TEST"."SYS_EXPORT_SCHEMA_01":  test/********@ttpdb directory=testdir dumpfile=testpdb_%U.dump schemas=test logfile=expdp.log compression=all 
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Master table "TEST"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for TEST.SYS_EXPORT_SCHEMA_01 is:
  /home/oracle/expdp/testpdb_01.dump
Job "TEST"."SYS_EXPORT_SCHEMA_01" successfully completed at Sun Dec 19 11:08:52 2021 elapsed 0 00:00:45
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

宇灬宇

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值