数据泵导出文件更换名称,对导入操作无影响
发表于:2025-02-04 作者:千家信息网编辑
千家信息网最后更新 2025年02月04日,问题描述: expdp 导出 dmp文件 ,但是导出操作时,dmp文件命名有误。 mv将导出后的dmp文件重命名。这样对 impdp 操作会有什么影响呢?结论: 只要命令敲对,文件名写正确,impdp
千家信息网最后更新 2025年02月04日数据泵导出文件更换名称,对导入操作无影响问题描述: expdp 导出 dmp文件 ,但是导出操作时,dmp文件命名有误。 mv将导出后的dmp文件重命名。这样对 impdp 操作会有什么影响呢?
结论: 只要命令敲对,文件名写正确,impdp操作不受影响
一、模拟开始
scott用户下的表
导入到新建用户liuyaya
二、 总结
将改了名字的dmp文件顺利导入到其他schema下,证明
数据库导出文件可以改名字,对导入操作无影响
结论: 只要命令敲对,文件名写正确,impdp操作不受影响
一、模拟开始
scott用户下的表
点击(此处)折叠或打开
- SQL> conn scott/tiger
- Connected.
- SQL>
- SQL> select count(*) from tab;
- COUNT(*)
- ----------
- 4
- SQL> select * from tab;
- TNAME TABTYPE CLUSTERID
- ------------------------------ ------- ----------
- BONUS TABLE
- DEPT TABLE
- EMP TABLE
- SALGRADE TABLE
点击(此处)折叠或打开
- SQL> conn / as sysdba
- Connected.
- SQL>
- SQL>
- SQL> create user liuyaya identified by oracle account unlock;
- User created.
- SQL> SQL>
- SQL>
- SQL>
- SQL> grant connect,resource to liuyaya;
- Grant succeeded.
- SQL>
- SQL> conn liuyaya/oracle
- Connected.
- SQL> select count(1) from tab;
- COUNT(1)
- ----------
- 0
点击(此处)折叠或打开
- SQL> conn sys/oracle as sysdba
- Connected.
- SQL> create or replace directory expdp_dir_scott01 as '/soft';
- Directory created.
- SQL> grant read,write on directory expdp_dir_scott01 to scott;
- Grant succeeded.
- SQL> exit
点击(此处)折叠或打开
- [oracle@redhat6 ~]$ expdp scott/tiger directory=expdp_dir_scott01 schemas=scott datafile=scott01.dmp logfile=scott01.log parallel=2;
- LRM-00101: unknown parameter name 'datafile'
- [oracle@redhat6 ~]$ expdp scott/tiger directory=expdp_dir_scott01 schemas=scott dumpfile=scott01.dmp logfile=scott01.log parallel=2;
- Export: Release 11.2.0.4.0 - Production on Thu Jun 21 19:15:52 2018
- Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
- Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- Starting "SCOTT"."SYS_EXPORT_SCHEMA_01": scott/******** directory=expdp_dir_scott01 schemas=scott dumpfile=scott01.dmp logfile=scott01.log parallel=2
- Estimate in progress using BLOCKS method...
- Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
- Total estimation using BLOCKS method: 192 KB
- . . exported "SCOTT"."DEPT" 5.929 KB 4 rows
- Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
- . . exported "SCOTT"."EMP" 8.562 KB 14 rows
- . . exported "SCOTT"."SALGRADE" 5.859 KB 5 rows
- . . exported "SCOTT"."BONUS" 0 KB 0 rows
- 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
- Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
- Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
- Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
- Master table "SCOTT"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
- ******************************************************************************
- Dump file set for SCOTT.SYS_EXPORT_SCHEMA_01 is:
- /soft/scott01.dmp
- Job "SCOTT"."SYS_EXPORT_SCHEMA_01" successfully completed at Thu Jun 21 19:16:13 2018 elapsed 0 00:00:20
点击(此处)折叠或打开
- [oracle@redhat6 ~]$ cd /soft
- [oracle@redhat6 soft]$ ls
- database scott01.dmp scott01.log zjgd_back
- [oracle@redhat6 soft]$ mv scott01.dmp liuyaya.dmp
- [oracle@redhat6 soft]$ ls
- database liuyaya.dmp scott01.log zjgd_back
导入到新建用户liuyaya
点击(此处)折叠或打开
- [oracle@redhat6 soft]$ impdp \'/ as sysdba\' directory=expdp_dir_scott01 dumpfile=liuyaya.dmp remap_schema=scott:liuyaya logfile=liuyaya.log parallel=2
- Import: Release 11.2.0.4.0 - Production on Thu Jun 21 20:18:01 2018
- Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
- Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- Master table "SYS"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
- Starting "SYS"."SYS_IMPORT_FULL_01": "/******** AS SYSDBA" directory=expdp_dir_scott01 dumpfile=liuyaya.dmp remap_schema=scott:liuyaya logfile=liuyaya.log parallel=2
- Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
- Processing object type SCHEMA_EXPORT/TABLE/TABLE
- Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
- . . imported "LIUYAYA"."DEPT" 5.929 KB 4 rows
- . . imported "LIUYAYA"."EMP" 8.562 KB 14 rows
- . . imported "LIUYAYA"."SALGRADE" 5.859 KB 5 rows
- . . imported "LIUYAYA"."BONUS" 0 KB 0 rows
- Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
- Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
- Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
- Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
- Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
- Job "SYS"."SYS_IMPORT_FULL_01" successfully completed at Thu Jun 21 20:18:05 2018 elapsed 0 00:00:02
- [oracle@redhat6 soft]$ sqlplus liuyaya/oracle
- SQL*Plus: Release 11.2.0.4.0 Production on Thu Jun 21 20:18:18 2018
- Copyright (c) 1982, 2013, Oracle. All rights reserved.
- Connected to:
- Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- SQL> select * from tab;
- TNAME TABTYPE CLUSTERID
- ------------------------------ ------- ----------
- BONUS TABLE
- DEPT TABLE
- EMP TABLE
- SALGRADE TABLE
二、 总结
将改了名字的dmp文件顺利导入到其他schema下,证明
数据库导出文件可以改名字,对导入操作无影响
文件
用户
数据
文件名
影响
无影
名字
命令
数据库
结论
问题
名称
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
保险产品数据库
天津服务器搬迁有哪些云服务器
软件开发工资计入研发费
合作软件开发的优势
专用会计软件开发的方式
自学软件开发需要准备什么
k3数据库开发
数据库和应用之间的sql
数据库简单解决问题
服务器防火墙设置不自动开启
不错的云服务器代理加盟平台
广西友邦永信网络技术有限公司
服务器机柜盲板怎么装
人事管理物理结构阶段结果数据库
惠州教育软件开发电话
钱包金融提现显示服务器错误
宝山区运营软件开发价格走势
php从数据库查询
有毒小说连接服务器失败
手机游戏服务器处理请求信息失败
互联网数据库流量分析
联想SR950服务器能否带显卡
数据库打开文件只显示文件夹
长宁区银联数据库有哪些
卓越网络技术有限公司
内存数据库的意义
游戏服务器坏了能不能修
两所开设网络安全学校
数据库dll可以删除吗
有毒小说连接服务器失败