监听文件的配置
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = orcl)
(ORACLE_HOME = E:\app\Administrator\product\12.1.0\client_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:E:\app\Administrator\product\12.1.0\client_1\bin\oraclr12.dll")
)
(SID_DESC =
(GLOBAL_DBNAME = orcl )
(SID_NAME = orcl )
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.7)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = orcl)) --- 这里可以不用管
)
)
客户端连接的设置
# tnsnames.ora Network Configuration File: C:\app\Administrator\product\12.1.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
PB2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = pb2)
)
)
PB1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = pb1 )
)
)
以上的内容 是我 tnsname.ora 文件的设置内容,环境是 12c 启用了PDB。这样在服务器上就可以连接本地的数据库了。
阅读(2309) | 评论(0) | 转发(0) |