Alter constraints - non-clustered PK -> Clustered PK

  • schleep

    SSChampion

    Points: 12529

    Hi all,

    In SQL 2K (or SQL 2K8), is it possible to programmatically alter the PK constraints on the tables from nonclustered to clustered? When they're referenced by FKs?

    Or do I have to climb all the way down the referential tree, and drop and re-create the PKs from the bottom up?

    We're upgrading to SQL 2K8, and the lack of clustered indexes is becoming apparent.

    Thanks!

    P

  • Jack Corbett

    SSC Guru

    Points: 184296

    Don't think you can do it without dropping all the FK's and then dropping and recreating the PK and then re-adding the FK's


    Jack Corbett Consultant Straight Path Solutions Dont let the good be the enemy of the best. -- Paul FlemingAt best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at workCheck out these links on how to get faster and more accurate answers: Forum Etiquette: How to post data/code on a forum to get the best helpNeed an Answer? Actually, No ... You Need a QuestionHow to Post Performance Problems[/url]Crosstabs and Pivots or How to turn rows into columns Part 1[/url][url url=http://www.sqlservercent

  • schleep

    SSChampion

    Points: 12529

    Thanks Jack,

    That's what I was afraid of.

    Ah well, it needs doing, so....

    P

Viewing 3 posts - 1 through 3 (of 3 total)

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