Hi,
Environment: Windows Server 2008 R2 Standard, Oracle 11g, ArcGisServer 10.1 SP1
Issue: Cannot register an Oracle view with SDE
If I create an Oracle view using an existing/working feature class called Districts using the following syntax:
CREATE OR REPLACE VIEW DISTRICTS2 As
SELECT "TAG","OBJECTID","SHAPE"
FROM Districts
Where ObjectID = 1;
Spatial column is 'Shape'. ID column is 'ObjectId'.
If I then try to register that view with the geodatabase using the following:
sdelayer -o register -l DISTRICTS2,SHAPE -e nac+ -t ST_GEOMETRY -C OBJECTID,USER -i sde:oracle11g:orcl10 -u xxx -p xxx
(-u xxx -p xxx are dummy values)
I get:
Wrong column type (-144)
SE_table_get_shape_type failed.
I have checked the shape column type on the base table DISTRICTS using:
sdelayer -o describe_long -l DISTRICTS,SHAPE -i sde:oracle11g:orcl10 -u xxx -p xxx
And I get:
Spatial Column = SHAPE
Layer Type = ST_GEOMETRY
Entities = nac+
What I am doing wrong?
I cannot use catalog to register the view as the 'Register with geodatabase' option under 'Manage' is greyed out.
I can 'manually' register the view by manually inserting records into the sde tables LAYERS, GEOMETRY_COLUMNS and TABLE_REGISTRY. Obviously this is not the correct way to go!
Thanks in advance.