万急啊!oracle10g中tnsping出现TNS-03505:无法解析名称
我已创建数据库实例test 能进入sqlplus ,scott/tiger@172.20.2.20:1521/test也能连接。但我在dos下
tnsping test 时
出现了以下错误信息:
C:\>tnsping test
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 15-12月-2010 00:27:16
Copyright (c) 1997, 2005, Oracle. All rights reserved.
已使用的参数文件:
f:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
TNS-03505: 无法解析名称
还有啊 我用PL/SQL Developer时也出现了“ora-12154: tns: 无法解析指定的连接标识符”。
另外,我用的是oracle10g10.2.0,在F:\oracle\product\10.2.0\db_1\NETWORK\ADMIN目录下只有sqlnet.ora一个文件,里面是:
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES = (NTS)
而在F:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\SAMPLE里面却有LISTENER.ORA、SQLNET.ORA和TNSNAMES.ORA三个文件
F:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\SAMPLE\TNSNAMES.ORA文件内容如下:
<alias>= [ (DESCRIPTION_LIST = # Optional depending on whether u have
# one or more descriptions
# If there is just one description, unnecessary ]
(DESCRIPTION=
[ (SDU=2048) ] # Optional, defaults to 2048
# Can take values between 512 and 32K
[ (ADDRESS_LIST= # Optional depending on whether u have
# one or more addresses
# If there is just one address, unnecessary ]
(ADDRESS=
[ (COMMUNITY=<community_name>) ]
(PROTOCOL=tcp)
(HOST=<hostname>)
(PORT=<portnumber (1521 is a standard port used)>)
)
[ (ADDRESS=
(PROTOCOL=ipc)
(KEY=<ipckey (PNPKEY is a standard key used)>)
)
]
[ (ADDRESS=
[ (COMMUNITY=<community_name>) ]
(PROTOCOL=decnet)
(NODE=<nodename>)
(OBJECT=<objectname>)
)
]
... # More addresses
[ ) ] # Optional depending on whether ADDRESS_LIST is used or not
[ (CONNECT_DATA=
(SID=<oracle_sid>)
[ (GLOBAL_NAME=<global_database_name>) ]
)
]
[ (SOURCE_ROUTE=yes) ]
)
(DESCRIPTION=
[ (SDU=2048) ] # Optional, defaults to 2048
# Can take values between 512 and 32K
[ (ADDRESS_LIST= ] # Optional depending on whether u have more
# than one address or not
# If there is just one address, unnecessary
(ADDRESS
[ (COMMUNITY=<community_name>) ]
(PROTOCOL=tcp)
(HOST=<hostname>)
(PORT=<portnumber (1521 is a standard port used)>)
)
[ (ADDRESS=
(PROTOCOL=ipc)
(KEY=<ipckey (PNPKEY is a standard key used)>)
)
]
... # More addresses
[ ) ] # Optional depending on whether ADDRESS_LIST
# is being used
[ (CONNECT_DATA=
(SID=<oracle_sid>)
[ (GLOBAL_NAME=<global_database_name>) ]
)
]
[ (SOURCE_ROUTE=yes) ]
)
[ (CONNECT_DATA=
(SID=<oracle_sid>)
[ (GLOBAL_NAME=<global_database_name>) ]
)
]
... # More descriptions
[ ) ] # Optional depending on whether DESCRIPTION_LIST is used or not