最近在oracle官网上下载了一个oracle18c版本的数据库,当时在win10本地环境安装时,选择的是服务器类,安装完成之后,连接plsql提示ORA-12541:TNS:无监听程序
于是在oracle目录下点击Net Manager 重新修改了一下监听地址,如下:
重启监听服务后连接又提示ORA-12514
检查了一下tnsnames.ora,发现配置的并没有问题,我的本地配置如下:
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
检查了一下listener.ora,如下:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = F:\orcl1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:F:\orcl1\bin\oraclr18.dll")
)
)
ADR_BASE_LISTENER1 = F:\orcl1\log
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
ADR_BASE_LISTENER = F:\orcl1\log
最后修改了一下SID_LIST_LISTENER 这块的代码,修改如下:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = F:\orcl1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:F:\orcl1\bin\oraclr18.dll")
)
(SID_DESC = (GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = F:\orcl1)
(SID_NAME = ORCL)
)
)
然后重启监听服务,连接提示:Oracle 12c ORA-28040 没有匹配的认证协议:
检查了一下sqlnet.ora,如下:
在最下面加了一句:SQLNET.ALLOWED_LOGON_VERSION=8
最后如下:
再次重启监听服务,连接plsql又有如下提示:
不对呀,用户名和密码都是合适的,而且用sqlplus登录也是合适的,怎么一到plsql就报错,于是硬着头皮点开命令提示符窗口,输入命令sqlplus /nolog,进入oracle控制台,然后输入conn /as sysdba 如下:
最后修改了一下用户密码:alter user system identified by 123456;
最后再次连接plsql总算是成功了。