Oracle 11g 数据库远程访问配置

Oracle 11g 安装完成后,只能在本机访问,希望其远程计算机也能访问,刚开始直接修改listener.ora文件

# listener.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = “EXTPROC_DLLS=ONLY:C:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll”)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)

ADR_BASE_LISTENER = C:\app\Administrator

将localhost直接改为本机Ip地址,重启监听服务

停止监听:lsnrctl stop 

启动监听:lsnrctl start 

查看监听:lsnrctl status 

结果失败。

正确的方式,运行Net Configuration Assistant,修改监听配置,一步一步即可,无需修改任何数据

Oracle 11g 数据库远程访问配置_第1张图片

Oracle 11g 数据库远程访问配置_第2张图片

结果listener.ora文件变为:

listener.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora

Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = “EXTPROC_DLLS=ONLY:C:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll”)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = WIN-VI5UF46V3UG)(PORT = 1521))
)
)

ADR_BASE_LISTENER = C:\app\Administrator

Host处变为主机名,这样远程计算机就可以访问服务器了。

无需修改服务方式为共享还是专用,无需修改IP地址,可能该向导在后面自动做了很多工作

你可能感兴趣的:(Oracle 11g 数据库远程访问配置)