SQL Server Replication
SQL Server Replication
SQL Server Replication
---------------------------logshipping
database mirroring
always on
clustering
all are database level or instance leve
--------------------------------------replicaiton is on object level, we can select tables/columns as candidate for re
plication.
-------------------------------------four type of replication
snapshot
(it is one way, set some interval for sanpshot, it is not recommned for big data
base as in each snapshot it will take the full database copy from primary to sec
ondary, very small databases are ok for this type of rep)
transactional
(it is one way replicaiton, changed data/transactions are moving to the secondar
y server.
merge
it is two way replication/bi directional
conflict resolution is very high and it will solve many conflicts.
peer to peer
it is two way replication/bi directional
it is easy but need some
-------------------------------------- terms -----------------------keyword
publisher
--- Creates publication in the publisher, creates articles (tabl
es, views, stored proceudre)
subscription
--- create subscription on subscriper for the publication.
Distributor
--- takes articles from publisher and sends to subscriber
log reader agent -- this component will read the changes occuring on the publish
ers and writes it in the distribution database (it is a queue database) updating
by a windows process. it is better to have a seperate server for distibutor dat
abase.
distribution agent -- this component will read the changes from distributed data
base and apply on the subscriber.it can be on the subscriber server. when the di
stribution agent will be on subscriber server its mode will be PULL SUBSCRIPTION
.