1、pl/sql无法连接本机的oracle(ORA 12154:TNS:无法解析指定的连接标识符)
解决方法:pl/sql不能安装在Program Files(x86)文件夹下,要安装在Program Files文件夹下
2、pl/sql无法连接远程oracle(ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务)
解决方法:①在linux下找到oracle目录下的listener.ora,用vi编辑
②下面红色为添加部分,其中GLOBAL_DBNAME要与客户机配置的oracle网络名一致,SID_NAME要与本地数据库实例名一致
代码如下:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC=
(GLOBAL_DBNAME=Lxorcl)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(SID_NAME=orcl)
)
)
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC=
(GLOBAL_DBNAME=Lxorcl)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(SID_NAME=orcl)
)
)
3、oracle监听程序的启动和关闭
代码如下: