如何在oracle数据库建连接到teradata数据库.
我自己已经解决了!谢谢!关键在于tnsnames.ora,listener.ora文件的配置,用户透明网关的监听端口不要和ORACLE的一致,用1522就可以了。tnsn...
我自己已经解决了!谢谢!关键在于tnsnames.ora,listener.ora文件的配置,用户透明网关的监听端口不要和ORACLE的一致,用1522就可以了。tnsnames.ora文件在oracle和gateway两边都要加,重启监听后,
CREATE public DATABASE LINK ORA2TD CONNECT TO user_name IDENTIFIED BY password USING 'test';
select * from table_name@ORA2TD;
tnsnames.ora加以下内容:
TEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1522) --hostname为装了透明网关的机子
)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = tg4tera)
)
(HS = OK)
)
listener.ora加以下内容
LISTENER_TERADATA =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1522))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
SID_LIST_LISTENER_TERADATA =
(SID_LIST =
(SID_DESC =
(SID_NAME = tg4tera)
(ORACLE_HOME = D:\oracle\product\10.2.0\tg_1)
(PROGRAM = tg4tera)
)
) 展开
CREATE public DATABASE LINK ORA2TD CONNECT TO user_name IDENTIFIED BY password USING 'test';
select * from table_name@ORA2TD;
tnsnames.ora加以下内容:
TEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1522) --hostname为装了透明网关的机子
)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = tg4tera)
)
(HS = OK)
)
listener.ora加以下内容
LISTENER_TERADATA =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1522))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
SID_LIST_LISTENER_TERADATA =
(SID_LIST =
(SID_DESC =
(SID_NAME = tg4tera)
(ORACLE_HOME = D:\oracle\product\10.2.0\tg_1)
(PROGRAM = tg4tera)
)
) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询