日期:2014-05-16 浏览次数:20514 次
$oracle_home\product\10.2.0\client_1\NETWORK\ADMIN //在这个目录下 /* 在此目录下有一个“tnsnames.ora”的文件, 用记事本打开这个文件,开始进行配置 */ //文件大概如下内容 AAA_HOST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = host_name)(PORT = 1521)) ) (CONNECT_DATA = (SID = BBB) (SERVER = DEDICATED) ) ) BBB = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = host_name)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = BBB) ) ) AAA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = host_name)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = AAA) ) ) /* 注意:网上的P民讲到,主机字符串就是那个SID的值,哥试了那么多次, 压根就不是!其实最主要的是在下面的配置。我这里配置了两个,一个 AAA,一个是BBB,这是在服务器上对应的两个模式数据库名,一定是要 对应的!另外:host_name是目标服务器的机器名,这样就可以了! 当我连接时,直接在“主机字符串”一栏输入"AAA"或"BBB"即可! */