Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

replace a unique clustered index with a clustered PK

$
0
0

What it the best technique for this?

Doing a little database cleanup, we have a moderately large table 1.2m rows, with a dozen nonclustered indexes, and a unique clustered index that is not defined as the PK.

If I could just say the magic word and CALL it a PK, I guess my work would be done, but I don't know that that is possible.  We want to start doing transactional replication on it, so need the official PK.

Actually if I just drop the CI and alter table for the clustered PK it won't take THAT long, but of course it's inelegant!  So what is the optimal method here? 

Disable the NCI, drop, alter, enable?

Thanks,

Josh


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>