configure replication in sql server 2005

Upload: ananda-padmanabhan

Post on 30-May-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 Configure Replication in SQL Server 2005

    1/2

    Configure Replication in SQL Server 2005

    The easiest way to create a publication is to use the Publication Wizard in SQL Server.The wizard provides a graphical user interface that lets you select the Publisher, the

    publication type, and the articles to publish. It also lets you configure filtering for the publication.

    When you create a publication for SQL Server Compact Edition Subscribers by using thePublication Wizard, you must select the following options:

    On the Publication Type page, select Merge publication. In SQL Server 2005, on the Subscriber Type page, select SQL Server Compact

    Edition.By enabling Windows CE subscribers, character mode snapshots are automaticallyconfigured for the publication. In SQL Server 2005, Web synchronization is also enabled.

    If this is the first publication created for this server, the Publication Wizard prompts youto configure the default snapshot folder location. The snapshot folder holds the snapshotfiles that contain the schema and data for published tables. The IIS user must be able toread these snapshot files so that it can download the files to the smart device.

    Note: The snapshot folder default location is a local path in the installation folder for SQL Server. You must change this path to a shared folder so that the IIS user can accessthe snapshot from over the network.

    When you use the Publication Wizard to create a publication, you select the articles youwant to publish by selecting the check box next to each article. Because you have

    previously indicated in the Publication Wizard that this publication will have MicrosoftSQL Server 2005 Compact Edition (SQL Server Compact Edition) Subscribers, thePublication Wizard will configure the articles appropriately. When you select an article,you can add filtering. Both column and row filtering are configured at the same time inthe wizard. This lets you define and maintain subsets of data that can be published todifferent devices. You can use row filtering to publish a subset of rows in a publishedtable. For example, in a service organization, each service representative might have toreceive only the customer records for the accounts they service. You can use columnfiltering to publish a subset of columns in a published table. For example, you can use acolumn filter to eliminate large text or image columns that you might not want to publishto a smart device.

    Row-level and column-level tracking determines how data is transferred and howconflicts are detected during synchronization.

    Column-level tracking reduces the amount of information that must be sent to thePublisher during synchronization, but row-level tracking requires less tracking overhead

    because more storage is required to track the changes. Column-level tracking can alsoreduce the number of conflicts when different users are changing the same data. For example, suppose one change is made to the address column of a Publisher row, and a

  • 8/14/2019 Configure Replication in SQL Server 2005

    2/2

    second change is made to the phone number column in the same table of thecorresponding Subscriber row. With row-level tracking, a conflict is detected, becausechanges were made to both rows. With column-level tracking, no conflict is detected,

    because changes were made to different columns in the rows.

    When you use the Publication Wizard to create a publication, you enable tracking whenyou add the articles. Both row-level and column-level tracking are configured at the sametime. Column-level tracking is the default tracking for all articles unless otherwisespecified.

    Microsoft SQL Server 2005 Compact Edition subscribers can subscribe to both SQLServer 2000 and SQL Server 2005 publications. A SQL Server Compact EditionSubscriber is always a client subscriber that connects to the Publisher by using the HTTP

    protocol.

    From within SQL Server Management Studio, connect to an instance of a SQL Server

    Compact Edition database. This database can be running on a connected device, or it can be a file on the desktop computer.

    In Object Explorer, expand the SQL Server Compact Edition database node, expandReplication, right-click Subscriptions, and then choose New Subscriptions.

    On the Introduction page, click Next. On the Choose Publication page, in the Publisher drop-down list, choose . Choose the Publisher and thenclick Connect. In the Publications list, select the publication, and then click Next.

    On the Identify Subscription page, type a name for the subscription. If the publication towhich you are subscribing uses dynamic filtering, provide a HOST_NAME value for thisdatabase, and then click Next.

    On the Web Server Authentication page, type the URL to the virtual directory thatcontains the SQL Server Compact Edition Server tools, provide the authenticationinformation, and then click Next. For more information about configuring a virtualdirectory, see How to: Configure Connectivity with the Configure Web SynchronizationWizard.

    On the SQL Server Authentication page, select the type of SQL Server Authenticationrequired to connect to SQL Server, provide the user name and password, if it is required,and then click Next. On the Complete the Wizard page, you can select and copy thesample code to use in a C# or Visual Basic application. Click Finish to create thesubscription. When the process is completed, click Close.