ArcSDE Connection

503
2
05-05-2013 03:15 PM
BasuMathapati
New Contributor II
Hi,

I've been frustrated to connect to ArcSDE in ArcGIS 10.1 (windows 7 o.s.)

I've been following the document & help supply connection properties for CreateArcSDEConnectionFile_management such as:

folderName = r'D:\temp'
fileName = "myConn"
serverName = "oraMyDb"
serviceName = "ssss.sss.sss.sss.au" ? OR "MyEDB" (database?)
databaseName = ""
authType = "DATABASE_AUTH"
username = "myusername"
password = "mypassword"
saveUserInfo = "SAVE_USERNAME"
versionName = "SDE.DEFAULT"
saveVersionInfo = "SAVE_VERSION"

> Am I supplying correct property details for the command ?
> Am I missing something ?
> Or Any trick to connect in ArcGIS 10.1 ?

I greatly appreciate your help\assistance

Basu
Tags (2)
0 Kudos
2 Replies
MarcoBoeringa
MVP Regular Contributor
I think your issue is with the entry of the "serviceName". Unless you modified the Windows services file on your client PC to supply the corresponding TCP/IP number, you will not be able to connect by entering a service name (for some details regarding editing the services file, see this Help page). You may try entering the port number instead. In a default installation of ArcSDE, the port number is 5151, so enter that instead of

"ssss.sss.sss.sss.au" ? OR "MyEDB" (database?)

It should allow you to connect without specifying the service name. In addition, it is better to include the file extension "*.sde" to the name of the connection file, so "myConn.sde".

An introduction to setting up and connecting too an Application Server can be found in this ESRI Australia blog article:

http://esriaustraliatechblog.wordpress.com/2012/09/27/creating-an-arcsde-service-on-windows-using-ar...

All of this assumes you have an ArcSDE Application Server running on a server, and don't attempt to connect via Direct Connect, for which the "Create ArcSDE Connection File" tool is not meant to be used.

If you are not familiar with the distinction between Direct Connect and an ArcSDE Application Server, you may also wish to read the document I recently posted in another thread:

http://forums.arcgis.com/threads/83644-quot-The-ESRI-Geodatabase-Framework-quot-PDF
0 Kudos
TimDine
Occasional Contributor II
At 10.1 ideally you're moving away from using the SDE service and towards using direct connections.  Read the section "Create Database Connection (Data Management)" in the documentation which should suggest how to create a connection file to a 10.1 geodatabase.  The 10.1 connections look a bit different than the previous connection dialogs.  Below is a sample I used to connect to my Oracle geodatabase that does not have user schema geodatabases in it.

import arcpy

folderName = r"c:\temp"
fileName = "testConnection.sde"
databasePlatform = "ORACLE"
instance = "mydatabase.world"
username = "myusername"
password = "secretpassword"

arcpy.CreateDatabaseConnection_management(folderName, fileName,databasePlatform,instance,"DATABASE_AUTH",username,password,"SAVE_USERNAME","#","#","TRANSACTIONAL","sde.DEFAULT")

0 Kudos