Exforsys

SQL Server 2005 Training

  1. SQL Server 2005 - Configuring Replication
  2. SQL Server 2005 Replication Enhancements
  3. SQL Server 2005 - Mirror Server
  4. SQL Server 2005 - Introduction to Data Availability
  5. SQL Server 2005 - Backing up a Database
  6. SQL Server 2005 - Using Database Snapshots
  7. SQL Server 2005 - Disaster Recovery
  8. SQL Server 2005 - Managing Certificates
  9. SQL Server 2005 - Managing Permissions
  10. Managing SQL Server 2005 Security
  11. SQL Server 2005 - Using the Database Tuning Advisor
  12. SQL Server 2005 - Tuning a Database
  13. Maintain indexes in a SQL Server 2005 database
  14. SQL Server 2005 - Defining Indexes
  15. SQL Server 2005 - Database Backup
  16. SQL Server 2005 - Populating the Database
  17. SQL Server 2005 Configuration Manager
  18. SQL Server 2005 - Using the Sqlcmd Utility
  19. Using the SQL Management Objects
  20. Using SQL Sever Management Studio - Part 2
  21. Using SQL Sever Management Studio - Part 1
  22. SQL Server 2005 - Using Event Notifications
  23. SQL Server 2005 - Using DDL Triggers
  24. SQL Server Monitoring Tools - Server Profiler
  25. SQL Server 2005 - Testing Troubleshooting
  26. SQL Server 2005 - Upgrading from earlier versions of SQL Server
  27. SQL Server 2005 Installation - Maintenance Plan Without Using Wizard
  28. SQL Server 2005 - Unattended Installations
  29. SQL Server 2005 Installation - Maintenance Plan Using Wizard
  30. Installing a Second Copy of SQL Server 2005
  31. Planning to Install SQL Server 2005
  32. SQL Server 2005 Installation
  33. SQL server 2005 Editions
  34. SQL Server 2005 Architecture Overview
  35. SQL Server 2005 - Management studio interface Summary Page
  36. SQL Server 2005 - Server Groups
  37. SQL Server 2005 - Registered Servers
  38. SQL Server 2005 Administrative Tools
  39. Developing Client applications in SQL Server 2005
  40. SQL Server Management Objects
  41. NET CLR in SQL Server 2005
  42. Native HTTP Support in SQL Server 2005
  43. XML Data Types in SQL Server 2005
  44. Using XML in SQL Server 2005
  45. Using Notification Services in SQL Server 2005
  46. SQL Server 2005 - Service Broker
  47. Data Manipulation Language (DML) in SQL Server 2005
  48. T-SQL Enhancements in SQL Server 2005
  49. Security Features in SQL Server 2005 for the Developer
  50. SQL Server Architecture and Components
  51. SQL Server 2005 Management Studio
  52. Overview of SQL Server 2005 for the Database Developer
  53. Getting started with SQL Server 2005

Ads


Home arrow Technical Training arrow SQL Server 2005 Training

SQL Server 2005 Replication Enhancements

Author : Exforsys Inc.     Published on: 11th Jan 2006

SQL Server 2005 Replication Enhancements

In this tutorial you will learn about Overview of Replication Enhancements, User Interface Enhancements, Merge replication concurrency Enhancements, Programming changes, The Replication Monitor, Performance and Scalability Features, Pre-computed partitions, Updates to unique keys, Transactional parallelism, Download and upload only articles, Reduced contention and Managing replication.

Ads

Overview of Replication Enhancements

The most striking aspects of the enhancements made to SQL Server 2005 replication services are that configuration wizards have been made simpler and shorter and performance and scalability have been improved.

User Interface Enhancements

The first of these is the wizard enhancements. These have been redesigned with fewer pages(40% less), simplification of pages, improved default values and auto detection and less branching. These wizards can be used to implement or generate scripts for later execution against a server instance.

