ArcObjects SQL Server Connection not recognizing instance The Next CEO of Stack OverflowArcGIS...
What was the first Unix version to run on a microcomputer?
Should I tutor a student who I know has cheated on their homework?
What flight has the highest ratio of time difference to flight time?
Find non-case sensitive string in a mixed list of elements?
INSERT to a table from a database to other (same SQL Server) using Dynamic SQL
Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?
How to install OpenCV on Raspbian Stretch?
Why didn't Khan get resurrected in the Genesis Explosion?
Can MTA send mail via a relay without being told so?
What is the value of α and β in a triangle?
Won the lottery - how do I keep the money?
Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?
Rotate a column
Solving system of ODEs with extra parameter
If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?
Which one is the true statement?
Why did CATV standarize in 75 ohms and everyone else in 50?
Why isn't the Mueller report being released completely and unredacted?
Is a distribution that is normal, but highly skewed considered Gaussian?
Does Germany produce more waste than the US?
Why don't programming languages automatically manage the synchronous/asynchronous problem?
A Man With a Stainless Steel Endoskeleton (like The Terminator) Fighting Cloaked Aliens Only He Can See
Does soap repel water?
How to place nodes around a circle from some initial angle?
ArcObjects SQL Server Connection not recognizing instance
The Next CEO of Stack OverflowArcGIS Server 10.1 and Postgres Geoprocessing Service issueError opening feature class from SDE (which can be opened in another application)Trouble registering datasets with ArcGIS Server 10.1 before publishing an MXDError when register database with ArcGIS serverFix broken SDE layers with Arcpy - unexpected errorListFeature classes in SDEOut of Server Memory when reconciling a large edit session in ArcObjectsRegistering database to ArcGIS for Server gives null error?Unable to open IWorkspace using IWorkspaceFactory with operating system authenticationError TypeError: 'NoneType' object is not iterable
I am trying to make a connection to a SQL Server database with SdeWorkspaceFactory. This is from my Windows 7 x64 Desktop to a Network database.
If I use this:
SDEWorkspace = NewObj(esriDataSourcesGDB.SdeWorkspaceFactory, esriGeodatabase.IWorkspaceFactory2)
connectionString = "server=SQLServer;" +
"instance=hbffcacqsql01;" +
"database=ACQ_HBED_PROD;" +
"authentication_mode=OSA"
result = SDEWorkspace.OpenFromString(connectionString, 0)
or this:
connectionProperties = NewObj(esriSystem.PropertySet, esriSystem.IPropertySet)
connectionProperties.SetProperty("SERVER", "SQLServer")
connectionProperties.SetProperty("INSTANCE", "hbffcacqsql01")
connectionProperties.SetProperty("DATABASE", "ACQ_HBED_PROD")
connectionProperties.SetProperty("AUTHENTICATION_MODE", "OSA")
SDEWorkspace = NewObj(esriDataSourcesGDB.SdeWorkspaceFactory, esriGeodatabase.IWorkspaceFactory2)
result = SDEWorkspace.Open(connectionProperties, 0)
I get this error:
Traceback (most recent call last):
File "C:/Users/tstanley/Downloads/ArcMap_Python/FirstTry.py", line 88, in <module>
result = SDEWorkspace.OpenFromString(connectionString, 0)
_ctypes.COMError: (-2147216021, None, (u'Entry for SDE instance not found in services file', u'esriDataSourcesGDB.SqlWorkspace.1', u'esri_csGeoDatabase.hlp', 0, None))
If I leave out the instance parameter, the connection window pops up and if I put the same value into the window, I get a connection.
Can someone tell me what I'm missing?
I have read a bunch of other posts of people with this error and they mention replacing the instance with a service number, 5151. It seems that they are trying to connect to an SDE database, which this isn't. I'm really new to ArcObjects so I have just about everything still to learn.
arcgis-10.1 arcmap arcobjects python-2.7 comtypes
|
show 1 more comment
I am trying to make a connection to a SQL Server database with SdeWorkspaceFactory. This is from my Windows 7 x64 Desktop to a Network database.
If I use this:
SDEWorkspace = NewObj(esriDataSourcesGDB.SdeWorkspaceFactory, esriGeodatabase.IWorkspaceFactory2)
connectionString = "server=SQLServer;" +
"instance=hbffcacqsql01;" +
"database=ACQ_HBED_PROD;" +
"authentication_mode=OSA"
result = SDEWorkspace.OpenFromString(connectionString, 0)
or this:
connectionProperties = NewObj(esriSystem.PropertySet, esriSystem.IPropertySet)
connectionProperties.SetProperty("SERVER", "SQLServer")
connectionProperties.SetProperty("INSTANCE", "hbffcacqsql01")
connectionProperties.SetProperty("DATABASE", "ACQ_HBED_PROD")
connectionProperties.SetProperty("AUTHENTICATION_MODE", "OSA")
SDEWorkspace = NewObj(esriDataSourcesGDB.SdeWorkspaceFactory, esriGeodatabase.IWorkspaceFactory2)
result = SDEWorkspace.Open(connectionProperties, 0)
I get this error:
Traceback (most recent call last):
File "C:/Users/tstanley/Downloads/ArcMap_Python/FirstTry.py", line 88, in <module>
result = SDEWorkspace.OpenFromString(connectionString, 0)
_ctypes.COMError: (-2147216021, None, (u'Entry for SDE instance not found in services file', u'esriDataSourcesGDB.SqlWorkspace.1', u'esri_csGeoDatabase.hlp', 0, None))
If I leave out the instance parameter, the connection window pops up and if I put the same value into the window, I get a connection.
Can someone tell me what I'm missing?
I have read a bunch of other posts of people with this error and they mention replacing the instance with a service number, 5151. It seems that they are trying to connect to an SDE database, which this isn't. I'm really new to ArcObjects so I have just about everything still to learn.
arcgis-10.1 arcmap arcobjects python-2.7 comtypes
1
TheopenFromString
method uses the old syntax, so you've got the parameters wrong.
– Vince
Jul 11 '14 at 19:36
I added another method I tried. I think this is the syntax suggested in the ArcObjects API Reference for 10.1, resources.arcgis.com/en/help/arcobjects-net/componenthelp/…
– cndnflyr
Jul 11 '14 at 19:42
6
So follow the instructions of that link -- "SERVER" – SDE server name you are connecting to. "INSTANCE" – Instance you are connection to. These are not correct. Try "INSTANCE=sde:sqlserver:hbffcacqsql01" (SERVER is ignored with Direct Connect)
– Vince
Jul 11 '14 at 19:47
Ha! You're beautiful! It worked. I've run into not understanding database connection strings before. "What info goes where?" Do you have a recomendation on where to go to brush up on this? Many thanks!
– cndnflyr
Jul 11 '14 at 19:53
1
What suggested by Vince is direct connect method as ESRI mentioned in ArcSDE documenation.It's a good method when you want to bypass SDE service and have fat clients.All sde libraries run on client.if you still want use SDE service,using propertyset is the easiest.but you must get sure your sde service is running and there is an entry for sde service in Windows/System32/drivers/etc/services in Windows on SDE runner machine.sometimes,depending on machine configuration,sde service doesn't act properly(even it's running) if there is no any entry for it in this file.
– Reza
Jul 13 '14 at 5:40
|
show 1 more comment
I am trying to make a connection to a SQL Server database with SdeWorkspaceFactory. This is from my Windows 7 x64 Desktop to a Network database.
If I use this:
SDEWorkspace = NewObj(esriDataSourcesGDB.SdeWorkspaceFactory, esriGeodatabase.IWorkspaceFactory2)
connectionString = "server=SQLServer;" +
"instance=hbffcacqsql01;" +
"database=ACQ_HBED_PROD;" +
"authentication_mode=OSA"
result = SDEWorkspace.OpenFromString(connectionString, 0)
or this:
connectionProperties = NewObj(esriSystem.PropertySet, esriSystem.IPropertySet)
connectionProperties.SetProperty("SERVER", "SQLServer")
connectionProperties.SetProperty("INSTANCE", "hbffcacqsql01")
connectionProperties.SetProperty("DATABASE", "ACQ_HBED_PROD")
connectionProperties.SetProperty("AUTHENTICATION_MODE", "OSA")
SDEWorkspace = NewObj(esriDataSourcesGDB.SdeWorkspaceFactory, esriGeodatabase.IWorkspaceFactory2)
result = SDEWorkspace.Open(connectionProperties, 0)
I get this error:
Traceback (most recent call last):
File "C:/Users/tstanley/Downloads/ArcMap_Python/FirstTry.py", line 88, in <module>
result = SDEWorkspace.OpenFromString(connectionString, 0)
_ctypes.COMError: (-2147216021, None, (u'Entry for SDE instance not found in services file', u'esriDataSourcesGDB.SqlWorkspace.1', u'esri_csGeoDatabase.hlp', 0, None))
If I leave out the instance parameter, the connection window pops up and if I put the same value into the window, I get a connection.
Can someone tell me what I'm missing?
I have read a bunch of other posts of people with this error and they mention replacing the instance with a service number, 5151. It seems that they are trying to connect to an SDE database, which this isn't. I'm really new to ArcObjects so I have just about everything still to learn.
arcgis-10.1 arcmap arcobjects python-2.7 comtypes
I am trying to make a connection to a SQL Server database with SdeWorkspaceFactory. This is from my Windows 7 x64 Desktop to a Network database.
If I use this:
SDEWorkspace = NewObj(esriDataSourcesGDB.SdeWorkspaceFactory, esriGeodatabase.IWorkspaceFactory2)
connectionString = "server=SQLServer;" +
"instance=hbffcacqsql01;" +
"database=ACQ_HBED_PROD;" +
"authentication_mode=OSA"
result = SDEWorkspace.OpenFromString(connectionString, 0)
or this:
connectionProperties = NewObj(esriSystem.PropertySet, esriSystem.IPropertySet)
connectionProperties.SetProperty("SERVER", "SQLServer")
connectionProperties.SetProperty("INSTANCE", "hbffcacqsql01")
connectionProperties.SetProperty("DATABASE", "ACQ_HBED_PROD")
connectionProperties.SetProperty("AUTHENTICATION_MODE", "OSA")
SDEWorkspace = NewObj(esriDataSourcesGDB.SdeWorkspaceFactory, esriGeodatabase.IWorkspaceFactory2)
result = SDEWorkspace.Open(connectionProperties, 0)
I get this error:
Traceback (most recent call last):
File "C:/Users/tstanley/Downloads/ArcMap_Python/FirstTry.py", line 88, in <module>
result = SDEWorkspace.OpenFromString(connectionString, 0)
_ctypes.COMError: (-2147216021, None, (u'Entry for SDE instance not found in services file', u'esriDataSourcesGDB.SqlWorkspace.1', u'esri_csGeoDatabase.hlp', 0, None))
If I leave out the instance parameter, the connection window pops up and if I put the same value into the window, I get a connection.
Can someone tell me what I'm missing?
I have read a bunch of other posts of people with this error and they mention replacing the instance with a service number, 5151. It seems that they are trying to connect to an SDE database, which this isn't. I'm really new to ArcObjects so I have just about everything still to learn.
arcgis-10.1 arcmap arcobjects python-2.7 comtypes
arcgis-10.1 arcmap arcobjects python-2.7 comtypes
edited 2 mins ago
PolyGeo♦
53.8k1781245
53.8k1781245
asked Jul 11 '14 at 19:26
cndnflyrcndnflyr
1,96221734
1,96221734
1
TheopenFromString
method uses the old syntax, so you've got the parameters wrong.
– Vince
Jul 11 '14 at 19:36
I added another method I tried. I think this is the syntax suggested in the ArcObjects API Reference for 10.1, resources.arcgis.com/en/help/arcobjects-net/componenthelp/…
– cndnflyr
Jul 11 '14 at 19:42
6
So follow the instructions of that link -- "SERVER" – SDE server name you are connecting to. "INSTANCE" – Instance you are connection to. These are not correct. Try "INSTANCE=sde:sqlserver:hbffcacqsql01" (SERVER is ignored with Direct Connect)
– Vince
Jul 11 '14 at 19:47
Ha! You're beautiful! It worked. I've run into not understanding database connection strings before. "What info goes where?" Do you have a recomendation on where to go to brush up on this? Many thanks!
– cndnflyr
Jul 11 '14 at 19:53
1
What suggested by Vince is direct connect method as ESRI mentioned in ArcSDE documenation.It's a good method when you want to bypass SDE service and have fat clients.All sde libraries run on client.if you still want use SDE service,using propertyset is the easiest.but you must get sure your sde service is running and there is an entry for sde service in Windows/System32/drivers/etc/services in Windows on SDE runner machine.sometimes,depending on machine configuration,sde service doesn't act properly(even it's running) if there is no any entry for it in this file.
– Reza
Jul 13 '14 at 5:40
|
show 1 more comment
1
TheopenFromString
method uses the old syntax, so you've got the parameters wrong.
– Vince
Jul 11 '14 at 19:36
I added another method I tried. I think this is the syntax suggested in the ArcObjects API Reference for 10.1, resources.arcgis.com/en/help/arcobjects-net/componenthelp/…
– cndnflyr
Jul 11 '14 at 19:42
6
So follow the instructions of that link -- "SERVER" – SDE server name you are connecting to. "INSTANCE" – Instance you are connection to. These are not correct. Try "INSTANCE=sde:sqlserver:hbffcacqsql01" (SERVER is ignored with Direct Connect)
– Vince
Jul 11 '14 at 19:47
Ha! You're beautiful! It worked. I've run into not understanding database connection strings before. "What info goes where?" Do you have a recomendation on where to go to brush up on this? Many thanks!
– cndnflyr
Jul 11 '14 at 19:53
1
What suggested by Vince is direct connect method as ESRI mentioned in ArcSDE documenation.It's a good method when you want to bypass SDE service and have fat clients.All sde libraries run on client.if you still want use SDE service,using propertyset is the easiest.but you must get sure your sde service is running and there is an entry for sde service in Windows/System32/drivers/etc/services in Windows on SDE runner machine.sometimes,depending on machine configuration,sde service doesn't act properly(even it's running) if there is no any entry for it in this file.
– Reza
Jul 13 '14 at 5:40
1
1
The
openFromString
method uses the old syntax, so you've got the parameters wrong.– Vince
Jul 11 '14 at 19:36
The
openFromString
method uses the old syntax, so you've got the parameters wrong.– Vince
Jul 11 '14 at 19:36
I added another method I tried. I think this is the syntax suggested in the ArcObjects API Reference for 10.1, resources.arcgis.com/en/help/arcobjects-net/componenthelp/…
– cndnflyr
Jul 11 '14 at 19:42
I added another method I tried. I think this is the syntax suggested in the ArcObjects API Reference for 10.1, resources.arcgis.com/en/help/arcobjects-net/componenthelp/…
– cndnflyr
Jul 11 '14 at 19:42
6
6
So follow the instructions of that link -- "SERVER" – SDE server name you are connecting to. "INSTANCE" – Instance you are connection to. These are not correct. Try "INSTANCE=sde:sqlserver:hbffcacqsql01" (SERVER is ignored with Direct Connect)
– Vince
Jul 11 '14 at 19:47
So follow the instructions of that link -- "SERVER" – SDE server name you are connecting to. "INSTANCE" – Instance you are connection to. These are not correct. Try "INSTANCE=sde:sqlserver:hbffcacqsql01" (SERVER is ignored with Direct Connect)
– Vince
Jul 11 '14 at 19:47
Ha! You're beautiful! It worked. I've run into not understanding database connection strings before. "What info goes where?" Do you have a recomendation on where to go to brush up on this? Many thanks!
– cndnflyr
Jul 11 '14 at 19:53
Ha! You're beautiful! It worked. I've run into not understanding database connection strings before. "What info goes where?" Do you have a recomendation on where to go to brush up on this? Many thanks!
– cndnflyr
Jul 11 '14 at 19:53
1
1
What suggested by Vince is direct connect method as ESRI mentioned in ArcSDE documenation.It's a good method when you want to bypass SDE service and have fat clients.All sde libraries run on client.if you still want use SDE service,using propertyset is the easiest.but you must get sure your sde service is running and there is an entry for sde service in Windows/System32/drivers/etc/services in Windows on SDE runner machine.sometimes,depending on machine configuration,sde service doesn't act properly(even it's running) if there is no any entry for it in this file.
– Reza
Jul 13 '14 at 5:40
What suggested by Vince is direct connect method as ESRI mentioned in ArcSDE documenation.It's a good method when you want to bypass SDE service and have fat clients.All sde libraries run on client.if you still want use SDE service,using propertyset is the easiest.but you must get sure your sde service is running and there is an entry for sde service in Windows/System32/drivers/etc/services in Windows on SDE runner machine.sometimes,depending on machine configuration,sde service doesn't act properly(even it's running) if there is no any entry for it in this file.
– Reza
Jul 13 '14 at 5:40
|
show 1 more comment
1 Answer
1
active
oldest
votes
This answer was submitted by @Vince in the comments to the initial question.
In a direct connection the Instance parameter needs to look like this
INSTANCE = sde:sqlserver:(servername)
and the Server parameter is ignored.
More information can be found here
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "79"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f106973%2farcobjects-sql-server-connection-not-recognizing-instance%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This answer was submitted by @Vince in the comments to the initial question.
In a direct connection the Instance parameter needs to look like this
INSTANCE = sde:sqlserver:(servername)
and the Server parameter is ignored.
More information can be found here
add a comment |
This answer was submitted by @Vince in the comments to the initial question.
In a direct connection the Instance parameter needs to look like this
INSTANCE = sde:sqlserver:(servername)
and the Server parameter is ignored.
More information can be found here
add a comment |
This answer was submitted by @Vince in the comments to the initial question.
In a direct connection the Instance parameter needs to look like this
INSTANCE = sde:sqlserver:(servername)
and the Server parameter is ignored.
More information can be found here
This answer was submitted by @Vince in the comments to the initial question.
In a direct connection the Instance parameter needs to look like this
INSTANCE = sde:sqlserver:(servername)
and the Server parameter is ignored.
More information can be found here
answered Jul 21 '14 at 19:00
cndnflyrcndnflyr
1,96221734
1,96221734
add a comment |
add a comment |
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f106973%2farcobjects-sql-server-connection-not-recognizing-instance%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
The
openFromString
method uses the old syntax, so you've got the parameters wrong.– Vince
Jul 11 '14 at 19:36
I added another method I tried. I think this is the syntax suggested in the ArcObjects API Reference for 10.1, resources.arcgis.com/en/help/arcobjects-net/componenthelp/…
– cndnflyr
Jul 11 '14 at 19:42
6
So follow the instructions of that link -- "SERVER" – SDE server name you are connecting to. "INSTANCE" – Instance you are connection to. These are not correct. Try "INSTANCE=sde:sqlserver:hbffcacqsql01" (SERVER is ignored with Direct Connect)
– Vince
Jul 11 '14 at 19:47
Ha! You're beautiful! It worked. I've run into not understanding database connection strings before. "What info goes where?" Do you have a recomendation on where to go to brush up on this? Many thanks!
– cndnflyr
Jul 11 '14 at 19:53
1
What suggested by Vince is direct connect method as ESRI mentioned in ArcSDE documenation.It's a good method when you want to bypass SDE service and have fat clients.All sde libraries run on client.if you still want use SDE service,using propertyset is the easiest.but you must get sure your sde service is running and there is an entry for sde service in Windows/System32/drivers/etc/services in Windows on SDE runner machine.sometimes,depending on machine configuration,sde service doesn't act properly(even it's running) if there is no any entry for it in this file.
– Reza
Jul 13 '14 at 5:40