数据库 Oracle系统错误解决方案
ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务解决
打开H:\Oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN(不同机器目录可能不同)目录下的listener.ora文件,发现此文件内容如下:
#listener.ora Network Configuration File:
H:\Oracle\product\11.2.0\dbhome_1\network\admin\listener.ora
#Generated by Oracle configuration tools.
SID_LIST_LISTENER=
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME =H:\Oracle\product\11.2.0\dbhome_1)
(SID_NAME = ORCL)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = H:\Oracle\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS ="EXTPROC_DLLS=ONLY:H:\Oracle\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= H:\Oracle
修改完成后重启Oracle实例服务即可
启动数据库监听
lsnrctl start
ORA-01034: ORACLE not available的解决办法
登录 sqlplus "/as sysdba"
输入:connect/as sysdba;
输入:startup 重起数据库就OK了;
ORA-00119: invalid specification for system parameter LOCAL_LISTENER异常解决
1.在tnsnames.ora中增加以下内容:
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
// 增加完后重启对应服务
2.使用sqlplus连接数据库:
sqlplus sys/sys@test as sysdba
3.基于spfile创建pfile文件:
//D:\programs\oracle_data\product\11.2.0\dbhome_1\database\INITorcl.ORA
create pfile from spfile;
4.修改生成的文件,将包含local_listener那一行干掉
5.执行以下命令:
startup pfile='D:\programs\oracle_data\product\11.2.0\dbhome_1\database\INITtest.ORA'
处理完成后即可登录数据库了。
启动数据库
sqlplus / as sysdba
startup