rowguid col added | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

rowguid col added


I have a few tables without a PK or unique constraint The merge replication added the uniqueidentifier as the rowguid So, I’d like to make that the table’s PK I’d like to know if this would create any unforseen, un-desired effects
Thanks
g.

If you want to add that column by your own and let SQL Server use it in merge replication, your rowguid column should have the following properties: – Should be of Uniqueidentifier datatype
– Should have the ROWGUIDCOL property set
– Should not allow NULLs
– Should have a default of newid() If the table already contains a column with the ROWGUIDCOL property that has a unique index or primary key constraint, SQL Server will use that column automatically as the row identifier for the publishing table. Otherwise, SQL Server adds a uniqueidentifier column, titled ROWGUID, which has the ROWGUIDCOL property and an index, to the publishing table. You cannot specify a varchar column as a GUID for Merge.
Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.

All of this is present: – Should be of Uniqueidentifier datatype
– Should have the ROWGUIDCOL property set
– Should not allow NULLs
– Should have a default of newid()
What I was asking is that since I don’t have a PK in the table, would it be smart to make the above ‘auto-generated’ column my table’s PK ? any adverse effects ?
I don’t foresee any issues. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>