• Maqsood Ahmad (10/23/2008)


    Through some how I want to change system catalog (syscolumns table)

    In syscolumns table there is a column "colid" I want to change the value of this colid.

    Nope. Can't be done. System tables can not be modified in 2005 and higher. Besides, syscolumns isn't even a table. It's a view these days

    Besides, if you did find a way to do this, the first time you made a change you would mess the system up so badly that you would probably have to restore a backup. The colids are used internally in the indexes, in the constraints and in a number of other places. If you did manage to change a colid and you didn't find every single place it was referenced, you would be corrupting the database and potentially it would become suspect the next time SQL has to recover it (like at DB start)

    Either add your own metadata column that you maintain, or change the .net code so that it can handle gaps.

    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