Replication Synchronization Task

When using character-mode synchronization, SQL Server uses tab characters to delimit fields and newline characters to delimit rows (or lines) in a character mode data file. If text or character fields within a table contain tab or newline characters, character-mode synchronization can fail because the data file that is used for synchronization cannot be processed correctly.

To perform character-mode synchronization of tables with tab or newline characters in data, SQL Server 6.5 allows alternate field and row delimiters to be specified for the synchronization task.

Syntax

-rrow_delimiter -ffield_delimiter

where

-rrow_delimiter
Specifies a sequence of one or more characters to use as a row delimiter. The -r parameter is case-sensitive. The delimiter must appear immediately after the parameter.
-ffield_delimiter
Specifies that a field delimiter is necessary to replace tab characters. The -f parameter is case-sensitive. The delimiter must appear immediately after the parameter.

Remarks

Field and row delimiters must be sequences of characters that do not appear in any text or character fields in the table that is being processed. It is important to verify that the delimiters you use are character sequences that will not appear in the table that is being replicated. Otherwise, the synchronization task will be unable to associate data source files with columns in the target table when performing a character-mode synchronization.

When the task scheduler issues the synchronization event, it will use the field and row delimiters you have specified in the Command text box of the Edit Task dialog box.

    To use the row and field delimiter parameters
  1. Stop SQL Executive if it is running.
  2. From the Manage menu, choose Replication/Publications and in the Manage Publications dialog box that appears, choose New.

    The Edit Publications dialog box appears.

  3. Create your publication and in the Synchronization tab, set the initial synchronization method to Bulk Data Copy - Character Format (Compatibility).
  4. From the Server Menu, choose Scheduled Tasks.

    The Manage Scheduled Tasks dialog box appears.

  5. Refresh the Manage Scheduled Tasks window. In the Task List tab, in the Type column, there should now be a task named Sync for your new publication.
  6. Double-click the task.

    The Edit Task dialog box appears.

  7. In the Command text box, add the desired parameters.
  8. Choose Modify to close the dialog box and save changes.
  9. Restart SQL Executive.

Note If you know that tabs and newline characters will not appear in character data, then there is no need to make use of the row and field delimiter parameters.

Examples

    A.    Using Words as Delimiters

This example uses <<FIELD>> and <<ROW>> as field and row delimiters:

-f<<FIELD>> -r<<ROW>>
  
    B.    Abbreviating Delimiters

This example uses _D1_ and _D2_ as field and row delimiters:

-f_D1_ -r_D2_