all groups > sql server replication > january 2007 >
You're in the

sql server replication

group:

Converting to use replication


Converting to use replication Nick Zdunic
1/28/2007 5:38:01 AM
sql server replication:
I have a DB running under SQL 2005. I would like to enable the database for
replication to offline clients (SQLExpress) and SQL Server 2005 Compact
Edition.

Will converting the primary keys of the database to use GUID's be sufficient
Re: Converting to use replication Hilary Cotter
1/28/2007 9:25:04 PM
No, don't do this. Replication will add its own GUID key.

--
Hilary Cotter

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Re: Converting to use replication Nick Zdunic
1/28/2007 10:49:01 PM
I know that it does this, but my keys are autonumber fields, so wouldn't it
be better to convert them to GUIDs so that clashes don't occur later on.

Because the fields are GUIDs SQL server shouldn't need to add GUIDs - or
will this still occur even when GUIDs are already present?

[quoted text, click to view]
Re: Converting to use replication Nick Zdunic
1/29/2007 3:07:34 AM
Might still go with GUIDs - as the number of clients could vary so it will be
easier to manage.

So will using GUIDs stop the extra GUID being added by SQL Server?

[quoted text, click to view]
Re: Converting to use replication Hilary Cotter
1/29/2007 5:52:31 AM
Either consider automatic identity range management or use different seeds
on either side, i.e. even on one side, odd on another.

--
Hilary Cotter

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Re: Converting to use replication Nick Zdunic
2/1/2007 2:29:00 PM
Int's will be faster, but with more than 5 replicas and maybe even 10 to 50
managing autonumber fields would be a nightmare.


[quoted text, click to view]
Re: Converting to use replication JE
2/1/2007 10:30:28 PM
You can add your own GUID field and call it what you want. Replication
needs a uniqueidentifier field with the ROWGUIDCOL property set. If it
finds an existing one it will use that instead of creating a new one.
Just remember to set the field default to (newid()).

I agree with the advice not to set your primary key to a GUID. You will
run into performance problems when the table grows. Searching an integer
index is much faster than searching an GUID index. Auto identity
requires management, but it is definately the way to go.



[quoted text, click to view]
AddThis Social Bookmark Button