Oracle Data Pump remote import file to local database

Source: Internet
Author: User
Tags web database

--Log in as DBA
C:\users\administrator>sqlplus/as SYSDBA
--Create User
Sql> create user bfzg0828 identified by bfzg0828 default Tablespace users quota
Unlimited on users;
--Grant the connection role, the resource role to the user
Sql> Grant Connect,resource to bfzg0828;


Authorization is successful.
--Authorization to create a data link
Sql> Grant Create table,create database link to bfzg0828;



Authorization is successful.


--Create Folder


sql> Create or replace directory Oracle_exp as ' D:\oracle ';


The folder was created.


--Create file on physical machine D disk Oracle


......


--Grant users permission to read and write folders


Sql> Grant Read,write on the directory oracle_exp to bfzg0828;

Grant Read,write on directory oracle_exp to BFZG;






Authorization is successful.




--Login with bfzg0828 users


Sql> Conn bfzg0828/bfzg0828
is connected.


--Create a Web database link


Sql> CREATE DATABASE link test113 connect to BTV10_BZ identified by BTV10_BZ using ' 192.168.0.66:1521/bttest ';




The database link was created.




--Query the network link created


Sql> SELECT * from [email protected];


Global_name
-----------------------------------------------


Bttest


Sql>




--use EXPDP to export the remote database to a local folder D:\oracle\bfzg0828.dmp
C:\USERS\ADMINISTRATOR>EXPDP Bfzg0828/[email protected] directory=dir_exp dumpfile=bfzg0828.dmp logfile= Bfzg0828.log network_link=test113


--After successful export, import to local library using IMPDP


--Here is the new user Bfzg user, has the Connect,resouce role permission, Table_exists_action=replace said, assuming the table exists is replaced, IMP has no function
IMPDP Bfzg/bfzg directory=oracle_exp dumpfile=bfzg0828. DMP REMAP_SCHEMA=BTV10_BZ:BFZG exclude=statistics Table_exists_action=replace


Note BTV10_BZ is the export user, BFZG for this import user
BFZG0828. DMP Export User is BTV10_BZ (btv10_bz/[email protected]:1521/bttest)


--Import a single table
IMPDP Bfzg/bfzg directory=oracle_exp dumpfile=bfzg0828. DMP Tables=btv10_bz.bt_corp Remap_schema=btv10_bz:bfzg exclude=statistics table_exists_action=replace

Oracle Data Pump remote import file to local database

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.