您好,登录后才能下订单哦!
小编给大家分享一下expdp如何通过db_link远程导出,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!
环境:两台服务器都是linux,数据库版本都是11.2.0.4
node1:192.168.1.128 prod
node2 192.168.1.129 prod2
将节点1的t1用户远程导出到节点2上。
节点1:
[oracle@linux01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Dec 4 14:00:45 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create user t1 identified by t1 default tablespace users;
User created.
SQL> grant connect,resource,dba to t1;
Grant succeeded.
SQL> conn t1/t1
Connected.
SQL> create table t1 (id number,name varchar2(60));
Table created.
SQL> insert into t1 values(1,'软件');
1 row created.
SQL> select * from t1;
ID NAME
---------- -------------------------
1
1 软件
SQL> SELECT INSTANCE_NAME FROM V$INSTANCE;
INSTANCE_NAME
----------------
prod
节点2:
配置tns
[oracle@linux02 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
PROD1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.128)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = prod)
)
)
查看目录
SQL> select * from dba_directories;
OWNER DIRECTORY_NAME DIRECTORY_PATH
------------------------------ ------------------------------ ------------------------------
SYS SD /u01/app/oracle/oradata/prod2/
SYS DD /u01/arch3
创建public network
SQL> create public database link dblink2 connect to system identified by oracle using 'prod1';
Database link created.
执行导出命令
[oracle@linux02 ~]$ expdp system/oracle network_link=dblink2 directory=dd dumpfile=t1.dmp logfile=t1.log schemas=t1
--expdp属于服务端工具,而exp属于客户端工具,expdp生成的文件默认是存放在服务端的,而exp生成的文件是存放在客户端的
如果使用network_link远程导出,必须远端也装有oracle数据库,只有client端没有办法利用数据泵远程导的。
数据库中不能有大文件字段,第二个就是表的分表不能导出。
看完了这篇文章,相信你对“expdp如何通过db_link远程导出”有了一定的了解,如果想了解更多相关知识,欢迎关注亿速云行业资讯频道,感谢各位的阅读!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。