码迷,mamicode.com
首页 > 数据库 > 详细

Oracle安装连接常见错误

时间:2020-01-16 18:40:30      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:line   实例   rod   常见错误   防火墙   路径   连接服务器   sid_name   pre   

oracle
安装注意:安装路径url不能带中文
C:\app\59428\product\11.2.0\dbhome_1\sqldeveloper
打开sqldeveloper的时候,需要输入java.exe
C:\app\59428\product\11.2.0\dbhome_1\jdk\jre\bin

警告:PlSQL安装32 ,x86版本

常规操作:
1、关闭防火墙
2、可以ping通服务器地址
3、oracle的服务器地址为:ip+orcl实例名,如:127.0.0.1/orcl
4、启动listener服务、oracleservicesoral服务

错误处理:
1、ORA-12638: 身份证明检索失败的解决方法
开始 -> 程序 -> Oracle -> Configuration and Migration Tools ->
Net Manager→本地→概要文件→Oracle高级安全性→验证→去掉所选方法中的 "NTS" 就可以了.

或者 把sqlnet.ora SQLNET.AUTHENTICATION_SERVICES = (NTS)其中的NTS改成其它的就行;我是改成NONE.

或者 把NTS设任何值都行,也可以把sqlnet.ora SQLNET.AUTHENTICATION_SERVICES = (NTS)整行去掉。

2、本地计算机上的oracleoradb11g_home1TNSListener服务启动后停止。某些服务在未由其他服务或程序使用时将自动停止。
在环境变量里加入ORCLE_SID, TNS_ADMIN。
电脑-属性-高级系统设置-高级-环境变量-系统变量-新建
变量名 ORACLE_SID 变量值 orcl
变量名 ORACLE_HOME 变量值 E:\Oracle\product\11.2.0\dbhome_1(oracle数据库安装路径)
编辑Path,在path值后面追加上 ;E:\Oracle\product\11.2.0\dbhome_1\bin
之后重启电脑!重启电脑!重启电脑!

3、ORA-28547:连接服务器失败、ORA-12541:TNS:无监听程序
修改监听器配置文件,..\app\admin\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora ,把主机名用ip地址代替
SID_NAME = CLRExtProc 改为 SID_NAME = orcl (orcl是实例名)
HOST = localhost 改为 HOST = 192.168.1.37
切记,服务器、客户端都要修改。

4.修改..\app\admin\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
两处 HOST = localhost 改为 HOST = 192.168.1.37
SID = CLRExtProc 改为 SID = orcl

5、重启oracle的上边的两个服务


6、ORA-12154:TNS:无法解析指定的连接标识符
在Oracle目录上右击选择“属性”,给已有账号赋全部权限。新添加:IIS_IUSRS用户全部权限


7.ORA-28547 连接服务器失败,可能是Oracle Net 管理错误
原因:

The listener.ora file‘s SID_LIST section may INCORRECTLY contain a "PROGRAM" line and/or an "ENVS" line for all database instances.

PROGRAM和ENVS参数的设置会导致客户端通过SID_NAME来进行连接,由此会引发ORA-28547错误

解决方法:

打开【listener.ora】文件,去除PROGRAM和ENVS,重启监听或者重启Windows

[oracle@localhost ~]$ cat  /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = orcl)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
      #(PROGRAM = extproc)  #######去掉此行
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.136.211)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )
正确配置保存一份:
listener.ora:

# listener.ora Network Configuration File: E:\app\59428\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = ORCL)
      (ORACLE_HOME = E:\app\59428\product\11.2.0\dbhome_1)
      #(PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:E:\app\59428\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.37)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = E:\app\59428

tnsnames.ora:

# tnsnames.ora Network Configuration File: E:\app\59428\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.

127.0.0.1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = orcl)
      (PRESENTATION = RO)
    )
  )

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))


ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

192.168.1.37 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.37)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

Oracle安装连接常见错误

标签:line   实例   rod   常见错误   防火墙   路径   连接服务器   sid_name   pre   

原文地址:https://www.cnblogs.com/LiChen19951127/p/12202670.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!