Oracle Database Import and Export, oracle Import and Export

Source: Internet
Author: User

Oracle Database Import and Export, oracle Import and Export
I. Preparations
Create a tablespace:
Create temporary tablespace yangwen_temp
Tempfile 'd: \ oracle \ oradata \ orcl \ yangwen_temp.dbf'
Size 50 m
Autoextend on
Next 50 m maxsize 20480 m
Extent management local;

Create tablespace yangwen_data
Logging
Datafile 'd: \ oracle \ oradata \ orcl \ yangwen_data.dbf'
Size 50 m
Autoextend on
Next 50 m maxsize 20480 m
Extent management local;
-- Create a user
Create user admin123 identified by 123456
Default tablespace yangwen_data
Temporary tablespace yangwen_temp;
-- Grant Permissions

Grant connect, resource, dba to admin123;


Ii. Import and export Methods

Solution 1:
1.1 database backup-logical backup:
Expdp wzzjxt/wzzjxt @ wzzj DIRECTORY = data_dump_dir dumpfile = % backup_file %. dmp
1.2 database restoration-logical Restoration:
Impdp aaa/aaa directory = data_dump_dir dumpfile = px. DMP REMAP_SCHEMA = px: aaa
Example:
Create users and grant permissions
Create directory DATA_PUMP_DIR as 'd :\';
Create user v106 identified by v106;
Grant dba, connect, resource to v106;
Grant read, write on directory DATA_PUMP_DIR to v106;


Impdp sanyuechu/sanyuechu DIRECTORY = DATA_PUMP_DIR DUMPFILE = TEST. DMP

Solution 2:
1.1 database backup-logical backup:
Exp userName/passWord @ IP file = d:/database file. dmp

Database restoration-logical Restoration:


Create a user: (Execute SQL in sys)
Create user userName identified by passWord;
Grant dba, connect, resource to userName;
Imp userName/passWord @ ORCL file = E: \ database file. dmp ignore = y full = y log = e: \ app \ log \ imp. log

Related Article

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.