how to query metadata in the sde schema in 10.1?

11-30-2012 05:32 AM
New Contributor III
In 9.3.1, you can get the metadata of a featureclass in the xml format by perform the following query: SELECT XML FROM SDE.GDB_USERMETADATA WHERE UPPER (NAME) = 'xxx'. What is the equivalent sql in 10.1 that would give the same xml content?

I tried select xml_doc from sde_xml_doc2 where sde_xml_id = xxx. However, the blob content is binary and I couldn't convert it to the xml format. Has anyone found a solution? i.e. to get the metadata of a featureclass in xml from the sde schema.

4 Replies
Esri Contributor
Hi Yin,

It sounds like you are using an Oracle geodatabase, is that correct?

You should be able to set up the extproc as in the following topic and then query the GDB_items_vw (documentation field):

Configuring the Oracle extproc to access the geodatabase with SQL

Go to the bottom of this topic for more info:

A quick tour of geodatabase system tables

Look for "XML in geodatabase system tables" and "Related Topics"
0 Kudos
New Contributor

Hey Yin,

Glad that you have posted this question. After this long years I have the same question. I want to extract the xml content from xml_doc column. SDE has a function sdexmltotext but I would like to understand how to construct xml using DB functions or BLOB operations.

Did you find any solution for this? Appreciate your time on this.



Arun Raj

0 Kudos
Notable Contributor

Do any of the pages in these legacy 9.3 docs help?

XML columns in a geodatabase stored in Oracle

0 Kudos
Notable Contributor

Does SDE.GDB_ITEMS_VW help you at all?
Also, looking at the SQL definition of that view might be of interest.

0 Kudos