103.Which two statements are true regarding the Oracle Data Pump export and import operations? (Choo

前端之家收集整理的这篇文章主要介绍了103.Which two statements are true regarding the Oracle Data Pump export and import operations? (Choo前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
103.Which two statements are true regarding the Oracle Data Pump export and import operations? (Choose two.) A.You cannot export data from a remote database. B.You can rename tables during an import operation. C.You can overwrite existing dump files during an export operation. D.You can compress the data during export but not the Metadata because it is not supported. 答案:BC 解析:参考102 A:错误,如果是导入的话,并且是通过dmp文件导入的话,那么dmp文件必须在被导入的数据库上才可以,导出的活无所谓 B:正确 这里可以使用remap_table参数 ---这里是导出的用户的信息 sql> conn test/test Connected. sql> select * from cat; TABLE_NAME TABLE_TYPE ------------------------------ ----------- DEPT TABLE sql> select * from dept; DEPTNO DNAME LOC ---------- -------------- ------------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON sql> --这里开始导入 [oracle@wahaha3 ~]$ impdp system/oracle@wahaha7 directory=data_pump_dir logfile=log.log network_link='dblink3' schemas=test remap_tablespace=test:users remap_table=dept:deptnew; ....................省略......................... . . imported "TEST"."DEPTNEW" 4 rows ....................省略......................... ORA-39083: Object type TABLE_STATISTICS Failed to create with error: ORA-20000: TABLE "TEST"."DEPT" does not exist or insufficient privileges ....................这里报了一个统计信息创建的的错误................ --删掉已经导入的信息增加exclude参数重新导入 sql> drop user test cascade; User dropped. [oracle@wahaha3 ~]$ impdp system/oracle@wahaha7 directory=data_pump_dir logfile=log.log network_link='dblink3' schemas=test remap_tablespace=test:users remap_table=dept:deptnew EXCLUDE='STATISTICS' .............省略.................. . . imported "TEST"."DEPTNEW" 4 rows Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully completed at 10:21:07 --这次成功了,我们可以手动收集一下统计信息 C:正确 --这里是之前导出的dmp文件 [oracle@wahaha3 dpdump]$ ls -l test.dmp -rw-r-----. 1 oracle oinstall 270336 Jul 25 14:24 test.dmp [oracle@wahaha3 dpdump]$ expdp system/oracle directory=data_pump_dir dumpfile=test.dmp SCHEMAS=test; .................省略...................... ORA-39000: bad dump file specification ORA-31641: unable to create dump file "/u01/oracle/admin/wahaha3/dpdump/test.dmp" ORA-27038: created file already exists Additional information: 1 --这里提示说已经存在了,不能创建了,我们可以看到有这么一个参数 REUSE_DUMPFILES Overwrite destination dump file if it exists [N]. --因此该参数控制是否覆盖 [oracle@wahaha3 dpdump]$ expdp system/oracle directory=data_pump_dir dumpfile=test.dmp SCHEMAS=test REUSE_DUMPFILES=Y; .............省略............... Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at 09:31:58 [oracle@wahaha3 dpdump]$ ls -l test.dmp -rw-r-----. 1 oracle oinstall 184320 Jul 26 09:31 test.dmp --这里的时间更新了 D:错误,都可以压缩,通过下面这个参数可以进行设置 COMPRESSION Reduce the size of a dump file. Valid keyword values are: ALL,DATA_ONLY,[MetaDATA_ONLY] and NONE. --从这里可以看到,可以设置的值为all,data_only,Metadata_only,none,这里包括Metadata,因此选择all或者Metadata_only 都可以对Metadata进行压缩的 原文链接:https://www.f2er.com/oracle/213284.html

猜你在找的Oracle相关文章