加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ArcGIS Server无法注册Oracle一例

发布时间:2020-12-12 14:43:15 所属栏目:百科 来源:网络整理
导读:今天要做一个ArcGIS Server的测试工作,因此在一台新的linux机器上安装了一个ArcGIS Server,因为要访问数据库中的数据,因此要向ArcGIS Server注册一个oracle数据源,本来是一个非常简单的操作,结果碰到了如下的问题:ArcGIS Server环境如下:IP: 192.168.1
今天要做一个ArcGIS Server的测试工作,因此在一台新的linux机器上安装了一个ArcGIS Server,因为要访问数据库中的数据,因此要向ArcGIS Server注册一个oracle数据源,本来是一个非常简单的操作,结果碰到了如下的问题:
ArcGIS Server环境如下:
IP: 192.168.100.231
OS: Redhat 7.3 X64
ArcGIS Server: 10.5
Oracle:12.1.0.1.0
ArcGIS Desktop环境如下:
OS: WIN7
ArcGIS Desktop:10.5
ArcGIS Desktop的连接字符串为:192.168.100.231/orcl

错误信息如下:

从错误的描述上,应该oracle的监听没有监听orcl的服务,到服务器上查看其监听状态

[oracle@bigdataserver ~]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 10-JUL-2017 15:49:30

Copyright (c) 1991,2014,Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                10-JUL-2017 15:18:05
Uptime                    0 days 0 hr. 31 min. 24 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /home/oracle/oracle/diag/tnslsnr/bigdataserver/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bigdataserver.esri.com)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl",status READY,has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl",has 1 handler(s) for this service...
The command completed successfully

从监听的状态上看已经监听了orcl的服务了,并且安装ArcGIS Desktop使用EasyConnection可以连接到数据库服务器上,那就进一步排除了监听的问题,

由于在ArcGIS Server注册数据源虽然是在ArcGIS Desktop上操作,但是实际上ArcGIS Server的监控简称会在ArcGIS Server所在的机器上创建一个进程进行数据库连接,因此还是服务器上的连接有问题,继续验证,在ArcGIS Server机器上使用sqlplus进行连接。

结果如下:

[oracle@bigdataserver ~]$ sqlplus sde/sde@192.168.100.231/orcl

SQL*Plus: Release 12.1.0.2.0 Production on Mon Jul 10 15:57:24 2017

Copyright (c) 1982,Oracle.  All rights reserved.

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

发现报一样的错误,由此判断应该是本机的连接方式被做了限制,查询sqlnet.ora文件发现内容如下:

NAMES.DIRECTORY_PATH= (TNSNAMES)

果然只支持TNS连接,不支持EasyConnection,将EasyConnection也加入到连接列表中,

NAMES.DIRECTORY_PATH= (TNSNAMES,EZCONNECT)

并重启监听,问题解决。

[oracle@bigdataserver admin]$ sqlplus sde/sde@bigdataserver.esri.com/orcl

SQL*Plus: Release 12.1.0.2.0 Production on Mon Jul 10 16:06:05 2017

Copyright (c) 1982,Oracle.  All rights reserved.

Last Successful login time: Mon Jul 10 2017 15:44:58 +08:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning,OLAP,Advanced Analytics and Real Application Testing options

SQL>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读