Linux下Oracle數據庫建立Informix的DBlink的步驟(三)

七、測試網絡連通否

[oracle@test admin]$ tnsping hsminf

 

TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 21-MAR-2008 10:59:34

 

Copyright (c) 1997, 2005, Oracle.  All rights reserved.

 

Used parameter files:

/u01/app/oracle/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora

 

 

Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST = 10.182.4.65)(PORT = 1521)) (CONNECT_DATA = (SERV

ICE_NAME = infuse01)) (HS = OK))

OK (0 msec)

[oracle@test admin]$ tnsping hsninf

 

TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 21-MAR-2008 10:59:39

 

Copyright (c) 1997, 2005, Oracle.  All rights reserved.

 

Used parameter files:

/u01/app/oracle/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora

 

 

Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST = 10.182.4.65)(PORT = 1521)) (CONNECT_DATA = (SERV

ICE_NAME = infuse02)) (HS = OK))

OK (0 msec)

隨後進行lsnrctl restart.

八、ORACLE中創建DBLink

create public database link test

connect to FKPCB identified by “abc123”

using ‘hsminf’

注意:帳號密碼即為INFORMIX中所開的ODBC帳號,

服務名稱為tnsnames.ora文件中自行定的services名稱.

測試LINK的可用性:

select * from zx_file@test

九、以上,在linux系統下配置INFORMIX ODBC的驅動,

通過ORACLE數據庫建立相應LINK服務。

為了安全起見,我們可在ORACLE中新開一使用帳號,

INFORMIX中個別TABLEVIEW,然後再把這些VIE

賦權給特定用戶使用.

相關SQL如下:

create or replace view img_file as
select "img01","img02","img03","img04","img05","img06","img07","img08","img09","img10","img11","img12","img13","img14","img15","img16","img17","img18","img19","img20","img21","img22","img23","img24","img25","img26","img27","img28","img30","img31","img32","img33","img34","img35","img36","img37" from img_file@test;

grant select on img_file to sfc;

select * from scott.img_file;

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

转载于:http://blog.itpub.net/7836221/viewspace-214890/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值