Lead
With ESRI's strong advocacy for direct connections, users are increasingly connected to the service, with direct connectivity, and of course the ArcGIS engine development user.
Environment
Oracle database, ArcGIS version not limited, but since version 9 is more service connected, after 10 version as test object
Problem description
As now all with direct connection, and direct connection needs to install database client, Oracle client may be more difficult to grasp some users, generally is the more convenient instant client, the clients directly decompression, configuration environment variables can be.
However, the user's environment is very special, the default 1521 database port is not burst to the client user, DBA to the client user also opened a non-1521 port, and now if the use of intantclient are used by default ezconnect mode,
That is, IP: Port number/service name, if your port number is default 1521, this notation can also omit the port number, ip/service name
So the problem is that the code to connect to SDE using ArcGIS engine is as follows:
Public Iworkspace Connect_sde() { IpropertysetPropertySet= New Propertysetclass();PropertySet.SetProperty("INSTANCE","SDE:ORACLE11G:192.168.220.131/ORCL");PropertySet.SetProperty("USER", "SDE");PropertySet.SetProperty( "PASSWORD" , "SDE" iworkspacefactory sdefactory = new sdeworkspacefactoryclass (); iworkspace Sdeworkspace = Sdefactory. Open (propertyset, 0< Span class= "pun"); return Sdeworkspace; Span class= "pun" >
If it is the default port 1521, the user can follow the above connection, but if the port number is modified, the user needs to add the port number, the relevant code is
PropertySet. SetProperty("INSTANCE","SDE:ORACLE11G:192.168.220.131:1522/ORCL");
However, with this approach, ArcGIS engine will report a timeout error.
Cause of the problem
This problem is a bug
Bug number |
NIM077055 |
Submitted |
Jan, 11:27 AM |
Severity |
Medium |
Applies To |
No Product Found |
Version Found |
No Version Found |
Prog Language |
N/A |
Server Platform |
|
Client Platform |
|
Database |
All |
Locale |
N/A |
Status |
|
Version Fixed |
10.1 |
SP Fixed |
N/A |
Solution Solutions
1, if using the default 1521 port, is to use the above code connection, note that the port number cannot be included
2. If you use a non-1521 port, you will have to install an administrator version of the Oracle client, configure Netservicename to
If your netservicename name is: orcl_123
PropertySet. SetProperty("INSTANCE","sde:oracle11g:orcl_123");
Summarize
While the ArcGIS engine development process can be analogous to the functionality and notation of ArcGIS for desktop, there may be a difference in the connection parameters
1, ArcGIS for desktop does not need to write sde:oracle11g, support port number
2, ArcGIS engine must write sde:oracle11g, do not support port number
iarcgis.com, All rights reserved 丨 If not noted, are original 丨 This website uses BY-NC-SA agreement to authorize, reprint please specify turn from: http://www.iarcgis.com/?p=1004
arcgis10.x Engine Direct Connect Timeout ORA-12170 from: http://www.iarcgis.com/? p=1004