oracle 11g数据库监听程序参数文件路径错误
oracle 11g数据库监听程序参数文件路径错误
如图所示:即“D:\oracle\product\11.2.0\dbhome_1\network\admin\listener.ora”并非数据库默认安装使用的监听文件
出现这种情况,是由于安装了PLSQL软件,在环境变量自定义了TNS_ADMIN,导致原来监听文件丢失。

处理方法:
- 删除
环境变量
中“TNS_ADMIN”。

-
修改注册表,路径:HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\Session Manager\Environment
-
将TNS_ADMIN项修改为oracle 11g默认安装路径监听文件所在位置
-
"TNS_ADMIN"="D:\oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN"

-
修改注册表,路径:[HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb11g_home1
-
检查ORACLE_HOME路径配置是否为orace 11g默认安装路径
-
"ORACLE_HOME"="D:\oracle\product\11.2.0\dbhome_1"

-
重启服务器
-
启动监听:C:\Users\Administrator>lsnrctl start
-
测试连接
C:\Users\Administrator>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期一 4月 6 14:54:29 2020
Copyright (c) 1982, 2010, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL>