Introduction to the use of Oracle IMPDP network_link parameters _oracle

Source: Internet
Author: User
Tags create directory create database sqlplus
I. Environmental description
SOURCE database:
IP Address: 192.168.137.100
Sid:catalog
User name: Rman
Password: Rman
Target database:
IP Address: 192.168.137.101
Sid:orcl
User name: Rman
Password: Rman

Create a tnsname to the source database on the target database
Login to target database with ORACLE user, modify $ORACLE _home/network/admin/tnsnames.ora file, add the following
Copy Code code as follows:

Catalog =
(DESCRIPTION =
(Address_list =
(address = (PROTOCOL = TCP) (HOST = 192.168.137.100) (PORT = 1521))
)
(Connect_data =
(SID = catalog)
)
)

After modifying this file, execute the following command to test whether the Tnsname is created correctly
$ tnsping Catalog
If the end of the return result is OK (0 msec), it proves that Tnsname was created successfully and that the next step is done

third, create Dblink
The statement that creates the Dblink is
CREATE DATABASE link <database link name> CONNECT to <remote DATABASE user name> identified by <remote data Base password> USING ' <tnsname connect to remote> '
Log on to the target database server as an Oracle user and perform the following actions
Copy Code code as follows:

$ sqlplus Rman/rman
sql> CREATE DATABASE LINK dmp_link CONNECT to Rman identified by Rman USING ' catalog ';

*************************************
If you appear
Copy Code code as follows:

ERROR at line 1:
Ora-01031:insufficient Privileges

You need to use SYSDBA identity, execute the following statement, grant the user the right to create Dblink, and then execute the statement above to create the Dblink again
Grant CREATE database link to Rman;
*************************************
Then execute the following statement to test whether the Dblink was created successfully and return the results to prove that Dblink was created successfully
Copy Code code as follows:

Sql> select Tname from Tab@dmp_link;
Sql> exit;


iv. Creating directory objects on the target database
Log on to the target database with an Oracle user
1, create a directory, assumed to be/oracle/dmp, and ensure that this directory Oracle users can read and write
2. Log in to the database as SYSDBA, create directory objects, and give this object read and write access
3, and then log on to the database, execute the following statement:
Copy Code code as follows:

$ sqlplus/as SYSDBA
sql> Create or replace directory Dmp_dir as '/oracle/dmp ';
Sql> Grant Read,write on directory Dmp_dir to public;
Sql> exit;

v. Execute the IMPDP command on the target database and import the data
IMPDP RMAN/RMAN/ORCL Network_link=dmp_link Remp_schema=source_schema:target:shcema remap_tablespace=source_ Tablespace:target:tablespace
If you want to import a database directly without generating the DMP file, use the IMPDP band Network_link directly, so that you can impdp directly, bypassing the EXPDP steps.
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.