In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Problem description: expdp exports the dmp file, but the dmp file is incorrectly named during the export operation. Mv renames the exported dmp file. What effect does this have on impdp operations?
Conclusion: as long as the command is typed correctly and the file name is written correctly, the impdp operation will not be affected.
First, the simulation begins
Table under scott user
Click (here) to collapse or open
SQL > conn scott/tiger
Connected.
SQL >
SQL > select count (*) from tab
COUNT (*)
-
four
SQL > select * from tab
TNAME TABTYPE CLUSTERID
BONUS TABLE
DEPT TABLE
EMP TABLE
Table under SALGRADE TABLE New user liuyaya
Click (here) to collapse or open
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 data pump exports the table under the scott user
Click (here) to collapse or open
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
Click (here) to collapse or open
[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 modify the dumpfile file name
Click (here) to collapse or open
[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
Import to new user liuyaya
Click (here) to collapse or open
[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
II. Summary
Successfully import the renamed dmp file into other schema to prove
The database export file can be renamed and has no effect on the import operation
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.