安装Oralce之后,想连接一下,结果通过客户端PL/SQL,怎么也连不上,提示TNS:监听程序当前无法识别连接解决办法:1.查看本机的/$
安装oralce之后,想连接一下,,结果通过客户端pl/sql,怎么也连不上,提示tns:监听程序当前无法识别连接
解决办法:
1.查看本机的/$/oracle/oracle/network/admin/
vi tnsnames.ora 没改之前后面的端口是1523 ,我把它改成1521了
sales =
(description =
(address = (protocol = tcp)(host = localhost.localdomain)(port = 1521))
(connect_data =
(server = dedicated)
(service_name = sales)
)
)
listener_sales =
(address = (protocol = tcp)(host = localhost.localdomain)(port = 1521))
extproc_connection_data =
(description =
(address_list =
(address = (protocol = ipc)(key = extproc3))
)
(connect_data =
(sid = plsextproc)
(presentation = ro)
)
)
2.再查看listener.ora
默认没有修改的是这样:其中没有上文tnsnames.ora中sales
sid_list_listener =
(sid_list =
(sid_desc =
(sid_name = plsextproc)
(oracle_home = /mapbar/oracle/oracle)
(program = extproc)
)
)
listener =
(description_list =
(description =
(address = (protocol = ipc)(key = extproc3))
(address = (protocol = tcp)(host = localhost.localdomain)(port = 1523))
)
需要增加:红色部分是新增加的
sid_list_listener =
(sid_list =
(sid_desc =
(sid_name = plsextproc)
(oracle_home = /$/oracle/oracle)
(program = extproc)
)
(sid_desc =
(global_dbname = sales)
(oracle_home = /$/oracle/oracle)
(sid_name = sales)
)
)
listener =
(description_list =
(description =
(address = (protocol = ipc)(key = extproc3))
)
(description =
(address = (protocol = tcp)(host = localhost.localdomain)(port = 1521))
)
)
3.执行 lsnrctl stop
lsnrctl start

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号