Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've almost used SQL server_SDE geodatabases for 3 years in GIS projects and I don't know how can I create a stored procedure in geodatabase.I use ESRI case tool to create a geodatabase in ArcCatalog(using xml file as described in ESRI documentations),so I never created a geodatabase with DDL scripts,But i would like to know (and do) creating a geodatabase using DDL commands in SQL Server(while using SDE and versioning) and adding stored procedure to this geodatabase.As I know,sde creates some metadata tables and breaks data of versioned tables into some other tables(like a_xx and f_xx,for example a89,f89) so that some records of table is saved in these helping tables,so that I don't know how can I find the name of these helping tables and basically do i have to work with them in stored procedure or not.

Is there any document or guide line to show how can create a geodatabase using DDL command in an environment like SQL server management studio?and how can create stored procedures in geodatabase and how can call it?

share|improve this question
up vote 3 down vote accepted

The SQL Server geodatabases are like any other SQL Server database. Writing and accessing stored procedures for data in the geodatabases will not be any different.

Here is a presentation from ESRI on how to use SQL in a geodatabase:

share|improve this answer
Thank you very much Seth,I found this file useful,but not enough details included as it's a you think it's possible to work with a geoDB using an object model other than ArcObject,say ODBC or OLEDB,just like a a non_GeoDB database in ESRI's application? – Reza Feb 21 '11 at 4:44
@Reza - Entity Framework 4 offers some support to modeling geodatabases, even though it currently requires a hack to represent spatial types. You may want to give that a try. – Seth P. Feb 21 '11 at 4:49
Thanks very much Seth – Reza Feb 22 '11 at 16:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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