SDE 10, SQL Server Geography datatype Invalid Layer Storage Type

571
6
03-02-2011 11:55 AM
SeraWhite
New Contributor III
Hi,

1.   I created a table in SQL Server 2008 with a Geography datatype. 

Populated it like so (I used the syntax of the SQL Server documentation along with their defined polygon):

INSERT INTO EntireTripExtent (geom)
VALUES (geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326));


2.  And then from Catalog exported it from the db into an sde db.

3.  Then I tried to run the following registerlayer command (with a correct user and password):
sdelayer -o register -l EntireTripExtent,geom -e a -i sde:sqlser
ver:gis-data -s gis-data -D transportationSystems -u user -p pass
-t GEOGRAPHY

I get the following error:
ArcSDE 10.0  for SQL Server Build 685 Fri May 14 12:05:43  2010
Layer    Administration Utility
-----------------------------------------------------
Error: Invalid layer storage type (-196).
Error: Cannot Create Layer.


I cannot find any information as to what might be causing this error.  The documentation is not very good!  I could only guess at what the right extent was for a polygon (I chose area). I could not find any description as to what extent was used for. 

Does anyone have any ideas what I might be doing wrong?

Thanks,
Sera
0 Kudos
6 Replies
SeraWhite
New Contributor III
Interesting.  If I add dbo. to the tablename I get a new error:

Error Wrong Column Type (-114)
0 Kudos
MichaelBlom
New Contributor III
Hi Sera,

I'm getting the exact same error message, trying to do the same thing, and yours is the only reference I can find on the whole interweb.  Do you remember how you solved this issue (if you did at all)?

-update: okay, my problem was related to not have a integer row id in my table. I edited the SDE_table_registry to add a rowid_column value for my table.

Thanks,
Mike
0 Kudos
VinceAngelo
Esri Esteemed Contributor
Editing the SDE_* and GDB_* tables is very much not recommended (and almost never necessary).
The supported mechanism for acknowledging new columns is to run 'sdetable -o describe' as the
table owner.

- V
0 Kudos
SeraWhite
New Contributor III
I never did solve the problem.  I approached it from a completely different angle.  Your solution is interesting.   I don't think I would have thought about that. 

Thanks for posting the update.

Sera
0 Kudos
by Anonymous User
Not applicable
Editing the SDE_* and GDB_* tables is very much not recommended (and almost never necessary).
The supported mechanism for acknowledging new columns is to run 'sdetable -o describe' as the
table owner.

- V


You run 'sdetable -o describe' to address the Invalid layer storage type??
0 Kudos
VinceAngelo
Esri Esteemed Contributor
No, 'sdetable -o describe' is used to discover columns added with ALTER TABLE
(after the table has been registered with ArcSDE).

All native geometry column tables which will be registered with ArcSDE must have
a 32-bit integer NOT NULL rowid column with unique values greater than zero.
Best practice is to always specify the rowid column on the command-line (vice
letting 'sdelayer' guess at what column it should use).

If the rowid column is of the wrong type a number of strange errors can result
(including -196 and -114).

- V
0 Kudos