当oracle 报12584错误时
一、去把这tnsnames.ora,listener.ora两个文件里面的localhost 全部改为127.0.0.1 包括你连接数据库用的工具,
改完之后,重启监听服务。(重启监听服务可以从任务管理器--->服务--->Oracle???Listenter 停止,然后启动))
如果没有效果,则继续下面操作
增加一段代码至tnsnames.ora配置文件:
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = F:\app\Administrator\product\11.2.0\dbhome_1)
(SID_NAME = ORCL)
)
如图所示(记得改路径):
每次操作完,记得重启监听服务。还不行的话直接用我的配置文件把。
#配置文件: listener.ora
# listener.ora Network Configuration File: F:\app\Administrator\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 = F:\app\Administrator\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:F:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = F:\app\Administrator\product\11.2.0\dbhome_1)
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
ADR_BASE_LISTENER = F:\app\Administrator
分割线-------------------------------------------------------------------------------------------------
#配置文件:tnsnames.ora
# tnsnames.ora Network Configuration File: F:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)