Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can't connect to oracle with sqlplus.

498329Dec 26 2009 — edited Dec 26 2009
Hi,

I had a problem in connecting to oracle database with sqlplus. Any help is highly appreicated.

here are my steps:
1. Install an oracle instance (10g)
2. Try to connect to the default name services (orcl)
Result:Failed, looks like sqlplus hangs
3. Then add the database(ORCL) to defautl LISTENER
4. Try to connect to the default name services (orcl) again
Result:Failed, looks like sqlplus hangs

Here are other info thay may relate to this problem:
a. When I set up, I got a error when setup emcp:
配置: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: 实例化 EM 配置文件时出错
at oracle.sysman.emcp.EMAgentConfig.updateAgentConfigFiles(EMAgentConfig.java:2560)
at oracle.sysman.emcp.EMAgentConfig.performConfiguration(EMAgentConfig.java:1166)
at oracle.sysman.emcp.EMAgentConfig.invoke(EMAgentConfig.java:207)
at oracle.sysman.emcp.EMAgentConfig.invoke(EMAgentConfig.java:185)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:146)
at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:430)
at java.lang.Thread.run(Thread.java:534)

b. here is the log and trace file for tns listener:
log files:
26-12月-2009 13:26:41 * service_update * orcl * 0
26-12月-2009 13:26:42 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)(CID=(PROGRAM=D:\oracle\product\10.2.0\db_1\BIN\sqlplusw.exe)(HOST=CHEN-DESKTOP)(USER=Administrator))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.100)(PORT=1605)) * establish * orcl * 0
26-12月-2009 13:27:02 * service_update * orcl * 0

trace files:
[26-12月-2009 13:26:41:640] snttcallback: entry
[26-12月-2009 13:26:41:640] snttcallback: op = 5, bytes = 170, err = 0
[26-12月-2009 13:26:41:640] snttcallback: exit
[26-12月-2009 13:26:41:640] nsevwait: 0 newly-posted event(s)
[26-12月-2009 13:26:41:640] nsevfnt: cxd: 0xbdcb20 stage 0: NT events set:
READ
[26-12月-2009 13:26:41:640] nsevfnt: cxd: 0xbdcb20 stage 0: NS events set:
INCOMING SEND
[26-12月-2009 13:26:41:640] nsevwait: event is 0x2, on 5
[26-12月-2009 13:26:41:640] nsevwait: 1 posted event(s)
[26-12月-2009 13:26:41:640] nsglhe: entry
[26-12月-2009 13:26:41:640] nsglrohe: entry
[26-12月-2009 13:26:41:640] nsdo: cid=5, opcode=68, bl=8196, what=0, uflgs=0x0, cflgs=0x3
[26-12月-2009 13:26:41:640] nsdo: rank=64, nsctxrnk=0
[26-12月-2009 13:26:41:640] nsdo: nsctx: state=8, flg=0x400c, mvd=0
[26-12月-2009 13:26:41:640] nsdo: gtn=170, gtc=170, ptn=10, ptc=8155
[26-12月-2009 13:26:41:640] nsrdr: recving a packet
[26-12月-2009 13:26:41:640] nsprecv: 170 bytes from leftover
[26-12月-2009 13:26:41:640] nsprecv: tlen=170, plen=170, type=6
[26-12月-2009 13:26:41:640] nttmrd: entry
[26-12月-2009 13:26:41:640] nttrd: entry
[26-12月-2009 13:26:41:640] ntt2err: entry
......(forum doesn't allow too many characters).
[26-12月-2009 13:26:42:046] nsnainit: inf->nsinfflg[0]: 0xd inf->nsinfflg[1]: 0xd
[26-12月-2009 13:26:42:046] nsnainit: "or" info flags: 0xd Translations follow:
native service(s) is (are) wanted
NA disabled remotely for this connection
NA services unavailable on both processes - negotiation not needed

[26-12月-2009 13:26:42:046] nsnainit: "or" info flags: 0xd Translations follow:
native service(s) is (are) wanted
NA disabled remotely for this connection
NA services unavailable on both processes - negotiation not needed
"and" info flags: 0xd Translations follow:
native service(s) is (are) wanted
NA disabled remotely for this connection
NA services unavailable on both processes - negotiation not needed

[26-12月-2009 13:26:42:046] nsopen: global context check-in (to slot 6) complete
......
[26-12月-2009 13:31:38:781] nsrdr: NSPTDA flags: 0x0
[26-12月-2009 13:31:38:781] nsdo: what=1, bl=8196
[26-12月-2009 13:31:38:781] nsdo: 248 bytes from NS buffer
[26-12月-2009 13:31:38:781] nsdo: nsctxrnk=0
[26-12月-2009 13:31:38:781] nsglgrDoRegister: inst loads: ld1:22 mld1:100 ld2:1 mld2:170
[26-12月-2009 13:31:38:781] nsglgrDoRegister: exit
[26-12月-2009 13:31:38:781] nsdo: cid=5, opcode=67, bl=116, what=1, uflgs=0x2, cflgs=0x3
[26-12月-2009 13:31:38:781] nsdo: rank=64, nsctxrnk=0
[26-12月-2009 13:31:38:781] nsdo: nsctx: state=8, flg=0x400c, mvd=0
[26-12月-2009 13:31:38:781] nsdo: gtn=258, gtc=258, ptn=10, ptc=8155
[26-12月-2009 13:31:38:781] nsdo: 116 bytes to NS buffer
[26-12月-2009 13:31:38:781] nsdofls: DATA flags: 0x0
[26-12月-2009 13:31:38:781] nsdofls: sending NSPTDA packet
[26-12月-2009 13:31:38:781] nspsend: plen=126, type=6
[26-12月-2009 13:31:38:781] nttmwr: entry
[26-12月-2009 13:31:38:781] nttwr: entry
[26-12月-2009 13:31:38:781] snttcallback: entry
[26-12月-2009 13:31:38:781] snttcallback: exit
[26-12月-2009 13:31:38:781] nttwr: socket 280 had bytes written=126
[26-12月-2009 13:31:38:781] nttwr: exit
[26-12月-2009 13:31:38:781] nspsend: 126 bytes to transport
[26-12月-2009 13:31:38:781] nsdoacts: flushing transport
[26-12月-2009 13:31:38:781] nttctl: entry
[26-12月-2009 13:31:38:781] nsdo: nsctxrnk=0
[26-12月-2009 13:31:38:781] nsglroHandleError: exit
[26-12月-2009 13:31:38:781] nsglrohe: exit
[26-12月-2009 13:31:38:781] nsglhe: exit
[26-12月-2009 13:31:38:781] nsevwait: 4 registered connection(s)
[26-12月-2009 13:31:38:781] nsevwait: 0 pre-posted event(s)
[26-12月-2009 13:31:38:781] nsevwait: waiting for transport event (1 thru 5)...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 23 2010
Added on Dec 26 2009
46 comments
15,600 views