DB2建立NicknameSql操做



D:\Program Files\IBM\SQLLIB\BIN>db2 connect to AAAAAAA user administrator using gtja.8888

   數據庫鏈接信息

 數據庫服務器         = DB2/NT64 9.1.C
 SQL 受權標識         = ADMINIST...
 本地數據庫別名       = AUTOTEST


D:\Program Files\IBM\SQLLIB\BIN>db2 update dbm cfg using federated yes
DB20000I  UPDATE DATABASE MANAGER CONFIGURATION 命令成功完成。

D:\Program Files\IBM\SQLLIB\BIN>db2stop force
2018-09-18 16:19:56     0   0   SQL1064N  DB2STOP 處理成功。
SQL1064N  DB2STOP 處理成功。

D:\Program Files\IBM\SQLLIB\BIN>db2start
2018-09-18 16:20:12     0   0   SQL1063N  DB2START 處理成功。
SQL1063N  DB2START 處理成功。

D:\Program Files\IBM\SQLLIB\BIN>db2 list node directory

 節點目錄

 目錄中的條目數 = 10

節點 1 條目:

 節點名                            = xxxxxxx
 註釋                            =
 目錄條目類型                    = LOCAL
 協議                            = TCPIP
 主機名                          = 127.0.0.1
 服務名稱             = 50000

節點 2 條目:

 節點名                            = CSGLNEW
 註釋                            =
 目錄條目類型                    = LOCAL
 協議                            = TCPIP
 主機名                          = 127.0.0.2
 服務名稱             = 50000

節點 3 條目:

 節點名                            = XXXXX
 註釋                            =
 目錄條目類型                    = LOCAL
 協議                            = TCPIP
 主機名                          = 127.0.0.1
 服務名稱             = 50000

節點 4 條目:

 節點名                            = ITPMGTJA
 註釋                            =
 目錄條目類型                    = LOCAL
 協議                            = TCPIP
 主機名                          = 127.0.0.1
 服務名稱             = 50000

節點 5 條目:

 節點名                            = MYCSGL
 註釋                            =
 目錄條目類型                    = LOCAL
 協議                            = TCPIP
 主機名                          = 127.0.0.3
 服務名稱             = 50000

節點 6 條目:

 節點名                            = NODECSGL
 註釋                            =
 目錄條目類型                    = LOCAL
 協議                            = TCPIP
 主機名                          = 127.0.0.3
 服務名稱             = 50000

節點 7 條目:

 節點名                            = NODEDC
 註釋                            =
 目錄條目類型                    = LOCAL
 協議                            = TCPIP
 主機名                          = 127.0.0.1
 服務名稱             = 50000

節點 8 條目:

 節點名                            = NODEITPM
 註釋                            =
 目錄條目類型                    = LOCAL
 協議                            = TCPIP
 主機名                          = 10.189.96.6
 服務名稱             = 50000

節點 9 條目:

 節點名                            = ZDH
 註釋                            =
 目錄條目類型                    = LOCAL
 協議                            = TCPIP
 主機名                          = 127.0.0.3
 服務名稱             = 50000

節點 10 條目:

 節點名                            = ZDHNODE
 註釋                            =
 目錄條目類型                    = LOCAL
 協議                            = TCPIP
 主機名                          = 127.0.0.3
 服務名稱             = 50000


D:\Program Files\IBM\SQLLIB\BIN>db2 catalog db XXXXXat node
SQL1005N  在本地數據庫目錄或系統數據庫目錄中已經存在數據庫別名 "XXXXX"。

<!--鏈接須要操做的數據庫-->
D:\Program Files\IBM\SQLLIB\BIN>db2 connect to AAAAAAAuser Administrator using gtja.8888

   數據庫鏈接信息

 數據庫服務器         = DB2/NT64 9.1.C
 SQL 受權標識         = ADMINIST...
 本地數據庫別名       = AAAAAAA


D:\Program Files\IBM\SQLLIB\BIN>db2 create wrapper drda
DB21034E  該命令被看成 SQL
語句來處理,由於它不是有效的「命令行處理器」命令。在 SQL 處理期間,它返回:
SQL0601N  要建立的對象名與類型爲"WRAPPER" 的現有名稱 "DRDA" 相同。
SQLSTATE=42710


<!--建立遠程的數據庫服務-->
D:\Program Files\IBM\SQLLIB\BIN>db2 create server XXXXX TYPE db2/aix version 8.2 wrapper drda authorization \"XXXXX\" password \"gtjaitpm\" options(dbname 'XXXXXX')
DB20000I  SQL 命令成功完成。
---(db2 create server AAAAAAA TYPE db2/aix version 8.2 wrapper drda authorization \"AAAAAAA\" password \"gtja.8888\" options(dbname 'AAAAAAA'))
---(db2 create server ZDH TYPE db2/aix version 8.2 wrapper drda authorization \"ZDH\" password \"gtja.8888\" options(dbname 'ZDH'))

<!--建立遠程-->
D:\Program Files\IBM\SQLLIB\BIN>db2 create user mapping for Administrator server XXXXXOPTIONS(remote_authid 'XXXXX',remote_password 'gtjaitpm')
DB20000I  SQL 命令成功完成。
---(db2 create user mapping for Administrator server AAAAAAA OPTIONS(remote_authid 'AAAAAAA',remote_password 'gtja.8888'))

<!--拉視圖-->
D:\Program Files\IBM\SQLLIB\BIN>db2 create nickname timesvc.TEST_V for XXXXX.XXXXX.TEAM_USER_V
DB20000I  SQL 命令成功完成。
----(db2 create nickname timesvc.TEST_V for XXXXX.XXXXX.TEAM_USER_V)

D:\Program Files\IBM\SQLLIB\BIN>db2 create nickname timesvc. for XXXXX.XXXXX.TEAM_USER_Vnode

相關文章
相關標籤/搜索