Presentation is loading. Please wait.

Presentation is loading. Please wait.

Module 1: Exploring Replication. Overview Understanding SQL Server Replication Setting Up Replication Understanding Agents in Replication Securing Replication.

Similar presentations


Presentation on theme: "Module 1: Exploring Replication. Overview Understanding SQL Server Replication Setting Up Replication Understanding Agents in Replication Securing Replication."— Presentation transcript:

1 Module 1: Exploring Replication

2 Overview Understanding SQL Server Replication Setting Up Replication Understanding Agents in Replication Securing Replication

3 Lesson: Understanding SQL Server Replication Business Problems That Require Replication The Publisher-Subscriber Metaphor (Articles and Publications; Subscriptions) Autonomy and Latency Contrasting Replication with Other Data Distribution Methods Course Scenario: The Needs of Northwind Traders

4 Business Problems That Require Replication Multiple users or locations need copies of the same data Remote users at distant locations Mobile disconnected users Need to improve local performance Physically separate data based on usage Improve response time by data aggregation Distribute database processing across multiple servers Scale out read-only data Partition data based on business unit needs

5 Multimedia: Microsoft SQL Server Replication This animation reviews the concepts behind SQL Server replication. Snapshot replication Transactional replication Merge replication

6 The Publisher-Subscriber MetaphorPublisherPublisher Maintains source databases Makes data available for replication DistributorDistributor Receives data changes Stores metadata, history, and receives and stores changes May forward changes to Subscribers Holds copy of dataSubscriberSubscriber

7 Publications and Articles Articles All tables or parts of tables Views Stored procedures User-defined functions Publications One or more articles Basis of subscription One or more per database SubscriptionSubscription Publication Articles

8 Publication B Publication A Subscriptions Push subscription Pull subscription

9 Autonomy and Latency Snapshot replication Transactional replication Updatable snapshot replication Updatable transactional replication Lower autonomy Lower latency Lower autonomy Lower latency Higher autonomy Higher latency Higher autonomy Higher latency Merge replication Distributed transactions

10 Contrasting Replication with Other Data Distribution MethodsMethodMethod Replication Distributed transactions Distributed queries Back up and restore AutonomyAutonomy Variable Low High Data Transformation Services (DTS) Special use only LatencyLatency Variable, depending on type Low High Special use only

11 Course Scenario: The Needs of Northwind Traders Distribute their product catalog to regional centers Mobile disconnected sales force must take orders Sales information is reported to headquarters

12 Lesson: Setting Up Replication Preparing SQL Server for Replication Locating the Distribution Database What Is Snapshot Replication? What Is Transactional Replication? What Is Merge Replication? Guidelines for Choosing a Replication Type Creating Subscriptions by Using SQL Server Enterprise Manager Scripting

13 Preparing SQL Server for Replication Limit domain permissions to prevent unauthorized access. Configure the SQL Server Service account Need not be run under local or domain administrator account Configure the SQL Server Agent account Need not be run under local or domain administrator account Must have access to each SQL Server involved in replication Assign additional permissions Create a file system share on the Distributor

14 Practice: Create a Shared Folder for Replication Snapshots Create a shared folder for the replication snapshots

15 Locating the Distribution Database localDistributorlocalDistributor Subscribers Publisher/ Distributor remoteDistributorremoteDistributor Subscribers Distributor Publisher

16 Practice: Locating the Distribution Database Select and register a replication partner Install replication, locating the replication database

17 What Is Snapshot Replication? Distributes data as it appears at a moment in time Does not monitor for updates to the data Takes longer to propagate data modifications A point in time snapshot image

18 What Is Transactional Replication? Permits immediate replication of data modifications Uses the following steps: Initial snapshot propagation Data modified at Publisher Individual transactions captured Transactions propagated to Subscribers

19 What Is Merge Replication? Allows sites to work autonomously Merges the updates between sites when they are connected

20 Guidelines for Choosing a Replication Type Snapshot replication Data does not change often New data need not be immediately distributed Transactional replication Data modifications propagated in seconds Transactions applied completely or not at all Merge replication Multiple Subscribers need to update at various times Site autonomy is critical

21 Creating Subscriptions By Using SQL Server Enterprise Manager Scripting Replication supports Transact-SQL scripting Use SQL Server Enterprise Manager scripting menus

22 Lesson: Understanding Agents in Replication Replication Agents SQL Server Agent Scheduling Replication with SQL Server Agent Agent Profiles

23 Replication Agents SnapshotSnapshot Snapshot Agent Distribution Agent TransactionalTransactional Snapshot Agent Distribution Agent Log Reader Agent Queue Reader Agent MergeMerge Snapshot Agent Merge Agent

24 SQL Server Agent Starting Agents Scheduled jobs Command line ActiveX controls sqlinitx.dll sqldistx.dll sqlmergx.dll

25 Scheduling Replication with SQL Server Agent Continuous Least latency Suitable for well-connected Subscribers with available network bandwidth Scheduled Any frequency Suitable for synchronizing data during off-peak hours On-demand Administrator or application explicitly invokes Suitable for mobile disconnected users

26 Agent Profiles

27 Lesson: Securing Replication The Role of Agents in Securing Replication Troubleshooting Security Context Issues Securing Replication By Using SQL Server Roles Gaining Access to a Publication Securing the distributor_admin Login

28 The Role of Agents in Securing Replication SQL Server Agent account provides the security context for running jobs Replication is a series of jobs Initial security context is job owner account Job runs under SQL Server Agent account Managing validation failure SQL Server Service security context User-based security for Windows 9 x

29 Troubleshooting Security Context Issues Finding information about security context issues SQL Server Agent error log Windows event log Recognizing security context issues Replication Agent does not start Error 8198 Resolving security context issues Change the owner of the replication job Use another login

30 Securing Replication by Using SQL Server Roles sysadmin can: Enable, modify, or drop a Distributor, Publisher, or Subscriber Enable a database for replication Configure an agent profile Monitor a replication agent sysadmin or db_owner can: Create, drop, modify, or grant access to a publication Create, or delete a subscription Enable snapshots for File Transfer Protocol downloading using the Internet. Initiate cleanup of the distribution database Schedule jobs ( db_owner of the msdb database)

31 Gaining Access to a Publication

32 Securing the distributor_admin Login Distributor_admin is a special-purpose login Set a password for the distributor_admin account Change password with: sp_changedistributor_password Distributor tab of the Publisher and Distributor Properties in SQL Server Enterprise Manager

33 Review Understanding SQL Server Replication Setting Up Replication Understanding Agents in Replication Securing Replication


Download ppt "Module 1: Exploring Replication. Overview Understanding SQL Server Replication Setting Up Replication Understanding Agents in Replication Securing Replication."

Similar presentations


Ads by Google