Oracle Import and Export (used more), oracle Import and Export

Source: Internet
Author: User
Tags create directory

Oracle Import and Export (used more), oracle Import and Export
1. create directory (role system/sys) create directoryHello_fileAs'D: \ dupmfile';
-- View all created Directories
-- Select * from dba_directories;
-- Drop directory.

-- Drop directory exp_dir;


2. create a tablespace (you can use its default tablespace) 2.1 create a temporary tablespace create temporary tablespace Hello_temp
Tempfile 'F: \ oracle \ data \ hello_temp.dbf'
Size 1024 m
Autoextend on
Next 32 m
Extent management local;


2.2 create tablespace Hello_data
Logging
Datafile 'F: \ oracle \ data \ hello_data.dbf'
Size 512 m
Autoextend on
Next 32 m

Extent management local;


3. Create a user and modify the tablespace conn system/system @ orcl;
-- Before deleting a user
Drop user Hello_userCascade;
-- Create a user (if there is a tablespace, add it)
Create user Hello_userIdentified PassDefault; -- tablespace hello_data temporary tablespace hello_temp;
 
4. grant permissions-User Permissions
Grant resource, connect, dba Hello_user;
-- Directory permission
Grant read, write on directory Hello_fileTo Hello_user;
5. Export expdp original_user/pass @ orcl directory = hello_file dumpfile = data20151114.dmp schemas = original_user
-- Export to the directory d: \ dupmfile created in directory
6. Import -- remap_tablespace to change the tablespace

-- Remap_schema: Imports original_user to hello_user. If the user name is the same, this statement can be omitted.

-- Data20151114.dmp: name of the database file exported

Impdp hello_user/pass @ orcl directory = Hello_fileDumpfile = Data20151114.dmpRemap_tablespace = Original_data: hello_dataRemap_schema = original_user: hello_user

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.