insert into system tables

0 pts.
Tags:
SQL Server
I'm trying to do inserts into system table - e.g. insert into sys.extended_properties values(1, 'OBJECT_OR_COLUMN', 1973582069,3, 'MS_Description', 'Code used by the State for reporting purposes') But i get this error: Msg 259, Level 16, State 1, Line 1 Ad hoc updates to system catalogs are not allowed. The reason for my doing this that there are over 600 tables in the database and the "description" for some of the columns in the tables will be the same, for example, create_date. Thus i'm trying to do a mass insert into the system tables so that i don't have go into each table and type the same description. Thank you for your help.
ASKED: July 24, 2007  9:44 AM
UPDATED: October 5, 2007  8:27 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I’m SQL 2005 you can’t actualy write to the system tables, because there are no system tables any more. You will need to generate dynamic code to run the sp_addextendedproperty procedure to add the extended property you are trying to add. You can lookup sp_addextendedproperty in Books OnLine to get the full syntax of the procedure.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following