gkar68

I have a weird error when validating mxd to convert to msd

Discussion created by gkar68 on Jun 5, 2013
Hi.
I have ArcGIS server 10.0, and I have some mxd files which I publish them as ArcGIS services.

for last three years I have been doing the same work, by using Python script to check the mxd files and publish the service.
I run the script to publish the services, on all environment (dev, test, prod)
our geodatabase is on Oracle 10g, and it is the same for all environment

The script is doing the following
1 - set the data source for all layers on the map (depending on what I am deploying to: dev, test, prod)
2 - run the python "ListBrokenDataSources" to check for broken data source.
3 - run python "AnalyzeForMSD" to analyse to convert mxd to msd.
4 - stop services
5 - publish services
....

When I modify any mxd, I will run the script to publish it.
I have been doing this for three years without a problem.

And now I have a problem
There is a layer that is failing on the process "AnalyzeForMSD"
the process is failing on a layer called "NOLEGEND-CP Low"
and the funny thing, I didn't change that layer at all.
The changes I did, is I removed some columns from another layer.

So, AnalyzeForMSD is giving me this error

-- Analysing the MXD for conversion to a MSD
     -- ERROR: Layer's definition query is invalid (CODE 7)
         -- Affected Layer: NOLEGEND-CP Low




The query definition for that layer is this

CPM_SURVEY_ID = -1 


If I change the -1 to 1 , it works
if I change the -1 to < 0, it is the same problem

The problem happen on Production only.
It works fine on both dev, test

and nothing change in that layer for last two years.
Nothing change on Oracle table / sde registeratioin as well

The oracle definition for that column is Number(10,0)
and sde column registration for that column using SDE_Type = 2

the table has the same definition on dev/test/qual

it is driving me nuts
the python script that is giving the error is

analysis = arcpy.mapping.AnalyzeForMSD(mxd_file_name)

Outcomes