1、配置tnsnames.ora后,出现“plsql无法解析下面内容,登录时 ORA-12154 无法解析链接标示符。”
原因:格式错误
解决方式:正确格式
2、配置Connect_data后连接不上数据库。
原因:实例名称或者服务名称搞混了。
数据库连接方式:两种
第一种是通过service_name 数据库服务名称连接
第二种是通过SID 数据库实例连接
原因:格式错误
DB_80 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.13.80)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = search)
)
)
DB_54 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.16.54)(PORT = 1521))
)
(CONNECT_DATA =
(SID = orcl)
)
)
解决方式:正确格式
DB_80 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.13.80)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = search)
)
)
DB_54 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.16.54)(PORT = 1521))
)
(CONNECT_DATA =
(SID = orcl)
)
)
2、配置Connect_data后连接不上数据库。
原因:实例名称或者服务名称搞混了。
数据库连接方式:两种
第一种是通过service_name 数据库服务名称连接
第二种是通过SID 数据库实例连接