早教吧 育儿知识 作业答案 考试题库 百科 知识分享

oracle11gLSNRCTL>servicesConnectingto(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=primary-orcl)(PORT=1521)))ServicesSummary...Service"primary"has1instance(s).Instance"orcl",statusUNKNOWN,has1handler(s)forthisservice...Handler(s):"DEDICA

题目详情
oracle 11g
LSNRCTL> services
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=primary-orcl)(PORT=1521)))
Services Summary...
Service "primary" has 1 instance(s).
Instance "orcl",status UNKNOWN,has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
The command completed successfully
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=primary-orcl)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux:Version 11.2.0.1.0 - Production
Start Date 22-AUG-2014 23:55:05
Uptime 0 days 0 hr.1 min.20 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/oracle/diag/tnslsnr/primary-orcl/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=primary-orcl)(PORT=1521)))
Services Summary...
Service "primary" has 1 instance(s).
Instance "orcl",status UNKNOWN,has 1 handler(s) for this service...
The command completed successfully
别的机器连,提示ORA-12543:TNS:destination host unreachable
本机用sqlplus scott/tiger@192.168.142.131/orcl  连,提示 ORA-12514:TNS:listener does not currently know of service requested in connect
但是用sqlplus scott/tiger正常的
▼优质解答
答案和解析
你在客户端配置tnsname了么,另外检查下端口是否打开.
从status来看是刚刚启动的,可能需要注册一下.一般情况下在2分钟内注册完成.另外host没写错吧,本机的hosts文件中有没有这个ip的解析.
如果用ip直接连接,好像要写端口吧.
我记得好像有一个文件可以限制远程登录的,叫什么sqlnet.ora还是叫什么,有些数据库监听中没有这个文件,你找找,看是不是这里有设定.