Presentation is loading. Please wait.

Presentation is loading. Please wait.

 Replication is the process of copying database information  Replication is used for:  Backing up your database  Migrating to a new server  Mirroring.

Similar presentations


Presentation on theme: " Replication is the process of copying database information  Replication is used for:  Backing up your database  Migrating to a new server  Mirroring."— Presentation transcript:

1

2  Replication is the process of copying database information  Replication is used for:  Backing up your database  Migrating to a new server  Mirroring  Syncing with Subscriber servers What is Replication?

3 PUBLISHER Server that stores source data SUBSCRIBER Server that receives replicated data DISTRIBUTOR Server that monitors changes and updates Publisher. Can be on Publisher side (push), or Subscriber side (pull), or on it’s own machine. The distributor should be placed on the most powerful server. Types of Servers Used in Replication

4 SNAPSHOT Copy of the database from a specific time. Similar to creating a system image of a hard drive. MERGE Starts as Snapshot, then changes are tracked with triggers. Subscribers are synched as they connect. Used when Subscribers are often working offline. TRANSACTIONAL Starts with Snapshot, then Distributor updates Subscribers in near real-time. PEER-TO-PEER Based on Transactional foundation, but both servers are at the same hierarchical level. ORACLE PUBLISHER Used when migrating from Oracle server to SQL Server Types of Replication

5 Programs or services that manage the replication process SNAPSHOT AGENT All replication processes use this agent. Generates snapshot and writes information to the file system. Is located on the Publisher server DISTRIBUTION AGENT Applies snapshot to Subscribers in Snapshot Replication, applies changes in Transactional replication Runs on Distributor server MERGE AGENT Detects changes on Publisher and Subscriber and pushes changes from Publisher to Subscriber. Contains conflict resolution processes, and created a conflict table to store conflicting values. LOG READER Used only by Transactional replication. Moves transactions from transaction log to Distributor server. Replication Agents

6 It’s All Wizards!!! Setting Up Replication on SQL SERVER

7 1.Inside SSMS, connect to instance of server and right click the Replication folder inside “Databases” 2.Select “Configure Distributor” 3.If Distributor is on remote server, you must indicate the UNC path 4.On the Distribution Database Page, change the name of the database and specify a location 5.You can enable other Publisher servers to use this Distributor from the Publishers page 6.If you like, you can create a script of all the actions from the Wizards Action page 7.Configuration Begins!!! Configuring the Distributor

8 1.Right click Local Publications folder inside Replication folder and select “New Publication” 2.Select the database and choose the type of Publication you want to set up 3.Replicated objects are referred to as articles. Select which objects to replicate. 4.Under Set Properties, you can choose to replicate constraints, triggers, indexes, etc. 5.You may specify only certain rows to replicate by utilizing a WHERE clause 6.Select when to create the Snapshot and how often 7.For security, you can specify which account the Snapshot Agent and Log Reader Agent will run. Be careful with this, as the selected account may have authority beyond replication 8.The new Publisher will be shown under Replication => Local Publications Configure Transactional Publisher

9 1.Expand replication folder and right click Local Subscriptions folder. Select New Subscriber. 2.You may then select whether to run the Distributor from the Subscriber machine or the Publisher machine. In general, it is best to run it from the more powerful machine 3.Select your Subscriber Database 4.As with the Publisher, you may select the account under which the Subscriber runs. 5.You may configure the synchronization timing from the Synchronization Schedule window. You can run continuously, on demand, or set a schedule 6.Select whether to initialize immediately or at first synchronization Configure Transactional Subscriber

10 SQL Server allows you to monitor all Publishers, Subscribers, and Distributors from a graphical interface This interface reports on the health of the various machines and all agents that are running. SQL Server Agent also allows you to start and stop each individual agent. Replication Monitoring

11 You Have Now Successfully Replicated!!!


Download ppt " Replication is the process of copying database information  Replication is used for:  Backing up your database  Migrating to a new server  Mirroring."

Similar presentations


Ads by Google