The 47th Chapter mobile data

Source: Internet
Author: User

The 47th Chapter mobile data
Exp/imp Everywhere Example
Oracle Data Pump: overview

is a server-based tool for high-speed mobile data and metadata, the Oracle data pump has the following features
Can be called via Dbms_datapump
The following tools are available
Expdp
Impdp
Web-based interface
The following data access methods are available
Direct path
External table
Can be detached from long-running jobs, and then the threshold is re-hooked
Data pump operation can be restarted

Oracle Data Pump Benefits
Compared with the earlier data mover tools, the data pump has a lot of bit and provides some new features, such as:
Fine-grained object and data selection
Displays the specified database version
and perform
Estimate the time that the export job takes
Network mode in Distributed environment
Remap feature
Data sampling rate and meta-data compression
Compressing data while the data pump is everywhere
Enhanced security with encryption
Ability to export XmlType data as Clob
Support for old import and export files in legacy mode


Compare older data import and export tools Exp/imp
1. EXP

There are three main ways (full, user, table)

1.1 Complete
EXP System/manager buffer=64000 file=c:\full. DMP full=y
If you want to perform a full export, you must have special permissions
1.2 User mode
EXP sonic/sonic buffer=64000 file=c:\sonic. DMP Owner=sonic
This allows all objects that the user sonic to be exported to a file.
1.3 Table Mode
EXP sonic/sonic buffer=64000 file=c:\sonic. DMP owner=sonic tables= (SONIC)
This way the user Sonic table Sonic is exported
2. IMP
Three modes (full, user, table)
1.1 Complete:
IMP System/manager buffer=64000 file=c:\full. DMP full=y
1.2 User mode:
IMP sonic/sonic buffer=64000 file=c:\sonic. DMP Fromuser=sonic Touser=sonic
This allows all objects sonic by the user to be imported into the file. You must specify the Fromuser, touser parameter so that data can be imported.
1.3 Table Mode:
EXP sonic/sonic buffer=64000 file=c:\sonic. DMP owner=sonic tables= (SONIC)
This way the user Sonic table Sonic is imported.


Compare the new data import and Export tool EXPDP/IMPDP
1. Create a Directory object
Create or Replace directory ext as '/u01/oracle/exp/';
Ho Mkdir/u01/oracle/exp
Grant Read,write on directory ext to Scott;

Export of 2.EXPDP data
2.1 All Full-->
EXPDP \ '/as Sysdba\ ' full=y directory=ext dumpfile=full.dmp
Ls/u01/oracle/exp/full.dmp
2.2 User Guide User-->
EXPDP Scott/tiger Directory=ext dumpfile=scott.dmp
Ls/u01/oracle/exp/scott.dmp

EXPDP system/oraclesys1 Schemas=scott Directory=ext Dumpfile=scott
Ls/u01/oracle/exp/scott.emp
2.3 Table--
EXPDP scott/tiger tables=emp.dept,dept salgrade directory=ext dunfile=emptables.dmp
2.4 Row Rows-->
EXPDP scott/tiger tables=emp query=\ ' where deptno=10\ ' Directory=ext dumpfile=emp10.dmp

DDL DML DDL&DML
Content=all DDL DML
Content-data_only DML
Context=metadata_only DDL

Import of 3.IMPDP data
3.1 Full
IMPDP \ '/as Sysdba\ ' Directory=ext dumpfile=dull.dmp full=y table_exists_action=append

Table_exists_action=skip (skip Error)
Table_exists_action=append (the table exists only imports rows, if the line violates the constraints of the error, but will continue to go down)
Table_exists_action=replace (replace, but do not release tablespace)
Table_exists_action=trunction (free table space)

The previous version can only be ignore=y

3.2user
Self-Import to yourself
IMPDP Scott/tiger directory=ext dumpfile=scott.dmp table_exists_action=trunction
Give the Scott user's information to S1.
Scott-->s1
IMPDP system/oraclesys1 directory=ext dumfile=scott.dmp remap_schema=scott:s1
You can also import directly without prior export
IMPDP system/oraclesys1 network_link=wyzc10g Schemas=scott remao_schema=scott:s1
This is Oracle's newer feature
3.3 Tables Table
IMPDP scott/tiger directory=ext dumpfile=scott.dmp tables=emp table_exists_action=append

Import data directly from 10g to 11g
10g
Grant Exp_full_database to Scott;
11g inside
Vi/u01/oracle/11g/network/admin/tnsnames.ora
Change the port of wyzc10g to 1522
and test it.
Tnsping wozc10g
Then you create the database link
db11g
Sqlplus/as SYSDBA
Create pulic Database link d10g Connect to Scott identified by Tiger using ' wyzc10g ';
Exit
Then we can import the data from 10g directly into the 11g.
IMPDP \ '/as Sysdba\ ' network_link=d10g Schemas=scott remap_schema=scott:s2

The 47th Chapter mobile data

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.