In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1.Data Pump characteristics
(1) support parallel processing of import and export tasks
(2) support pausing and restarting import and export tasks
(3) support importing or exporting objects in remote database through database link.
(4) support automatic modification of object owner, data file or tablespace during import through REMAP_SCHEMA, REMAP_DATAFILE, REMAP_TABLESPACE parameters.
(5) very fine-grained object control is provided during export and import. Imp/exp controls at most whether to import limited object types such as indexes, constraints, authorization information, etc. In data pump, it can not only be accurate to the object type, but also specify in detail whether an object is included or not through the two parameters of include or exclude.
2.Data Pump rule
When you specify a file through the DUMPFILE parameter, you specify not the local detailed path, but the file name, and the IMPDP and EXPDP commands have another parameter called DIRECTORY to specify the path where the dump file is located. Note that the DIRECTORY parameter does not directly specify the local disk path, but rather the directory object in the Oracle database.
The Directory object is a point to a path in the operating system. Each directory object has two permissions of read/write, which can be granted to specified users and roles through the grant command. Users with read/write permissions on the directory object can read and write files under the operating system path specified by the directory object.
Using the 3.DIRECTORY object
Step 1: query the existing directory
SQL > select * from dba_directories
OWNER DIRECTORY_NAME DIRECTORY_PATH
SYS DATA_PUMP_DIR / u01/app/oracle/admin/orcl/dpdump/
Step two, create a new directory
SQL > create directory dump_file_dir as'/ backup/dump/'
The third step is to authorize the new directory
SQL > grant read,write on directory dump_file_dir to scott
OK, now the newly created directory is ready to use
4. Calling mode
Like exp, expdp calls support both command line and parameter file calls
(1) call the command line
Direct execution of orders
For example: $expdp scott/tiger tables=emp directory=dump_dir dumpfile=scott_emp.dmp log=scott_emp.log
(2) call by parameter file
First, edit a file
$vi scott_emp.dat
Directory=dump_dir
Tables=emp
Buffer=20480
Log=scott_emp.log
The second step, and then invoke this file when the command is executed
$expdp scott/tiger parfile=scott_emp.dat
5. Give examples to illustrate
(1) full library export
$expdp sys/oracle directory=dump_file_dir logfile=database_full.dmp logfile=database_full.log full=y
(2) Export in parallel mode
Parallel export takes the parallel parameter. Note that when using this parameter, when the amount of data is very large, it can play a positive role, when the amount of data is very small, the parallel parameter will be counterproductive.
$expdp sys/oracle directory=dump_file_dir logfile=database_full.dmp logfile=database_full.log parallel=3
(3) Export all tables of scott users
$expdp scott/tiger directory=dump_file_dir logfile=scott_tables.dmp logfile=scott_tables.log
6. Important parameters
DIRECTORY: specify parameter
DUMPFILE: specify the output file name
LOGFILE: specify output log
FILESIZE: specify the size of the exported file
PARALLEL: parallel import
Data filtering
QUERY: filtering data
SAMPLE: percentage filtering [SAMPLE=A:30]
EXCLUDE: excluding object
INCLUDE: including object
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.