自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

跨數(shù)據(jù)庫訪問DB2表的方法

數(shù)據(jù)庫
如何想要跨庫訪問DB2數(shù)據(jù)庫中的表,能否實(shí)現(xiàn)呢?答案是肯定的,下面就教您跨數(shù)據(jù)庫訪問DB2表的方法,供您參考學(xué)習(xí)。

訪問DB2表即使在跨數(shù)據(jù)庫的情況下也是可以實(shí)現(xiàn)的,下面就為您詳細(xì)介紹跨數(shù)據(jù)庫訪問DB2表的方法,希望對您能夠有所幫助。

本文說明的是在同一個數(shù)據(jù)庫實(shí)例中,在源數(shù)據(jù)庫dbsrc中訪問目標(biāo)庫dbtarget的表table1的方法
用戶名:usr,密碼:pwd

技術(shù)領(lǐng)域:db2 聯(lián)合數(shù)據(jù)庫

進(jìn)入命令行:

  1. db2  
  2. db2 =>update dbm cfg using Federated YES   
  3. db2 =>db2stop force  
  4. db2 =>db2start  
  5. db2 =>conncet dbsrc user user using pwd  
  6. db2 =>create wrapper drda library ’libdb2drda.a’  
  7. db2 =>create server FP type db2/AIX version 8 wrapper drda authorization "usr" password "pwd" options(dbname ’dbtarget’)"   
  8. db2 =>CREATE USER MAPPING FOR "usr" SERVER "FP" OPTIONS (REMOTE_AUTHID ’usr’ , REMOTE_PASSWORD ’pwd’)   
  9. db2 =>create nickname FP_TABLE1 for FP.USR.table 

這樣就建好了跨庫訪問環(huán)境,可以使用"select * from FP_TABLE1 " 來訪問DB2表了。
 

 

 

【編輯推薦】

DB2表空間大小的限制

Lotus Notes調(diào)用DB2存儲過程

DB2存儲過程批量導(dǎo)入的實(shí)現(xiàn)

DB2臨時表無法創(chuàng)建的解決方法

DB2連接服務(wù)器的配置

責(zé)任編輯:段燃 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-08-31 17:34:46

DB2

2010-09-07 09:31:03

DB2數(shù)據(jù)庫鎖表

2010-09-30 10:59:32

卸載DB2數(shù)據(jù)庫

2010-08-27 14:39:46

db2連接數(shù)據(jù)庫

2011-03-11 16:02:03

DB2數(shù)據(jù)庫安裝

2010-08-04 13:30:49

2010-08-27 10:06:23

DB2安裝雙機(jī)

2010-11-01 13:34:20

DB2數(shù)據(jù)庫安裝

2010-08-03 13:56:11

DB2表復(fù)制

2010-09-01 09:13:29

DB2表空間

2010-08-27 11:28:39

DB2shell數(shù)據(jù)庫

2010-11-03 16:32:10

DB2創(chuàng)建數(shù)據(jù)庫

2010-08-25 10:50:48

DB2數(shù)據(jù)庫

2010-09-01 13:38:41

DB2數(shù)據(jù)復(fù)制

2010-08-26 10:37:40

DB2Q復(fù)制

2010-11-01 13:45:16

DB2數(shù)據(jù)庫的優(yōu)勢

2010-08-27 10:13:09

DB2服務(wù)器安裝

2010-09-30 10:20:55

創(chuàng)建DB2數(shù)據(jù)庫

2010-08-26 16:15:25

DB2數(shù)據(jù)庫管理

2010-11-01 11:30:41

DB2數(shù)據(jù)庫權(quán)限
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號