ORA-12505 错误的解决方案
引用
错误信息 : ORA-12505, TNS:listener does not currently know of SID given in connect descript
方法一:引用
首先找到listener.ora,我的目录是:
D:\Program_Files\oracle\product\10.2.0\db_1\network\admin\listener.ora
然后增加我下面标红的信息,注意ORACLE_HOME路径别写错了.然后重启服务即可
listener.ora 写道
# listener.ora Network Configuration File: D:\Program_Files\oracle\product\10.2.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:\Program_Files\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = D:\Program_Files\oracle)
(SID_NAME = orcl)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
方法二:引用
方法一不行的话可以试试下面的命令.
set oracle_sid=<sid_name>
sqlplus /nolog
connect sys/pwd as sysdba
startup