About Oracle Database backup restore-IMPDP,EXPDP

Source: Internet
Author: User

Initialization

--CREATE TABLE SpaceCREATETablespace table space name datafile'file name. dat'SIZE 100M Autoextend on NEXT10M MAXSIZE UNLIMITED;--Create User (Oauser)--Connect InternalCREATE USEROauser identified byOauser;ALTER USEROauserDEFAULTtablespace tablespace_name;ALTER USEROauserDEFAULTROLE All;GRANTDba toOauser;GRANTCONNECT toOauser;GRANTRESOURCE toOauser;GRANT Create Table  toOauser;GRANT Create Trigger  toOauser;GrantExp_full_database toOauser;GrantImp_full_database toOauser;--Delete user and table spaces--Step One: Delete userDrop UserxxCascade--Note: Delete the user, just delete the schema objects under the user, will not delete the corresponding tablespace. --Step Two: delete tablespaceDROPTablespace table space name including CONTENTS anddatafiles;

Oracle Import and Export (IMPDP,EXPDP):

 // oracle 11g creates an import export directory that requires a connection to the database  Span style= "color: #0000ff;" >create  or  replace  Directory Expdp_dir as   e:\backup     //  grant  read , write to   Oauser1; 
Back up the current database
expdp directory=expdp_dir dumpfile= backup file name. DMP logfile= BACKUP log name. Log
Example:
oauser1/123456 Directory=expdp_dir dumpfile=2015-12-11.dmp Logfile=2015-12-11.log

// Copy the DMP backup file to Expdp_dir // Import the backup data into the IMPDP user name / password [@ Listen ] dumpfile= backup file name Directory=Expdp_dir remap_ Schema= user name when exporting: User logfile at import= log file name;

Example:
IMPDP oauser1/123456 dumpfile=2015-12-11.dmp directory=expdp_dir remap_schema=oauser:o Auser1

PS:EXPDP,IMPDP These two commands are server-side commands, directly in the CMD to run as an administrator;

About Oracle Database backup restore-IMPDP,EXPDP

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.