我本机创建了两个数据库orcl,testdb,在只有orcl数据库时没出现这个问题
当我shutdown immediate testdb;
startup mount;
报ORA-12514: TNS:listener does not currently know of service requested in connect descriptor不知道什么问题,检查tnsnames.ora和listener.ora两个文件没看出什么问题,最后重建这两个文件仍然是这样,搞了好久,查看警告日制也没看出什么问题.还以为oracle又发疯不认了呢.最后在listener.ora文件中加入了 (SID_DESC =
(GLOBAL_DBNAME = testdb)
(ORACLE_HOME = D:/oracle/product/10.1.0/Db_1)
(SID_NAME = testdb)
)重新又做了一次试验
startupdown immediate;
startup mount;成功
以下是加过此段后的监听文件.
# listener.ora Network Configuration File: D:/oracle/product/10.1.0/Db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:/oracle/product/10.1.0/Db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = testdb)
(ORACLE_HOME = D:/oracle/product/10.1.0/Db_1)
(SID_NAME = testdb)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = do1-201)(PORT = 1521))
)
)
)