ITPub博客

首页 > 数据库 > Oracle > 11g expdp 及 impdp 中的参数 network_link - 3 如何使用 network_link

11g expdp 及 impdp 中的参数 network_link - 3 如何使用 network_link

原创 Oracle 作者:tolywang 时间:2015-01-30 11:26:43 0 删除 编辑
3.2  如何使用 network_link 
步骤: 
 1). Create a TNS entry for the foreign database in your tnsnames.ora file
 2). Test with tnsping
 3). Create a database link to the foreign database
 4). Specify the database link as network_link in your expdp or impdp syntax

3.2.1  expdp中使用network_link 
a. 在目标库上tnsnames.ora中创建源库TNS . 
UAT3  =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.11.38)(PORT = 1526))
    )
    (CONNECT_DATA =
      (service_name = S3UT)
    )
  )

b. 在目标库上 tnsping : 
[oravis@szdb06 VIS_szdb06]$ tnsping  uat3

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 30-JAN-2015 10:24:29
Copyright (c) 1997, 2013, Oracle.  All rights reserved.
Used parameter files:
/u01/db2/11.2.0/network/admin/VIS_szdb06/sqlnet_ifile.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.98.67.38)(PORT = 1526))) (CONNECT_DATA = (service_name = S3UT)))
OK (50 msec)

c. 在目标库上创建连接源库的DBLINK . 
[oravis@szdb06 ~]$ sqlplus / as sysdba 
SQL> create public database link  touat3      
  2       connect to apps identified by s3utapp103
  3       using  'uat3';  
Database link created.

d. 在目标库上创建directory及赋权。
[oravis@szdb06 ~]$ sqlplus / as sysdba 
SQL> grant create any directory to apps ;
Grant succeeded.
SQL> create directory  dumpdir   as  '/u01/test'; 
Directory created.
SQL> grant read,write on directory  dumpdir  to apps ;
Grant succeeded.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/35489/viewspace-1420530/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Oracle , MySQL, SAP IQ, SAP HANA, PostgreSQL, Tableau 技术讨论,希望在这里一起分享知识,讨论技术,畅谈人生 。

注册时间:2007-12-10

  • 博文量
    5595
  • 访问量
    14695404