我很好地安装了 Oracle 11g r2,有 2 个数据库(se3 和 mydb,两者都有 db_domain .orcl 即 mydb.orcl 和 se3.orcl)运行良好,直到昨天。但突然我收到 ORA-12514 错误(TNS:listener 不知道连接描述符中请求的服务)..
我的 tnsnames.ora 文件:
# tnsnames.ora Network Configuration File: G:\oracledb\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_MYDB =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
MYDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = mydb.orcl)
)
)
SE3 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = se3.orcl)
)
)
LISTENER_SE3 =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
LISTENER.ORA FILE:
# listener.ora Network Configuration File: G:\oracledb\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = G:\oracledb\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:G:\oracledb\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = G:\oracledb
我能够很好地“tnsping mydb/se3”.. 也尝试更改 tnsnames.ora 和 listener.ora 文件(现已恢复),但无法通过 sqlplus 或 sqldeveloper/visual studio 连接到其中任何一个.. 请帮助我。 。 谢谢!