Using Dblink to realize data pump remote data export

Source: Internet
Author: User
Tags create directory dba

Using Dblink to realize data pump remote data export

A simple implementation of data in database A is derived using a data pump on a database B server.
The premise is that 2 data versions are consistent.

1. Create an export user on database B (as Administrator)
Sql> create user Daochub identified by Daochub;

2.1 Grant connection role, resource role to user
Sql> Grant Connect,resource to Daochub;
2.2 Authorizing the creation of data links
Sql> Grant Create table,create database link to Daochub;
or directly to the DBA role
Sql> Grant DBA to Daochub;

3. Create a directory on database B that holds the exported data
Sql> Create directory Dbdata as ' D:\export ';

4. Grant directory Read and Write permissions to users
Sql> Grant Read,write on the directory dbdata to Daochub;

5. Create Dblink as Daochu
Sql> CREATE DATABASE link Baklink
Connect to Daochua identified by "Daochua"
Using ' (DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = XX.) Xx. Xx. XX) (PORT = 1521))
)
(Connect_data =
(SERVER = dedicated)
(service_name = ORCL)
)
)‘;

Note:
The user name password used here is the user name and password in the remote database, the export is using this user, it must have the export permission,
If no authorization is required in database A;
Grant export permissions to user Daochua in database a
Sql> Grant Exp_full_database to Daochua;

6. Perform export (export data from user ' Daochu ' in database a)
CMD>EXPDP daochub/daochub network_link=baklink Schemas=daochua directory=dbdata dumpfile=exp%u.dmp;

This article is from the "4699096" blog, please be sure to keep this source http://4709096.blog.51cto.com/4699096/1773741

Using Dblink to realize data pump remote data 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.