发布网友 发布时间:2022-04-08 18:49
共2个回答
懂视网 时间:2022-04-08 23:11
tnsnames.ora这两个配置文件,如果有一个就修改一个,有两个就修改两个。 --[root@uumsnormal-oracle admin]# ll
total 24
-rw-r----- 1 oracle oinstall 501 Jan 4 09:43 listener.ora
drwxr-x--- 2 oracle oinstall 4096 Oct 31 2012 samples
-rw-r----- 1 oracle oinstall 172 Dec 26 2003 shrept.lst
-rw-r--r-- 1 oracle oinstall 698 Oct 31 2012 sqlnet.log
-rw-r----- 1 oracle oinstall 187 Oct 31 2012 sqlnet.ora
-rw-r----- 1 oracle oinstall 716 Jan 4 09:39 tnsnames.ora
[root@uumsnormal-oracle admin]# pwd
/opt/oracle/product/10.2.0/db_1/network/admin --这个路径每个服务器同,但都类似这个路径。。
[root@uumsnormal-oracle admin]# cat listener.ora
# listener.ora Network Configuration File: /opt/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.65)(PORT = 1521))
)
)
[root@uumsnormal-oracle admin]# cat listener.ora
# listener.ora Network Configuration File: /opt/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.65)(PORT = 1521))
)
)
我这个服务器两个文件内容是一样的,标红的字体就是你的数据库的IP,也可以使用主机名,但为了防止以后修改主机名导致配置文件的问题,还是使用IP比较好,毕竟IP不会改变。。
plsql登录数据库,报错“ora-12541:TNS:无监听程序”错误
标签:network 配置文件 product oracle 数据库
热心网友 时间:2022-04-08 20:19
是不是你的监听没有打开