您好,登錄后才能下訂單哦!
小編給大家分享一下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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。