I am attempting to strip a database of its current UID pks (while retaining the column) as part of a conversion process which will use all int keys.
SSMS 2008 (SQL Express 2008) - Database originally created in SQL 2000.
SQL 2008 full also installed if it helps.
A number of the tables have a UID pk which is ROWGUID=yes
It seems the ROWGUID designation is only found in the KEY properties. I can turn it off there but I'd like to do it as part of a script. If I do a SCRIPT TO on the key or the index I don't see anything indicating the column is a rowguid.
SMO still sees the column as a rowguid after the PK is dropped and the key and index no longer shows in SSMS.
I am a TSQL idiot, so feel free to speak slowly and use small words ;-)
Guidance appreciated. TIA
Did you try:
ALTER TABLE dbo.<table>
ALTER COLUMN <column>
DROP ROWGUIDCOL;
If you're going to become proficient with altering tables via script (which is a great idea, since it is source controllable, much more repeatable and far less error-prone than using the UI), I'd bookmark the ALTER TABLE topic in Books Online.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With