Metadata updating

  • Is there syntax for an script to update metadata, i guess what i am trying to say is. Cant you write a script to update metadata that does not involve the use of calling a stored proc. ?

  • If you're talking about directly updating the actual system tables then no, absolutely not.

    The stored procs and related commands that do that are there for a reason. On SQL 2000 it was possible to directly update the system tables, most people who did so caused themselves (or their replacements) massive headaches.

    What are you trying to do?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Awesome that is absolutely what i needed to know. i just couldn't understand why i was asked to do this task, and my research revealed others use a sp. Obviously calling an sp would be much easier.

    Thank you very much,

    These forums are like school for people new to this like me.

  • What are you trying to do?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I was asked to code a script to update metadata in columns & tables.

  • The column names, column data types, that kind of thing?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • yeah that kind of thing

    # Research how to update database table metadata columns for table and column comments

    # Write a sample script on how to update table and column comment

  • Column names and data types you chance with an ALTER TABLE statement. When you say comments, do you mean extended properties?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • yes extended properties

  • look up

    fn_listextendedproperty

    sys.extended_properties

    for viewing extended properties

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • I wanted to think everybody for their help, SQL and databases is a massive topic and there is so much to learn. I think its really awesome that people share knowledge so freely so up and comers like myself can eventually become developers/dba's.

    Your help is absolutely appreciated.

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply