Answered by:
Need help updating table/column metadata information

Question
-
Hello all,
I'm an Access developer by trade; this SQL Server is somewhat new to me.
I have been charged with developing two scripts to update the metadata properties in both table and columns.
I did find the the canned procedures for updating the metadata; sp_updateextendedproperty, etc
I can write a simple update SQL statement; But for what reason I can't update the fn_listextendedproperty directly.
Is this a doable? Or should we stick to using the canned procedures (not sure if the boss will accept that reasoning)?
Sorry if I'm posting in the wrong boardWednesday, October 28, 2009 2:52 PM
Answers
-
Well, here is the answer:
sp_configure 'allow updates',1 update sys.extended_properties set value='111' WHERE name='Purpose';
Result:
Ad hoc updates to system catalogs are not allowed.
We can not update neither system tables nor system views. This is regardless whether we've set "allow updates" or not. Use special procedures.
---
Paul Svirin
StarWind Software developer ( http://www.starwindsoftware.com )- Proposed as answer by Paul Svirin Wednesday, October 28, 2009 3:49 PM
- Marked as answer by Red2003XLT Wednesday, October 28, 2009 4:41 PM
- Edited by Paul Svirin Wednesday, October 28, 2009 11:52 PM
Wednesday, October 28, 2009 3:48 PM
All replies
-
Can you explain why it is not acceptable to update the extended properties with predefined procedures?
---
Paul Svirin
StarWind Software developer ( http://www.starwindsoftware.com )Wednesday, October 28, 2009 3:28 PM -
Not to be flippant, but it's what my boss wants.
I'm interning and yes I'm a little preplexed about the situation.Wednesday, October 28, 2009 3:46 PM -
Well, here is the answer:
sp_configure 'allow updates',1 update sys.extended_properties set value='111' WHERE name='Purpose';
Result:
Ad hoc updates to system catalogs are not allowed.
We can not update neither system tables nor system views. This is regardless whether we've set "allow updates" or not. Use special procedures.
---
Paul Svirin
StarWind Software developer ( http://www.starwindsoftware.com )- Proposed as answer by Paul Svirin Wednesday, October 28, 2009 3:49 PM
- Marked as answer by Red2003XLT Wednesday, October 28, 2009 4:41 PM
- Edited by Paul Svirin Wednesday, October 28, 2009 11:52 PM
Wednesday, October 28, 2009 3:48 PM -
Thank you, maybe the intent of this exercise was for me to find out that little gem.
Call me not amused.
Again thanksWednesday, October 28, 2009 4:41 PM