- 论坛徽章:
- 0
|
tnsping是可以的,但是sqlplus 不可以,到底为什么?
$ sqlplus system/system@eric9i
SQL*Plus: Release 9.2.0.6.0 - Production on Tue Aug 1 14:40:13 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
ERROR:
ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect
descriptor
Enter user-name:
具体的操作过程如下:
==============
root@e420 # cat /etc/passwd
root :0:1:Super-User:/:/sbin/sh
daemon :1:1::/:
bin :2:2::/usr/bin:
sys :3:3::/:
adm :4:4:Admin:/var/adm:
lp :71:8:Line Printer Admin:/usr/spool/lp:
uucp :5:5:uucp Admin:/usr/lib/uucp:
nuucp :9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico
smmsp :25:25:SendMail Message Submission Program:/:
listen :37:4:Network Admin:/usr/net/nls:
nobody:x:60001:60001:Nobody:/:
noaccess:x:60002:60002:No Access User:/:
nobody4:x:65534:65534:SunOS 4.x Nobody:/:
db2ps1:x:200:200::/db2/ibmdb/db2ps1:/bin/sh
patrol:x:1001:201::/opt/patrol:/bin/sh
dasusr1:x:106:101::/db2/ibmdb/dasusr1:/bin/sh
db2fenc1:x:108:102::/db2/ibmdb/db2fenc1:/bin/sh
eric:x:2008:100::/export/home/eric:/bin/sh
db2dev:x:102:108::/db2/ibmdb/db2dev:/bin/sh
db2pb01:x:109:109::/export/home/db2pb01:/bin/sh
nmail:x:1003:202::/ndata/mail:/bin/sh
notes1:x:1004:202::/ndata/notes1:/bin/sh
books:x:1005:1::/export/home/books:/usr/bin/sh
notes:x:1006:202::/export/home/notes:/bin/sh
ora9i:x:1007:100::/export/home/ora9i:/bin/sh
ora8i:x:1008:100::/export/home/ora8i:/bin/sh
orapd8:x:1009:100:SAP Database Administration User:/oracle/PD8:/bin/sh
pd8adm:x:1010:203:SAP System Administrator:/export/home/pd8adm:/bin/sh
ora10g:x:1011:100::/export/home/ora10g:/bin/sh
cnooc:x:1012:1::/home/cnooc:/bin/sh
ora10gr2:x:2009:205::/home/ora10gr2:/bin/sh
ora10:x:2010:100::/export/home/ora10:/bin/sh
ims:x:1000:1000::/ims52:/usr/bin/bash
webservd:x:80:80::/home/webservd:/bin/pfsh
smcorau:x:2011:1001::/var/opt/SUNWsymon/smcorau:/bin/sh
ops:x:2012:1::/export/home/ops:/bin/sh
-:x::::/export/home/ora10:/bin/sh
root@e420 #
root@e420 #
root@e420 #
root@e420 # su - ora9i
Sun Microsystems Inc. SunOS 5.9 Generic May 2002
$
$
$
$ lsnrctl status
LSNRCTL for Solaris: Version 9.2.0.6.0 - Production on 01-AUG-2006 14:39:42
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=e420)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Solaris: Version 9.2.0.6.0 - Production
Start Date 21-JUL-2006 17:45:47
Uptime 10 days 20 hr. 53 min. 54 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /oracle/ora9i/product/9.2.0/network/admin/listener.ora
Listener Log File /oracle/ora9i/product/9.2.0/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=e420.mdcl.com.cn)(PORT=1521)))
Services Summary...
Service "yszhang" has 2 instance(s).
Instance "eric9i", status UNKNOWN, has 1 handler(s) for this service...
Instance "eric9i", status READY, has 1 handler(s) for this service...
The command completed successfully
$
$
$ tnsping eric9i
TNS Ping Utility for Solaris: Version 9.2.0.6.0 - Production on 01-AUG-2006 14:39:48
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/oracle/ora9i/product/9.2.0/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.129.55)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = eric9i)))
OK (70 msec)
$
$
$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.6.0 - Production on Tue Aug 1 14:39:55 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
$ sqlplus system/system@eric9i
SQL*Plus: Release 9.2.0.6.0 - Production on Tue Aug 1 14:40:13 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
ERROR:
ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect
descriptor
Enter user-name: |
|