Groups | Blog | Home
all groups > sql server replication > june 2006 >

sql server replication : how to replicate schema changes


tom d
6/6/2006 4:51:01 PM
Hi all,
I have a large db that I'm going to set up relication to replicate to a
different server. it's about 300 tables and a lot of tables with milion
milion rows of data. This is a vendor's db and the schema is going to be
changed very week through SQL scripts.

Questions:

1. what is the best and most efficient way to create an initial replication?

2. Can db backup and restore being used to save time of loading data?

3. what is the best way to handle weekly schema changes without reloading
data? and how?

Thanks,
Hilary Cotter
6/6/2006 8:08:38 PM
1) SQL DMO is an option as you can iterate each table with a pk and publish
it.
2) yes, but you have to do a lot of work to get this working in SQL 2000. In
SQL 2005 do an initialize with backup.
3) log shipping. With SQL 2005 you can replicate ddl. With SQL 2000 use
sp_repladdcolumn or sp_repldropcolumn for schema changes. With many schema
changes log shipping makes a lot of sense.
--
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]

Paul Ibison
6/7/2006 12:00:00 AM
Tom,
for (1) and (2) you can consider a nosync initialization:
http://www.replicationanswers.com/NoSyncInitializations.asp
For (3) many changes can be done using sp_repladdcolumn and
sp_repldropcolumn. For more complicated changes please look at
http://www.replicationanswers.com/AddColumn.asp
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

AddThis Social Bookmark Button