New subscriptions wizards have been introduced. The Push Subscription Wizard and the Pull Subscription Wizard of the earlier versions have been merged into a single wizard tool called the New Subscription Wizard. This wizard includes an ability to simultaneously create multiple subscriptions with different properties for a publication. This greatly decreases the effort required for setting up replication for small deployments. All subscriptions can be generated by running the wizard once. Larger deployments can be managed by generating scripts for later execution.

Merge replication concurrency Enhancements

Concurrency issues occur when merge replication of a delivery fails halfway through a process. This may require all the tables to be updated or none should be updated. SQL Server 2005 introduces the concept of logical records that enable the DBA define relationships between merge table articles. This ensures that related rows are all delivered together and that concurrency issues do not occur.

Programming changes:

SQL Server 2005 introduces the Replication Management objects(RMO) to implement all the programming needs within the replicated system. Since the RMO is a managed application programming interface, it can be used in .NET applications without use of complex COM interoperability code. Though SQL DMO is still supported new projects should be designed using RMO.

The RMO has a .NET assembly library that can be used by developers to program replication tasks. It is implemented in a library called Microsoft.SqlServer.Rmo.dll. The object model can be used by developers to work with individual classes without traversing the entire object model. It also has the capability of caching objects while they are in use and it allows the garbage collector clear unused memory. This enhances scalability.

Other types of objects that can be replicated are .NET user defined types and .NET assemblies.

The Replication Monitor

The replication monitor tool is a new introduction in SQL Sever 2005. This tool lets users monitor replications on a server. It functions independent of the SQL Server Management Studio and allows delegation of monitoring tasks to non-administrators. Since it is an independent application it can function in the passive mode without impacting the server.

The Replication monitor helps identify performance issues before they attain criticality and endanger the stability of the applications. Acceptable performance thresholds for a publication can be defined. When the threshold is reached, alerts can be used to warn the user.

Information is displayed in the Replication monitor is updated at an interval of a minute by default. This information is executed as part of the Replication monitoring refresher for distribution job and the results are cached to reduce the number of queries and calculations when different pages are selected in the monitor. The Publisher settings can be configured in the dialog box of the Replication Monitor and the refresh rate is defined. More resources are used when the refresh rate is set at a high value.

The replication monitor helps, DBAs easily and quickly identify any articles that impact performance issues. The upload and download statistics provide fine granular performance data.

The replication monitor enables the tracking of latency of transactional replication. Real time system analysis can be performed using tracer tokens that store the time of committal of transactions.

Performance and Scalability Features

The goal of the replication in SQL Server 2005 was to service a large number of subscribers. A number of enhancements have been made to improve the performance and scalability capabilities of the product.

Pre-computed partitions

Earlier versions of SQL Server required that rows replicated to subscribers be evaluated at the start of the synchronization with the subscriber. This becomes a performance bottleneck which SQL Server 2005 tries to overcome by introducing precomputed partitions that evaluate partition member ship when changes are made to data. The data transfer process begins when synchronization starts.

Updates to unique keys

SQL Server 2005 replicates the changes to the unique keys as UPDATE statements instead of DELETE statements of SQL Server 2000. This results in improved performance.

Transactional parallelism

In transaction replication the rate of transaction transfer from the publisher to the distributor using the log agent is minimal but the rate of transfer to subscribers from the distributor left much to be desired in the earlier versions of the server. The reason for this poor performance was that transactions which in the publisher occurred in parallel from multiple clients were being transferred in serial from the distributor to the subscriber. In SQL Server 2000 this issue is solved by enabling the Independent Agent option of the publication to be used per publication per subscriber. In SQL Server 2005 this is enabled by default.

Download and upload only articles

In replication scenarios where subscribers only use a subset of the data and there is no requirement of merging the data, the change tracking metadata is not required to be transferred. The publication which meets this requirement is to be marked as download-only article and the performance of the application would vastly improve.

Reduced contention

Contention can be reduced on subscribers that are created for reporting purposes by using snapshot isolation levels.

Managing replication

