Unable to use a Geoprocessing Service. Error 000210. The Table name is Invalid

477
8
01-07-2018 09:31 PM
Highlighted
Occasional Contributor

Could you solve the "." problem. I cannot publish my service because of the dots in the layers name. Please let me know if you have any solution.

Description of issue in detail:

###############################

  • ArcGIS Desktop version :10.4.1
  • ArcGIS Server version: 10.4.1
  • Enterprise Geodatabase version: I converted a SQL database to Geodatabase using "
    "Enable Enterprise Geodatabase" tool in Arcmap and registered the GDB at Arcgis server
  • SQL Server version: SQL Server 2012 

 

I am creating a very simple service. the python code of script is:

import arcpy

arcpy.CheckOutExtension("3D")
arcpy.RasterDomain_3d(r"Database Connections\GS.sde\GS.DBO.R1",
                      r"Database Connections\GS.sde\GS_DBO_test", "POLYGON")

it works as a ArcGIS tool perfectly and generate the  polygon output:

 

Then I shared the tool as Geoprocessing service. when I run the service on my ArcCatalog as follows:

 

I get the following error:

 

I do not know why the arcGIS server makes the same output in the a"scratch.gdb" in the server and fails because of the "Dots" in the name. As you know, ArcGIS does not accept Dot as a layer name in file Geodatabase.

Reply
0 Kudos
8 Replies
Highlighted
MVP Regular Contributor

Remove the "." in the Object name and replace with an "_" if needed. As discussed above, "." in object name is not supported by ArcGIS.

Reply
0 Kudos
Highlighted
Occasional Contributor

Thank you,

I do not have any control on the name because the dots come from SQL server. When I switched the "." with "_", the output result is as follow:

If I publish the service, It will not run because of the new Dots!

Reply
0 Kudos
Highlighted
MVP Regular Contributor

This looks good and as expected.

GS --> Name of the database

DBO--> Schema that owns the data and was used to create the data

GS_DBO_test \ test--> name of the Object (table and Feature class)

So, I think you should posts a screenshot of the error you receive while Publishing and a brief outline of the workflow you are following to Publish.

Also the configuration details, such as:

  • ArcGIS Desktop version
  • ArcGIS Server version
  • Enterprise Geodatabase version 
  • SQL Server version (Example: SQL Server 2014 SP2)
Reply
0 Kudos
Highlighted
Occasional Contributor
  • ArcGIS Desktop version :10.4.1
  • ArcGIS Server version: 10.4.1
  • Enterprise Geodatabase version: I converted a SQL database to Geodatabase using "
    "Enable Enterprise Geodatabase" tool in Arcmap and registered the GDB at Arcgis server
  • SQL Server version: SQL Server 2012 

I am creating a very simple service. the python code of script is:

import arcpy

arcpy.CheckOutExtension("3D")
arcpy.RasterDomain_3d(r"Database Connections\GS.sde\GS.DBO.R1",
                      r"Database Connections\GS.sde\GS_DBO_test", "POLYGON")‍‍‍‍‍

it works as a ArcGIS tool perfectly and generate the  polygon output:

Then I shared the tool as Geoprocessing service. when I run the service on my ArcCatalog as follows:

I get the following error:

I do not know why the arcGIS server makes the same output in the a"scratch.gdb" in the server and fails because of the "Dots" in the name. As you know, ArcGIS does not accept Dot as a layer name in file Geodatabase.

Reply
0 Kudos
Highlighted
MVP Regular Contributor

I don't have a suggestion\solution to offer, however I have branched this out as a separate Post with all the details provided. Also shared this Post to the other relevant Groups.

Reply
0 Kudos
Highlighted
Regular Contributor II

Hi

First you should think about the final GP that you need. Currently the tool takes one layer and create a second one, both with hard coded names. Such a service should work only once...

Do you want the user to select a feature class for input? Are you sure all outputs should be written into the database (what happens if to users give the same output name)?

Usually the output of a GP tool is temporary and send only to the user that run the tool.

In general the server does not have "Database Connection" this is something that exists in your profile only.

You should put a sde connection file in a directory that is registered in the server (C:\temp\GS.sde) Then it will be recognize in the publish process and will not be replaced by scratch gdb.

Have Fun

Mody

Highlighted
Esri Esteemed Contributor

In addition, please note that a valid name can be created using ValidateTableName—Help | ArcGIS Desktop .

The other thing is to revise the content (if you have access) of the script after it is published to AGS (look at a folder like: arcgisserver\directories\arcgissystem\arcgisinput\OptionalFolderName\YourServiceName.GPServer\extracted\v101) In many cases the content of the script will be changed.  

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

When you create a geoprocessing service, you shouldn't set the output location to an SDE database when running the tool in ArcMap.  That will create the name using the syntax for a FC in a geodatabase, (instance.owner.table) as you know.  When you run the GP service, all output feature classes will be written to the scratch.gdb.  Since it simply takes the original name and saves it to the scratch.gdb, the original name becomes invalid.  Save the output to a file geodatabase when running the tool in ArcMap, then publish it.  You can use the os module and arcpy.env.scratchGDB environment variable:

import arcpy, os

arcpy.CheckOutExtension("3D")
arcpy.RasterDomain_3d(r"Database Connections\GS.sde\GS.DBO.R1",
                      os.path.join(arcpy.env.scratchGDB,"test"), "POLYGON")‍‍‍‍‍