6

I just registered a SQL Server view with ArcSDE through

sdetable -o register [...]. 

I wonder, how to register a SQL Server stored procedure with ArcSDE? Is it the same process as the view?

EDIT

It seems that to register a stored procedure, it is required to have a "stable" database object: the definition of the stored procedure by itself it is just a piece of code that has no sense until it is executed with some input parameters.

Ok, so, if we consider the stored procedure as a "data collection generator", how would you execute this code with the input parameters, catch the tabular data output and register it to ArcSDE? What would you use? Some kind of ArcGIS processing?

Please, could you provide any example or guidelines for this process?

Thanks!

8
  • 1
    Does your stored procedure return a table/view? If not, I am not sure what SDE would do with the stored proc. If so, an alternative would be to use your stored proc to refresh/rebuild a table or view. It could potentially called based on a trigger or cron job.
    – DavidF
    Commented Nov 15, 2012 at 18:54
  • 1
    I guess I should rephrase that, does it create a named table or view. I think that you pretty much need to have a 'stable' db object, like a table or view to register it.
    – DavidF
    Commented Nov 15, 2012 at 19:49
  • 1
    I would guess that it isn't possible. I suggest using the stored proc to create/refresh a table. Call the stored proc via cron.
    – DavidF
    Commented Nov 16, 2012 at 4:20
  • 1
    Is it possible to do your calculation in an inline function instead of a stored procedure?
    – jrockers
    Commented Dec 3, 2012 at 16:22
  • 1
    Well, the stored procedure does not make "any special calculation" it just builds a dataset in function of some input parameters the user stablishes. Nothing sophisticated, though. The thing is that I need ArcGIS to access that object, but that object does not exist until I establish those input parameters, so... Anyway, I found a "workaround" with publishing all required parameters with views and filtering them later.
    – Irene
    Commented Dec 3, 2012 at 16:42

1 Answer 1

1

Well, the stored procedure does not make "any special calculation" it just builds a dataset in function of some input parameters the user stablishes. Nothing sophisticated, though. The thing is that I need ArcGIS to access that object, but that object does not exist until I establish those input parameters, so... Anyway, I found a "workaround" with publishing all required parameters with views and filtering them later

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.