Replication in SQL Server 2005 can be managed using the new and upgraded features. Subscribers can be initialized by using standard backup and restore procedures or by using any standard method of copying a database or by using dynamic snapshots for filtered merge replication subscriber. Subscription becomes immediately available when the subscription is created if these initializing methods are used.

Ads

If snapshot delivery is interrupted, the snapshot agent becomes active and automatically resumes the delivery.

Replication of DDL statements are automatic for ALTER TABLE, ALTER VIEW, ALTER PROCEDURE, ALTER FUNCITON and ALTER TRIGGER. This function can be disabled in SQL Server Management Studio by setting the Replicate Schema changes property in the Subscription options of the publication to False. The sp_changepublication stored procedure can be called when developing scripts using the replicate_ddl parameter to enable and disable replication of DDL statements.

Finally, Anonymous subscriptions can be created without being predefined by the publisher to reduce the management tasks associated with creating subscriptions for popular publications.



 
This tutorial is part of a SQL Server 2005 Training tutorial series. Read it from the beginning and learn yourself.

SQL Server 2005 Training

  1. SQL Server 2005 - Configuring Replication
  2. SQL Server 2005 Replication Enhancements
  3. SQL Server 2005 - Mirror Server
  4. SQL Server 2005 - Introduction to Data Availability
  5. SQL Server 2005 - Backing up a Database
  6. SQL Server 2005 - Using Database Snapshots
  7. SQL Server 2005 - Disaster Recovery
  8. SQL Server 2005 - Managing Certificates
  9. SQL Server 2005 - Managing Permissions
  10. Managing SQL Server 2005 Security
  11. SQL Server 2005 - Using the Database Tuning Advisor
  12. SQL Server 2005 - Tuning a Database
  13. Maintain indexes in a SQL Server 2005 database
  14. SQL Server 2005 - Defining Indexes
  15. SQL Server 2005 - Database Backup
  16. SQL Server 2005 - Populating the Database
  17. SQL Server 2005 Configuration Manager
  18. SQL Server 2005 - Using the Sqlcmd Utility
  19. Using the SQL Management Objects
  20. Using SQL Sever Management Studio - Part 2
  21. Using SQL Sever Management Studio - Part 1
  22. SQL Server 2005 - Using Event Notifications
  23. SQL Server 2005 - Using DDL Triggers
  24. SQL Server Monitoring Tools - Server Profiler
  25. SQL Server 2005 - Testing Troubleshooting
  26. SQL Server 2005 - Upgrading from earlier versions of SQL Server
  27. SQL Server 2005 Installation - Maintenance Plan Without Using Wizard
  28. SQL Server 2005 - Unattended Installations
  29. SQL Server 2005 Installation - Maintenance Plan Using Wizard
  30. Installing a Second Copy of SQL Server 2005
  31. Planning to Install SQL Server 2005
  32. SQL Server 2005 Installation
  33. SQL server 2005 Editions
  34. SQL Server 2005 Architecture Overview
  35. SQL Server 2005 - Management studio interface Summary Page
  36. SQL Server 2005 - Server Groups
  37. SQL Server 2005 - Registered Servers
  38. SQL Server 2005 Administrative Tools
  39. Developing Client applications in SQL Server 2005
  40. SQL Server Management Objects
  41. NET CLR in SQL Server 2005
  42. Native HTTP Support in SQL Server 2005
  43. XML Data Types in SQL Server 2005
  44. Using XML in SQL Server 2005
  45. Using Notification Services in SQL Server 2005
  46. SQL Server 2005 - Service Broker
  47. Data Manipulation Language (DML) in SQL Server 2005
  48. T-SQL Enhancements in SQL Server 2005
  49. Security Features in SQL Server 2005 for the Developer
  50. SQL Server Architecture and Components
  51. SQL Server 2005 Management Studio
  52. Overview of SQL Server 2005 for the Database Developer
  53. Getting started with SQL Server 2005
 

Comments