时间:2021-07-01 10:21:17 帮助过:12人阅读
lsnrctl命令stop 之后 start监听,日志中会打印出listener文件所在的位置
[oracle@ps-server5 ~]$ cd $ORACLE_HOME [oracle@ps-server5 dbhome_1]$ lsnrctl LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 23-DEC-2018 23:39:53 Copyright (c) 1991, 2013, Oracle. All rights reserved. Welcome to LSNRCTL, type "help" for information. LSNRCTL> stop Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ps-server5)(PORT=8083))) The command completed successfully LSNRCTL> start Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.4.0 - Production System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Log messages written to /u01/app/diag/tnslsnr/ps-server5/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=8083))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC8083))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ps-server5)(PORT=8083))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 23-DEC-2018 23:40:15 Uptime 0 days 0 hr. 0 min. 5 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Listener Log File /u01/app/diag/tnslsnr/ps-server5/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=8083))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC8083))) Services Summary... Service "ocp" has 1 instance(s). Instance "ocp", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully LSNRCTL>
找到新的listener的位置,之后做如下操作:
1. 修改listener.ora文件
默认情况下该文件内容:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 你的服务器IP地址)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
))
出现ORA-12514的问题时候,我们需要增加的服务配置:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
GLOBAL_DBNAME = 一般和sid是一样的 )
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = 自己的sid))
)
2. 启动相关数据库和监听服务
进入 sqlplus 控制台:sqlplus /nolog
connect / as sysdba
关闭数据库:shutdown immediate
开启数据库:startup;
退出sqlplus控制台:exit
重启oracle监听,重新用plsql连接数据库,连接成功,大功告成!
linux系统中 修改oracle数据库字符集问题
标签:绕过 long data completed sele start 1.0 exp res