文件tnsnames.ora 是给orcl客户端使用
代码语言:javascript复制配置本地网络服务:(客户端)
第一种使用暴力方式直接操作:
修改:C:appAdministratorproduct11.2.0dbhome_1NETWORKADMINtnsnames.ora
ORCL = >网络服务名
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 服务器ip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
实例
代码语言:javascript复制ww =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-7719O7O)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
listener.ora
监听连接请求的,相当于秘书
当你请求别人的orcl时候,就会经过这个监听程序
代码语言:javascript复制# listener.ora Network Configuration File: D:ItSoftWareInstalledoracleproduct11.2.0dbhome_1networkadminlistener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:ItSoftWareInstalledoracleproduct11.2.0dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:ItSoftWareInstalledoracleproduct11.2.0dbhome_1binoraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-7719O7O)(PORT = 1521))
)
)
ADR_BASE_LISTENER = D:ItSoftWareInstalledoracle
如果出现如下错误,多半是windows问题,在文件中添加如下代码
代码语言:javascript复制第一种使用暴力方式直接操作:
修改:C:appAdministratorproduct11.2.0dbhome_1NETWORKADMINtnsnames.ora
ORCL = >网络服务名
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 服务器ip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
第二种方式:
使用图形界面:NCA
配置监听器:(服务器端)
常见问题:
配置监听器,计算机名必须是英文的