oracle建多个dblink
2009-12-28 22:56
295 查看
用tg4mssql链接oracle.
过程不在描述,google很多。
问题:
1、mssql express的时候,失败
将server用转义字符写出,成功。
HS_FDS_CONNECT_INFO="SERVER=SHAM0415//SQLEXPRESS;DATABASE=GMT_KJ"
2、建多个的时候,不能解析。 tnsping 命令总不通过。
找了很多,同一个帖子,转了无数次。。
唉。。中国的技术啊。。
自己研究,最后发现
MSSQL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SID = MSSQL))
(HS= OK)
)
MSSQL要顶格写,前面不允许有空格。
查了一下,除连接串名字(如:MSSQL)外,其他行(每一行)首应该有空格(space)。
(HS= OK) 不可缺。
3、当tg4msql挂起的时候,请先确认是不是 表名或者view名写错了。
我过几天再使用时,表名写错了,弄了好几个小时都没发现。太失败了。
转一个例子:
oracle.net.config.ServiceAliasException:10
答:
这是由于tnsnames.ora文件格式不对,
应注意除连接串名字(如:BCV)外,其他行(每一行)首应该有空格(space)。
附件:
把tnsnames.ora文件中的
BCV=
(space)[ (DESCRIPTION_LIST = # Optional depending on whether u have
(space)# one or more descriptions
(space)# If there is just one description, unnecessary ]
(space)(DESCRIPTION=
(space)[ (SDU=2048) ] # Optional, defaults to 2048
(space)# Can take values between 512 and 32K
(space)[ (ADDRESS_LIST= # Optional depending on whether u have
(space)# one or more addresses
(space)# If there is just one address, unnecessary ]
(space)(ADDRESS=
(space)[ (COMMUNITY=) ]
(space)(PROTOCOL=tcp)
(space)(HOST=)
(space)(PORT=)
(space))
(space)[ (ADDRESS=
(space)(PROTOCOL=ipc)
(space)(KEY=)
(space))
(space)]
(space)[ (ADDRESS=
(space)[ (COMMUNITY=) ]
(space)(PROTOCOL=decnet)
(space)(NODE=)
(space)(OBJECT=)
(space))
(space)]
(space)... # More addresses
(space)[ ) ] # Optional depending on whether ADDRESS_LIST is used or not
(space)[ (CONNECT_DATA=
(space)(SID=)
(space)[ (GLOBAL_NAME=) ]
(space))
(space)]
(space)[ (SOURCE_ROUTE=yes) ]
(space))
(space)(DESCRIPTION=
(space)[ (SDU=2048) ] # Optional, defaults to 2048
(space)# Can take values between 512 and 32K
(space)[ (ADDRESS_LIST= ] # Optional depending on whether u have more
(space)# than one address or not
(space)# If there is just one address, unnecessary
(space)(ADDRESS
(space)[ (COMMUNITY=) ]
(space)(PROTOCOL=tcp)
(space)(HOST=)
(space)(PORT=)
(space))
(space)[ (ADDRESS=
(space)(PROTOCOL=ipc)
(space)(KEY=)
(space))
(space)]
(space)... # More addresses
(space)[ ) ] # Optional depending on whether ADDRESS_LIST
(space)# is being used
(space)[ (CONNECT_DATA=
(space)(SID=)
(space)[ (GLOBAL_NAME=) ]
(space))
(space)]
(space)[ (SOURCE_ROUTE=yes) ]
(space))
(space)[ (CONNECT_DATA=
(space)(SID=)
(space)[ (GLOBAL_NAME=) ]
(space))
(space)]
(space)... # More descriptions
(space)[ ) ] # Optional depending on whether DESCRIPTION_LIST is used or not
过程不在描述,google很多。
问题:
1、mssql express的时候,失败
将server用转义字符写出,成功。
HS_FDS_CONNECT_INFO="SERVER=SHAM0415//SQLEXPRESS;DATABASE=GMT_KJ"
2、建多个的时候,不能解析。 tnsping 命令总不通过。
找了很多,同一个帖子,转了无数次。。
唉。。中国的技术啊。。
自己研究,最后发现
MSSQL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SID = MSSQL))
(HS= OK)
)
MSSQL要顶格写,前面不允许有空格。
查了一下,除连接串名字(如:MSSQL)外,其他行(每一行)首应该有空格(space)。
(HS= OK) 不可缺。
3、当tg4msql挂起的时候,请先确认是不是 表名或者view名写错了。
我过几天再使用时,表名写错了,弄了好几个小时都没发现。太失败了。
转一个例子:
oracle.net.config.ServiceAliasException:10
答:
这是由于tnsnames.ora文件格式不对,
应注意除连接串名字(如:BCV)外,其他行(每一行)首应该有空格(space)。
附件:
把tnsnames.ora文件中的
BCV=
(space)[ (DESCRIPTION_LIST = # Optional depending on whether u have
(space)# one or more descriptions
(space)# If there is just one description, unnecessary ]
(space)(DESCRIPTION=
(space)[ (SDU=2048) ] # Optional, defaults to 2048
(space)# Can take values between 512 and 32K
(space)[ (ADDRESS_LIST= # Optional depending on whether u have
(space)# one or more addresses
(space)# If there is just one address, unnecessary ]
(space)(ADDRESS=
(space)[ (COMMUNITY=) ]
(space)(PROTOCOL=tcp)
(space)(HOST=)
(space)(PORT=)
(space))
(space)[ (ADDRESS=
(space)(PROTOCOL=ipc)
(space)(KEY=)
(space))
(space)]
(space)[ (ADDRESS=
(space)[ (COMMUNITY=) ]
(space)(PROTOCOL=decnet)
(space)(NODE=)
(space)(OBJECT=)
(space))
(space)]
(space)... # More addresses
(space)[ ) ] # Optional depending on whether ADDRESS_LIST is used or not
(space)[ (CONNECT_DATA=
(space)(SID=)
(space)[ (GLOBAL_NAME=) ]
(space))
(space)]
(space)[ (SOURCE_ROUTE=yes) ]
(space))
(space)(DESCRIPTION=
(space)[ (SDU=2048) ] # Optional, defaults to 2048
(space)# Can take values between 512 and 32K
(space)[ (ADDRESS_LIST= ] # Optional depending on whether u have more
(space)# than one address or not
(space)# If there is just one address, unnecessary
(space)(ADDRESS
(space)[ (COMMUNITY=) ]
(space)(PROTOCOL=tcp)
(space)(HOST=)
(space)(PORT=)
(space))
(space)[ (ADDRESS=
(space)(PROTOCOL=ipc)
(space)(KEY=)
(space))
(space)]
(space)... # More addresses
(space)[ ) ] # Optional depending on whether ADDRESS_LIST
(space)# is being used
(space)[ (CONNECT_DATA=
(space)(SID=)
(space)[ (GLOBAL_NAME=) ]
(space))
(space)]
(space)[ (SOURCE_ROUTE=yes) ]
(space))
(space)[ (CONNECT_DATA=
(space)(SID=)
(space)[ (GLOBAL_NAME=) ]
(space))
(space)]
(space)... # More descriptions
(space)[ ) ] # Optional depending on whether DESCRIPTION_LIST is used or not
相关文章推荐
- oracle 数据库同步脚本,创建dblink
- oracle中的dblink的基本操作
- 用dblink链接oracle
- Oracle:DBLINK用法
- Oracle进阶学习之创建dblink
- oracle clob blob dblink
- DBLink To Oracle
- Oracle通过DBLink操作数据表,报错“ORA-22992:无法使用从远程表选择的lob定位器”
- Oracle 创建 DBLink 的方法
- oracle-dblink跨数据库操作
- MySQL FEDERATED引擎使用示例, 类似Oracle DBLINK.
- Oracle创建dblink报错:ORA-01017、ORA-02063解决
- Oracle跨服务器访问使用dblink
- Oracle创建dblink和同义词小记
- oracle中dblink的创建方法
- Oracle DBLink连接数过多的问题(Ora-02020)
- oracle创建DBLINK
- Oracle 创建 DBLink 的方法
- oracle基础之dblink、同义词、视图
- oracle 创建dblink访问远程数据库