Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Using DBLink to realize remote data Export by data pump

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Using DBLink to realize remote data Export by data pump

The simple realization of the data in database An is exported by using data pump on database B server.

The premise is that the versions of the two data are the same.

1. The user used to create the export on database B (as administrator)

SQL > create user daochuB identified by daochuB

2.1 Grant connection roles, resource roles to users

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 to store exported data on database B

SQL > create directory dbdata AS'd:\ export'

4. Give users read and write permissions to the directory

SQL > grant read,write on directory dbdata to daochuB

5. Create a 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 username password used here is the username and password in the remote database. The export uses this user, which must have the permission to export.

If it is not required to authorize in database A

Grant export permissions to user daochuA in database A

SQL > grant exp_full_database to daochuA

6. Perform export (export data for user 'daochu' in database A)

CMD > expdp daochuB/daochuB network_link=baklink schemas=daochuA directory=dbdata dumpfile=exp%u.dmp FILESIZE=32G

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report