oracle11g Data Import and export

Source: Internet
Author: User
Tags create directory

--Database Export
--oracle 11g is exported using EXPDP because Google
--The first step is to see if the database has created an exported directory

SELECT * from Dba_directories;
--If any, select one, log on to the database server, and verify that the directory has space
--linux&unix can be used
Df-k
--If you have not created a directory, use SYSDBA to execute the following sql:
Create directory Dumpdir as ' path ';

--Step two, export the data
Su-oracle
EXPDP a3/oracle dumpfile=xxxx.dmp directory= schemas=;

--Upload the data file to the test server xx

FTP xxx.xx.xx.xx

Get
/u01/oraclebak/xxxx.dmp
/u01/oraclebak2/xxxx.dmp


--Stop Testing OA service


--the third step, because the IMPDP import when using the original user, then we need to import the database to delete the corresponding user (if there is, no fourth step)
Su-oracle
Sqlplus/nolog
Conn/as SYSDBA
Drop user A3 cascade;
Or
Drop user A2 cascade;


--fourth step, repeat step one in the target database

--Fifth step, import data
Su-oracle
IMPDP test/oracle directory= dumpfile=xxxx.dmp logfile=xxxx.log


--Remark:
--REMAP_SCHEMA=A3:A2 Replace the A3 user A2

IMPDP system/oracle directory=orabak dumpfile=xxxx.dmp schemas= remap_schema= remap_tablespace=
--Step sixth, verify the data

-This is the data that does not stop the application export, so there is a certain inconsistency (ID, inconsistent with sequence), but does not affect the use of
TRUNCATE TABLE Sysmaintenancelog;


oracle11g Data Import and export

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.