1、oracle 安装过程中提示监听没有启动
# su – oracle,以oracle用户登录主机。
# lsnrctl start 启动默认listener
# lsnrctl status 确保listener已经启动
若listerner启动失败也不要紧,只要listerner.ora和tnsnames.ora文件配置正确即可。
2、编辑安装目录下的文件
1)编辑listener.ora
vi /opt/app/oracle/product/11.1.0/db/network/admin/listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =ip地址)(PORT = 1521))
)
)
#LOGGING_LISTENER=OFF
sid_list_listener =
(sid_list =
(sid_desc =
(global_dbname = sid.serv)
(sid_name = sid)
(ORACLE_HOME = /opt/oracle/app/oracle/product/11.1.0/db)
)
)
注意:在”Golbal Database Name”输入数据库的服务名,例如sid.server。在SID窗口输入数据库实例名,如sid。
2)编辑tnsnames.ora
vi /opt/app/oracle/product/11.1.0/db/network/admin/tnsnames.ora
SID =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ip地址)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = sid.serv)
)
)
3)重启listerner
lsnrctl stop;
lsnrctl start;