Is there a function or system view that returns all of the available property names?
I was looking for 'SYSTEMDATAACCESS' and 'USERDATAACCESS' which aren't listed on the MSDN OBJECTPROPERTY page. I added a comment about them, but am wondering if there are others that I don't know about…given that it's SQL I'd expect them to be available as queryable metadata somewhere, but couldn't find anything. Are the properties in the meta data somewhere?
EDIT: While it isn't really relevant to my question, here is an example usage of system data access. select OBJECTPROPERTY(OBJECT_ID('sys.dm_db_stats_properties'), 'SYSTEMDATAACCESS')
Best Answer
No. There isn't even something that returns the names of all of the available built in functions (such as
OBJECTPROPERTY
itself).These property values are documented for
OBJECTPROPERTYEX
even though they do also appear to work forOBJECTPROPERTY
and probably should be documented there (the return type isint
so there is no reason that they shouldn't be supported there and it is more convenient to work with that function without needing a cast from sql_variant.)For entirely undocumented property values (such as
minlen
forINDEXPROPERTY
) I'm not aware of any way of determining these.