What should RowGuid be set to?

Author Message
 Posted 2/7/2007 5:06:33 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: Forum Members
Last Login: 7/22/2016 7:38:28 PM
Posts: 386, Visits: 2,049
Hi,
I'm recreating test set of tables from an existing database into DDT. We use GUIDs throughout as the PK for each table and I notice the tables created by the DDT all have their RowGuid property set to No whereas the current tables are all set to Yes. The defualt value for the PKs are are to (newid()).

In all original tables we set RowGuid to Yes because that, is indeed, what the column is however I not sure what would have happened had we said No.

My question is: should I change all the settings in DDT so that all out GUID PK's have a RowGuid value of Yes?

TIA - Peter

Post #6630
Add to Twitter Add to Facebook
 Posted 2/8/2007 3:09:35 AM
StrataFrame Developer

StrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame Developer

Group: StrataFrame Developers
Last Login: 8/15/2017 8:17:40 AM
Posts: 6,609, Visits: 6,768
Peter,

I am sorry but I am confused by your post.  The DDT has full support to allow you to create GUID PKs.  I do not understand what you are trying to do here.  What do you mean by the following statement?

We use GUIDs throughout as the PK for each table and I notice the tables created by the DDT all have their RowGuid property set to No whereas the current tables are all set to Yes.
Post #6637
Add to Twitter Add to Facebook
 Posted 2/8/2007 10:04:17 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: Forum Members
Last Login: 7/22/2016 7:38:28 PM
Posts: 386, Visits: 2,049
Hi,

I probably made my question sound more complex than it should. Let me rephrase it:

When I set the primary key for a table definition in DDT to GUID when the table is created in SQL Server 2005 the value for the RowGUID property is set to No. I don't really understand what this property actually does and I would like confirmation that a RowGUID of No is correct.

Cheers, Peter

Post #6654
Add to Twitter Add to Facebook
 Posted 2/9/2007 9:37:09 AM
StrataFrame Developer

StrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame Developer

Group: StrataFrame Developers
Last Login: 10/2/2017 2:30:51 AM
Posts: 2,980, Visits: 2,478
Yes, the setting of RowGuid=No is correct for a GUID pk.  The RowGuid is used by SQL Server replication to uniquely identify rows across replicated databases (i.e. you have have two records with the same PK on different servers and when you replicate one database into the other, SQL Server will handle it).  So, the RowGuid property of a column is independent from the primary key.  Generally, when you use replication and a GUID pk, you can make them the same column.
Post #6673
Add to Twitter Add to Facebook
 Posted 2/9/2007 10:04:50 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: Forum Members
Last Login: 7/22/2016 7:38:28 PM
Posts: 386, Visits: 2,049
Hi Ben,

Thanks for that. Actually this is interesting because the reason we use GUIDs is that the app does support replication. So, in this case, should we be changing the RowGUID value to Yes?

Cheers, Peter

Post #6682
Add to Twitter Add to Facebook
 Posted 2/9/2007 10:10:51 AM
StrataFrame Developer

StrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame Developer

Group: StrataFrame Developers
Last Login: 10/2/2017 2:30:51 AM
Posts: 2,980, Visits: 2,478
Replication requires that all tables being replicated have a RowGuid somewhere on the table, so yeah, I would go ahead and turn it on on your PK columns... there's no reason to have another 16 bytes per record taken up by another GUID when you already have one Smile
Post #6684
Add to Twitter Add to Facebook


Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.