Fdocuments - in Pro SQL Server 2005 Replication
Fdocuments - in Pro SQL Server 2005 Replication
7/30/2019 SERVER
SQL Server 2005 Replication
Pro
SQL Server 2005
Replication
A comprehensive guide to developing, administering, and
mastering the complexities of replication with SQL Server 2005
Sujoy P. Paul
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 1/21
7/30/2019 Pro SQL Server 2005 Replication
Sujoy P. Paul
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 2/21
7/30/2019 Pro SQL Server 2005 Replication
ISBN-13: 978-1-59059-650-0
ISBN-10: 1-59059-650-1
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
Lead Editor: Jim Sumser
Technical Reviewer: Judith Myerson
Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan Gennick,
Jonathan Hassell, James Huddleston, Chris Mills, Matthew Moodie, Dominic Shakeshaft,
Jim Sumser, Keir Thomas, Matt Wade
Project Manager: Sofia Marchant
Copy Edit Manager: Nicole Flores
Copy Editor: Andy Carroll
Assistant Production Director: Kari Brooks-Copony
Production Editor: Ellie Fountain
Compositor: Dina Quan
Proofreader: Linda Seifert
Indexer: Carol Burbo
Artist: Kinetic Publishing Services, LLC
Cover Designer: Kurt Krames
Manufacturing Director: Tom Debolski
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail [email protected], or
visit http://www.springeronline.com.
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley,
CA 94710. Phone 510-549-5930, fax 510-549-5939, e-mail [email protected], or visit http://www.apress.com.
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution
has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability
to any person or entity with respect to any loss or damage caused or alleged to be caused directly or
indirectly by the information contained in this work.
The source code for this book is available to readers at http://www.apress.com in the Source Code section.
You will need to answer questions pertaining to this book in order to successfully download the code.
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 3/21
7/30/2019 Pro SQL Server 2005 Replication
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 4/21
7/30/2019 Pro SQL Server 2005 Replication
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 5/21
7/30/2019 Pro SQL Server 2005 Replication
Contents at a Glance
sINDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 961
v
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 6/21
7/30/2019 Pro SQL Server 2005 Replication
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 7/21
7/30/2019 Pro SQL Server 2005 Replication
Contents
Distributed Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Methods of Distributing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Distributed Data Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
SQL Server 2005 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Quick Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Components of Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Distributor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Publisher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Subscriber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Publication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Article . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Physical Replication Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Publisher/Distributor–Subscriber Model . . . . . . . . . . . . . . . . . . . . . . . 27
Central Publisher–Multiple Subscribers Model . . . . . . . . . . . . . . . . . . 27
Central Subscriber–Multiple Publishers Model . . . . . . . . . . . . . . . . . . 29
Multiple Publishers–Multiple Subscribers Model . . . . . . . . . . . . . . . . 30
Installing and Configuring Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Installing SQL Server Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Configuring with the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Configuring Database Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Configuring with T-SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
vii
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 8/21
7/30/2019 Pro SQL Server 2005 Replication
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Quick Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 9/21
7/30/2019 Pro SQL Server 2005 Replication
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 10/21
7/30/2019 Pro SQL Server 2005 Replication
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 11/21
7/30/2019 Pro SQL Server 2005 Replication
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 12/21
7/30/2019 Pro SQL Server 2005 Replication
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 13/21
7/30/2019 Pro SQL Server 2005 Replication
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 14/21
7/30/2019 Pro SQL Server 2005 Replication
sINDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 961
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 15/21
7/30/2019 Pro SQL Server 2005 Replication
xv
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 16/21
7/30/2019 Pro SQL Server 2005 Replication
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 17/21
7/30/2019 Pro SQL Server 2005 Replication
sJUDITH M. MYERSON is a systems architect and engineer. Her areas of interest include middle-
ware technologies, application development, web development, software engineering,
network management, servers, security management, information assurance, standards,
RFID technologies, and project management. Judith holds a Master of Science degree in
engineering, and is a member of the IEEE organization. She has reviewed/edited a number
of books, including Hardening Linux, Creating Client Extranets with SharePoint 2003, and
Microsoft SharePoint: Building Office 2003 Solutions.
xvii
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 18/21
7/30/2019 Pro SQL Server 2005 Replication
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 19/21
7/30/2019 Pro SQL Server 2005 Replication
Acknowledgments
First of all, I would like to thank Mr. Jim Sumser, without whose constant encouragement and
support this book would not have been possible. I would also like to thank Mr. Andy Carroll, Ms.
Ellie Fountain, Ms. Kylie Johnson, Ms. Sofia Marchant, Ms. Judith Myerson, and the rest of the
Apress team for their unending patience and superb professionalism in constantly striving for
excellence. They also gave me sufficient time even when the deadlines had elapsed. I sincerely
appreciate that.
I would like to thank my parents for helping me in pursuing my dreams, and my sister,
Manashi, who taught me how to dream and helped develop the savoir faire in me. I would also
like to thank Didi, Ajoyda, Mohor, Gogol, Ma, Anjanda, Shweta, and my dear friend Bob for
being there for me. Finally, I would like to thank my wife, Aditi, who suffered the most during
this venture. Her tireless support in proofreading my writing, editing the figures every day and
night, and bearing all of this with a smile on her face made it all the more worthwhile.
xix
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 20/21
7/30/2019 Pro SQL Server 2005 Replication
http://slidepdf.com/reader/full/pro-sql-server-2005-replication 21/21