情景1:
name1 = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=locahost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=xxxx))
)
情景2:
name2=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = tcp)(host = localhost)(port = 1521))
)
(CONNECT_DATA =
(server = DEDICATED)
(SID = xxxxxx)
)
)
SID:
实例名,由该用户的环境变量ORACLE_SID(注意这里是大写)决定。在windows平台下,则是注册表中oracle_sid值决定
SERVICE_NAME:
SERVICE_NAME指的是listener中的全局数据库名:这个名字是由
listener.ora中GLOBAL_DBNAME参数决定的