IBM DB2 Everyplace Sync Server Administration Guide Version 7 Release 2 Modification 1


Setting up data and file replication

To enable a group of users to access the data and files that its members require, you must define one or more replication subscriptions. A replication subscription provides specifications for how the information in a source system (an enterprise server) is to be synchronized with a target system (the mobile device).

You can create several types of subscriptions in the Mobile Devices Administration Center: DataPropagator subscriptions, JDBC subscriptions, upload subscriptions, file subscriptions, and custom subscriptions.

To determine which subscriptions you need to create, evaluate what information your groups of mobile users currently require to perform their work. What data do their applications access? What files do they view or use regularly?

Creating a JDBC subscription

Use the Create JDBC Subscription notebook to create a JDBC table subscription.

Each table subscription that you create can reference one or more tables.

To create a JDBC subscription:

  1. Open the Create JDBC Subscription notebook.
  2. Identify the subscription.
  3. Specify the encryption level.
  4. Specify the source database driver and URL.
  5. Specify the mirror database driver and URL.
  6. Specify source tables, target tables, and access privileges for the subscription.
  7. Specify how to filter the data in the source table.
  8. Assign subscription sets to the JDBC subscription.
  9. Click OK.

Identify the JDBC subscription

After authenticating a user, the Sync Server determines what group the user belongs to, then queries the administration control database to determine what subscription is involved in the request. For this reason, the Sync Server must be able to uniquely identify each subscription by name.

To identify a JDBC subscription:

On the Identification page, fill in these fields:

Name
Type a descriptive, unique 1- to 18-character name for the subscription.

Description
Optional: Type up to 128 characters of text that describes this subscription.

Specify the encryption level

Encryption support for Windows CE and Win32 platforms is only available with the Microsoft High Encryption Pack available from Microsoft. The Microsoft High Encryption Pack must be installed to use encryption between Windows CE/Pocket PC clients or Win32 platform clients and the DB2 Everyplace Sync Server. Encryption support on Palm OS requires Palm OS 3.3 or later.

To specify the encryption level:

On the Identification page, select the encryption level using the Encryption level field. The following three options are available:

None
No encryption will be used during data transfer.

Limited: 56-bit Data Encryption Standard
All data transfers will be encrypted using a 56-bit key. This provides basic security with a small performance penalty.

Strong: 128-bit Data Encryption Standard
All data transfers will be encrypted using a 128-bit key. This provides enhanced security with a larger performance penalty than Limited encryption.

Specify the source database driver and URL

You must specify the source and mirror databases. For upload subscriptions, no mirror database is required.

To specify the source database driver and URL

On the Source page of the Create JDBC Subscription notebook, provide the following information:

Database URL
Type the JDBC Database URL. The correct form for the JDBC driver selected in the Driver field is shown. Replace the variables in braces with the information to connect to the database. For example, the default Database URL for IBM DB2 UDB local is jdbc:db2:{database}. Replace {database} with the name of the DB2 database you plan to use.

Driver
Select the JDBC database driver to use with this subscription.

User ID
Type a valid source database user ID. Ensure this ID has, at a minimum, the SQL privileges that you granted for the subscriptions defined against the database. For example, if you granted the SQL UPDATE privilege in the subscription, the user ID must have UPDATE privileges defined for the source database.

Password
A valid source database password for the user ID.

Verify Password
Use this field to type the password again exactly as you typed it in the Password field.

Click Test connection to verify the source database settings.

Specify the mirror database driver and URL

You need to specify the mirror database for a synchronizing subscription, but not for a upload subscription.

To specify the mirror database driver and URL

On the Mirror page of the Create JDBC Subscription notebook, provide the following information:

Database URL
Select the JDBC Database for the mirror database. Click the Figure dsyh024 not displayed. push button to open the Select Mirror Database window.

User ID
Type a valid DB2 UDB database user ID. Ensure this ID has, at a minimum, the SQL privileges that you granted for the subscriptions defined against the database.

Password
A valid password for the user ID.

Verify Password
Use this field to type the password again exactly as you typed it in the Password field.

Click Test connection to verify the database settings.

Specifying source tables, target tables, and privileges for the subscription

You must define at least one table for every JDBC subscription. If you specified more than one table for the subscription, these tables will be synchronized in the same order that you added them when you created the subscription. The list of tables on the Define Replication Subscription window shows this order.

You must not specify the same source and target tables in two different subscriptions. If you want to create two subscriptions that replicate the same source table, use different target tables.

To add a table to the subscription

  1. On the Identification page of the JDBC Subscription notebook, click Define subscription. The Define Replication Subscription window opens.

  2. In the Define Replication Subscription window, click Add. The Add Table window opens.

  3. In the Add Table window, use the Table list to select the replication source to add to this subscription.

    Click Filter to change the source filter used to limit the available tables in the table list. The Filter window opens.

    The % symbol is a wildcard. Typing % in the Source schema and Source table fields displays all available tables in the table list.

  4. In the Target schema field, specify the schema that the table will have on the mobile device. If you do not specify a schema, the system uses the schema of the source table by default.

  5. In the Target table field, specify the name that the table will have on the mobile device. If you do not specify a name, the system uses the name of the source table by default.

  6. Under Access privileges, select the SQL access privileges that you want users of this subscription to have for this replication source. For example, if some of your visiting nurses are allowed to insert, update, or delete data, but trainee nurses are allowed only to view the data, you need to create two different subscriptions to handle the difference in access privileges. These subscriptions must use separate mirror tables. For more information about SQL access privileges, see the DB2 Universal Database Administration Guide: Design and Implementation.

  7. Optional: Select the Use Constraints defined in selected DB2 source checkbox. This enables the constraints from the selected DB2 source table for the target table.

  8. Optional: Select the Use Indexes defined in selected DB2 source checkbox. This enables the indexes from the selected DB2 source table for the target table.

  9. Click Add to add the replication source to the subscription. Click Close to close the Add Table window.

Filtering data in the subscription

When you create a subscription to a particular table (the PATIENTS table for your group of visiting nurses, for example), performance considerations might force you to replicate only a subset of the data in the table. You specify this subset by choosing individual rows or columns to be replicated for each table in the subscription.

For example, you might decide that the only columns relevant for visiting nurses using the PATIENTS table are the PATIENT_NAME, ADDRESS, PHONE, and DOCTOR fields. You might then decide to further filter the data by defining a WHERE clause that filters data for nurses working for a particular doctor.

You can combine data filters for the subscription with filters set for the group or for individual users to pare down the data even further.

To filter the data that will be replicated during synchronization

  1. From the Define Replication Subscription window, click Advanced. The Advanced Subscription Definition notebook opens.
    Note:The source table primary key columns must be subscribed. If the source table has columns which are not part of the primary key, at least one of those columns must be subscribed.

  2. Optional: Select the columns to use in the subscription.

    1. Go to the Target Columns page of the Advanced Subscription Definition notebook.

    2. Select the columns to create on the mobile device using the Subscribe checkbox. Columns not selected will not be created on the mobile device.

    3. Select the columns to replicate to the mirror database using the Replicate checkbox. You may need to replicate a column to the mirror database, but not want to create it on the handheld. For example, if a NOT NULLABLE column without a DEFAULT VALUE exists on the server and you are not creating it on the mobile device, you must replicate it to the mirror database and supply a default value using the Default value data filter. The Sync Server will replicate any rows created by the mobile device to the source using the DEFAULT VALUE specified in the Default value data filter to complete the contents of the NOT NULLABLE source column that does not have a default value on the server.

    4. Click Change to modify a target column name, Default value data filter, or constraint.

    5. Click Close to close the Create Index window.

  3. Optional: Define indexes for the target table.

    1. Go to the Indexes page of the Advanced Subscription Definition notebook.

    2. Click Add to open the Create Index window. The Create Index window opens.

    3. Type the name index in the Name field.

    4. Select the columns you want to include in the index using the >, >>, <, and << push buttons.

    5. Order the index using the Move Up and Move Down push buttons.

    6. Select Ascending or Descending index.

    7. Click Add to add the index.

    8. Click Close to close the Create Index window.

  4. Optional: Define a WHERE clause that selects individual rows to be included in the subscription. You might decide that you want only certain rows to be part of the subscription even if all columns appear in the replica. To display sample WHERE clauses, click Examples.
    1. Go to the Rows page of the Advanced Subscription Definition window.
    2. In the All rows needed field, type a WHERE clause that defines the selection of rows that you want to appear in the subscription. You can only select rows from the table that you selected in Step 1.

      For example, suppose you want your visiting nurses to see only the rows of data in the PATIENTS table where the value of the JOBCODE column is VNURSE. You would enter the following WHERE clause:

      JOBCODE='VNURSE'
      

      It is not necessary to type WHERE at the beginning of the clause.

    3. In the Subset of rows for individual users field, you can type a clause similar to a SQL WHERE clause to further limit the rows that an individual user can see. Ensure you do not type "WHERE" at the beginning of the clause. You might use a parameter, whose value varies by the user. For detailed information about defining a filter at the group level or user level, see Horizontal filtering at the subscription level, group level, or user level.

      For example, suppose that you want users to see only data related to their own job codes. Instead of hard-coding a value for the JOBCODE parameter for the entire subscription, define a variable that references the data filter value defined for each individual user:

      JOBCODE=':JOB.'
      

      In the data filters for individual users, you could then set the :JOB parameter to each user's job code. See Filtering the data available to the user and Horizontal filtering at the subscription level, group level, or user level for more information on filtering data for individual users.

    4. Click OK to close the Advanced Subscription Definition window.
  5. Click OK to return to the Define Replication Subscription window.
Note:A series of changes made to a single row in a DB2 Everyplace table on the user's device between synchronizations will be communicated to the Sync Server as a single cumulative change. As a result, a DELETE operation followed by an INSERT operation for the same primary key will be communicated to the SyncServer as an UPDATE operation if the operations occur with no intervening synchronizations. If they occur with an intervening synchronization, then they are communicated separately. Doing a series of changes to a single row can lead to an inconsistency because the subscription does not transfer all columns between the source table and the user table. An UPDATE operation will retain the current values in the unsubscribed column(s), while the INSERT will set the unsubscribed columns to default values.

Batching synchronization requests

For performance reasons, you probably do not want the Sync Server to perform replication for every synchronization request the moment that it queues. To improve performance, you can do one of the following:

When batching synchronization requests, the Sync Server begins replicating synchronization requests when the number of seconds defined for the batch window has elapsed since the last replication.

For information about how to set the Sync Server to perform replication at any given time, see Replicating on demand.

To batch synchronization requests:

  1. Ensure a source and mirror database appear on the Identification page of the Create JDBC subscription notebook. Then click Define Subscription. The Define Replication Subscription window opens.
  2. Click Timing. The Subscription Timing window opens.
  3. In the Batch window field, specify a number of seconds that you want the Sync Server to wait between replication cycles. You can specify up to 86,400 seconds (24 hours). The default setting is 3600 seconds (60 minutes).
  4. Click OK.

All subscriptions defined against the same mirror database share the same values for batch parameters. Any changes that you make affect all subscriptions defined against the mirror database.

Assigning a subscription set to a JDBC subscription

After you define the subscription, you must specify what subscription sets use it. When you associate a subscription with a subscription set, you can then assign the subscription set to a group to provide members of the group access to the data and files defined in the subscriptions the subscription set references.

One subscription can be used by an unlimited number of subscription sets. However, two subscriptions that are defined with different privileges cannot belong to the same subscription set.

If two subscriptions with different privileges synchronize with the same table, they must use different mirroring (mid-tier) servers. Two subscriptions with different privileges can use the same mirror only if they synchronize with different tables.

To specify the subscription sets that use this subscription

  1. Go to the subscription sets page of the Create JDBC Subscription notebook.

  2. In the Available subscription sets list, select the subscription set that you want to associate the subscription with. Hold down the Ctrl key while selecting to select multiple subscription sets serially, or hold down the Shift key to select multiple subscription sets contiguously.

    If no subscription sets appear in the Available subscription sets list, click Create to create a subscription set without closing the current JDBC Subscription notebook. The Create Subscription Set notebook opens.

  3. Click > to assign the subscription sets, or click >> to assign all available subscription sets at once. Assigned subscription sets appear in the Selected subscription sets list.

Creating a DataPropagator subscription

A DataPropagator subscription provides specifications for how data in a source table is to be synchronized to a table on the mobile device.

Each subscription that you create can reference one or more tables.

To create a DataPropagator subscription:

  1. Ensure that the table is defined in DB2 Universal Database as a replication source, and that you defined at least one NOT nullable, primary key column for the table. (For information on defining replication sources, see DB2 Universal Database Replication Guide and Reference.)
  2. Open the Create DataPropagator subscription notebook. (See Creating synchronization objects for more information.)
  3. Identify the subscription.
  4. Specify the encryption level.
  5. Map the source database on the enterprise system to its target database on the mobile device.
  6. Identify the mirror database. If you set up synchronization in a three-tier structure, the mirror is on the mid-tier system.
  7. Add source tables to the subscription and provide information about what SQL privileges you will allow for those tables.
  8. Optional: Specify how to filter the data in the source table.

    For example, do you want all data in the source table to be replicated in every synchronization? Only certain rows? The data filtering you specify for the subscription applies to all groups that use the subscription.

  9. Specify how you want to batch synchronization requests by defining a period of time to elapse between replication processes (see Batching synchronization requests for information).
  10. Provide the user ID and password that will be used to access the source system on the group's behalf.
  11. Specify the subscription sets that will use the subscription.
  12. Click OK.

Most of these steps are explained in more detail in this section.

Identifying the subscription

After authenticating a user, the Sync Server determines the group that the user belongs to, then queries the administration control database to determine what subscription is involved in the request. For this reason, the Sync Server must be able to uniquely identify each subscription by name.

To identify a DataPropagator subscription, provide information in the following fields on the Identification page of the Create DataPropagator subscription notebook:

Name
Provide a descriptive, unique name for the subscription from 1 to 18 characters long.

For DB2 DataPropagator subscriptions, the system converts the name that you specify here to uppercase upon saving it in the administration control database. After the name is saved in the control database, you cannot rename the subscription because this function is not supported by DB2 DataPropagator. You must first delete the existing subscription, then create a new subscription with the new name.

Description

Type up to 128 characters of text that describes this subscription.

Specify the encryption level

Encryption support for Windows CE and Win32 platforms is only available with the Microsoft High Encryption Pack available from Microsoft. The Microsoft High Encryption Pack must be installed to use encryption between Windows CE/Pocket PC clients or Win32 platform clients and the DB2 Everyplace Sync Server. Encryption support on Palm OS requires Palm OS 3.3 or later.

To specify the encryption level:

On the Identification page, select the encryption level using the Encryption level field. After the encryption level is modified, all users subscribing to that subscription must be reset. The following three options are available:

None
No encryption will be used during data transfer.

Limited: 56-bit Data Encryption Standard
All data transfers will be encrypted using a 56-bit key. This provides basic security with a small performance penalty.

Strong: 128-bit Data Encryption Standard
All data transfers will be encrypted using a 128-bit key. This provides enhanced security with a larger performance penalty than Limited encryption.

Mapping the source to the target

The source database is the database serving as the source for data replication.

The target database is the database on the mobile device receiving replicated data from a source system.

To map the source database on the enterprise system to its target database on the mobile device, provide information in the following fields on the Identification page of the Create DataPropagator subscription notebook:

Source database

The source database must be cataloged. Choose a name from a list of cataloged databases by clicking the Figure dsys013 not displayed. push button.

Target database

This field automatically defaults to the name that you typed in the Source database field. You can override this target database name only if this is the first subscription defined against this source database.

This field does not apply to devices running Palm OS, because that operating system does not use a traditional database structure.

Identifying the mirror database

Before you begin setting up synchronization, you must create the mirror database on the mid-tier system. You can create the mirror database by clicking the Create button to launch the Create Database wizard. You can then identify the mirror database in the subscription.

To identify the mirror database, choose a mirror database name from the list in the Mirror database field on the Identification page of the Create DataPropagator subscription notebook. This field displays all databases defined on the server where you invoked the Mobile Devices Administration Center.

Adding a replication source

A replication source is a table residing on a source system from which data is replicated to a target system. You must define at least one replication source for every DataPropagator subscription. You must not specify the same source and target tables in two different subscriptions. If you want to create two subscriptions that replicate the same source table, use different target tables.

If you specified more than one table for the subscription, these tables will be synchronized in the same order that you added them when you created the subscription. The list of tables on the Define Replication Subscription window shows this order.

To add a replication source to the subscription:

  1. Ensure that you defined the table as a DB2 DataPropagator replication source. You can use the DB2 Control Center to define the replication source. For more information, see the DB2 Universal Database Replication Guide and Reference.

    Because replication sources can be used and managed by tools other than the DB2 Everyplace Sync Server, when you define the source ensure that you control access to the data in a way that all applications can take advantage of.

  2. On the Identification page of the Create DataPropagator subscription notebook, click the
    Figure dsys013 not displayed.
    push button to choose a source database from a list.
  3. Click Define Subscription. The Define Replication Subscription window opens.

    The Subscription name field reflects the name of the subscription that you entered on the Identification page. The Apply qualifier field represents a unique qualifier that the Sync Server uses for all subscriptions defined for this database.

    The Apply qualifier streamlines the process of synchronizing the mid-tier mirror database with its master database on the enterprise system; when the Apply program runs, DataPropagator replicates data for all subscriptions with the same Apply qualifier. The Apply qualifier defaults to the name of the mirror database.

  4. In the Define Replication Subscription window, click Add. The Add window opens.
  5. In the Replication source list, select the replication sources to add to this subscription.
  6. In the Access privileges field, select the SQL access privileges that you want users of this subscription to have for this replication source. For example, if some of your visiting nurses are allowed to insert, update, or delete data, but training nurses are allowed only to view the data, you need to create two different subscriptions to handle this difference in access privileges. These subscriptions must use separate mirror tables. For more information about SQL access privileges, see the DB2 Universal Database SQL Reference.

    After you add a replication source to the subscription, you can change only the SQL access privileges defined for the source.

  7. In the Target table field, specify the name that the table will have on the mobile device. If you do not specify a name, by default the system uses the name of the source table. The Create target table check box is always disabled.

    Within the same subscription, a source table can be mapped to more than one target table name. However, DB2 DataPropagator uses a single change data table to replicate changes to and from both target tables.

  8. Click Add to add the replication source to the subscription.

Filtering data in the subscription

When you create a subscription to a particular table (the PATIENTS table for your group of visiting nurses, for example), performance considerations might force you to replicate only a subset of the data in the subscription. You specify this subset by choosing individual rows to be replicated for each table in the subscription.

For example, you might decide that the only columns relevant for visiting nurses using the PATIENTS table are the PATIENT_NAME, ADDRESS, PHONE, and DOCTOR fields. You might then decide to further filter the data by defining a WHERE clause that filters data for nurses working for a particular doctor.

You can combine data filters for the subscription with filters set for the group or for individual users to pare down the data even further.

To filter the data that will be replicated during synchronization:

  1. In the Define Replication Subscription window, select the table for which you want to define column or row filtering.
  2. Click Advanced. The Advanced Subscription Definition notebook opens.
  3. Optional: Define a WHERE clause that selects individual rows to be included in the subscription. You might decide that you want only certain rows to be part of the subscription even if all columns appear in the replica.
    1. Go to the Rows page of the Advanced Subscription Definition window.
    2. In the All rows needed field, type a WHERE clause that defines the selection of rows that you want to appear in the subscription. You can only use the table that you selected in Step 1.

      For example, suppose you want your visiting nurses to see only the rows of data in the PATIENTS table where the value of the JOBCODE column is VNURSE. You could enter the following WHERE clause:

      JOBCODE='VNURSE'
      

      The WHERE keyword must not be used at the beginning of the clause.

      You can click Examples to display sample WHERE clauses.

    3. In the Subset of rows for individual users field, you can type a clause similar to a SQL WHERE clause to further limit the rows that an individual user can see. Ensure you do not type "WHERE" at the beginning of the clause. You might use a parameter, whose value varies by the user. For detailed information about defining a filter at the group level or user level, see Horizontal filtering at the subscription level, group level, or user level.

      For example, suppose that you want users to see only data related to their own job codes. Instead of hard-coding a value for the JOBCODE parameter for the entire subscription, define a variable that references the data filter value defined for each individual user:

      JOBCODE=':JOB.'
      

      In the data filters for individual users, you could then set the :JOB parameter to each user's job code. See Filtering the data available to the user and Horizontal filtering at the subscription level, group level, or user level for more information on filtering data for individual users.

    4. Click OK to close the Advanced Subscription Definition window.
Note:A series of changes made to a single row in a DB2 Everyplace table on the user's device between synchronizations will be communicated to the Sync Server as a single cumulative change. As a result, a DELETE followed by an INSERT for the same primary key will be communicated to the SyncServer as an UPDATE, if the operations occur with no intervening synchronizations. If they occur with an intervening synchronization, then they are communicated separately. This can lead to an inconsistency when the subscription does not transfer all columns between the source table and the user table, as an UPDATE will retain the current values in the unsubscribed column(s), while the INSERT will set the unsubscribed columns to default values.

Batching synchronization requests

For performance reasons, you probably do not want the Sync Server to perform replication for every synchronization request the moment that it queues. To improve performance, you can do one of the following:

When batching synchronization requests, the Sync Server begins replicating synchronization requests when the number of seconds defined for the batch window has elapsed since the last replication.

For information about how to set the Sync Server to perform replication at a given time, see Replicating on demand.

To batch synchronization requests:

  1. Ensure a source and mirror database appear on the Identification page of the Create DataPropagator subscription notebook. Then click Define Subscription. The Define Replication Subscription window opens.
  2. Click Timing. The Subscription Timing window opens.
  3. In the Batch window field, specify a number of seconds that you want the Sync Server to wait between replication cycles. You can specify up to 86,400 seconds (24 hours). The default setting is 3600 seconds (60 minutes).
  4. Click OK.

All subscriptions defined against the same mirror database share the same values for batch parameters. Any changes that you make affect all subscriptions defined against the mirror database.

Providing a user ID and password for the subscription

All subscriptions defined against a source database share the same user ID and password to gain access to the database. If this is the first subscription created against the source database, you need to specify this user ID and password. To do this, type the following values on the Authentications page of the Create DataPropagator subscription notebook:

The Sync Server creates a password file from this information that DataPropagator uses to access the source database. The password file is stored in the directory where the Sync Server runs.

Specifying subscription sets that use the subscription

After you define the subscription, you must specify the subscription sets that use it. When you associate a subscription with a subscription set, you can then assign the subscription set to a group to provide members of the group access to the data and files defined in the subscriptions that the subscription set references.

One subscription can be used by an unlimited number of subscription sets. However, two subscriptions that are defined with different privileges cannot belong to the same subscription set.

If two subscriptions with different privileges point to the same table, they must use different mirroring (mid-tier) servers. Two subscriptions with different privileges can use the same mirror only if they synchronize with different tables.

To specify the subscription sets that use this subscription:

  1. Go to the Subscription sets page of the Create DataPropagator subscription notebook.
  2. In the Available subscription sets list, select the subscription set with which you want to associate the subscription. To select multiple subscription sets serially, hold down the Ctrl key while selecting; to select multiple subscription sets contiguously, hold down the Shift key while selecting.

    If no subscription sets are displayed in the Available subscription sets list, you will need to create a subscription set. You can click Create to open the Create Subscription set notebook now, or you can create a subscription set later and associate it with a subscription later. See Enabling groups to access their data and files for more information on creating a subscription set.

  3. Click > to assign the subscription sets, or click >> to assign all available subscription sets at once. Assigned subscription sets are displayed in the Selected subscription sets list.

Creating an upload subscription

An upload subscription is a type of JDBC subscription that allows you to insert rows directly into a table on a source database. The source table can reside on any database that supports JDBC. Upload subscriptions can improve Sync Server's throughput, simplify administration, and increase system reliability.

Upload subscriptions can be used in scenarios where the client devices are used only for collecting data only and when getting timely updates of tables on the client device is not a primary concern. Such scenarios include:

There are few restrictions on the source database except that it must support JDBC and SQL INSERT statements. Because there is no replication for an upload subscription, the burden on the Sync Server is alleviated.

In an upload subscription, when you synchronize with the Sync Server, the DB2 Everyplace database engine on the handheld device communicates directly with the source database to insert the rows that have been added to the DB2 Everyplace database. The flow of the data is one-way; the tables on the device are not refreshed. No mirror database is involved in this process.

If a primary key is used, multiple inserts that cause a primary conflict are rejected. The rejections are logged in both the client and the Mobile Devices Administration Center (MDAC) on the Sync Server. Other operations, like DELETE and UPDATE, are either ignored by the source database or rejected. Table 7 lists client operations and results.

Table 7. Client's possible operations and their consequences

Operation Results
Client's INSERT operations without conflicts in the primary key Inserted into the source database
Client's INSERT operations with conflicts in the primary key Rejected with error messages logged in the client and the MDAC
Client's UPDATE operations Rejected with error messages logged in the client and the MDAC
Client's DELETE operations Ignored silently
First-time synchronization Tables created in the client with no rows

In an upload subscription, the Sync Server never updates the related tables in the device's DB2 Everyplace database.

Use the Create Upload Subscription notebook to create an upload table subscription. See Creating synchronization objects for information on how to open the notebook. Each table subscription that you create can reference one or more tables.

To create an upload subscription

  1. Open the Create Upload Subscription notebook.
  2. Identify the upload subscription.
  3. Specify the encryption level.
  4. Specify the source database driver and URL.
  5. Specify source tables and target tables for the subscription.
  6. Assign subscription sets to the upload subscription.
  7. Click OK.

These steps are explained in more detail in this section.

Identifying the upload subscription

After authenticating a user, the Sync Server determines what group the user belongs to, then queries the administration control database to determine what subscription is involved in the request. For this reason, the Sync Server must be able to uniquely identify each subscription by name.

To identify an upload subscription

  1. Click the Identification tab of the Creating upload subscriptions notebook.
  2. Fill in these fields:

    Name
    Type a descriptive, unique 1- to 18-character name for the upload subscription.

    Description
    Optional: Type up to 128 characters of text that describes this subscription.

Specifying the encryption level

Encryption support for Windows CE and Win32 platforms is only available with the Microsoft High Encryption Pack available from Microsoft. The Microsoft High Encryption Pack must be installed to use encryption between Windows CE/Pocket PC clients or Win32 platform clients and the DB2 Everyplace Sync Server. Encryption support on Palm OS requires Palm OS 3.3 or later.

To specify the encryption level

On the Identification page, select the encryption level from the Encryption level drop-down list. The following three options are available:

None
No encryption will be used during data transfer.

Limited: 56-bit Data Encryption Standard
All data transfers will be encrypted using a 56-bit key. This provides basic security with a small performance penalty.

Strong: 128-bit Data Encryption Standard
All data transfers will be encrypted using a 128-bit key. This provides enhanced security with a larger performance penalty than Limited encryption.

Specify the source database driver and URL

You must specify only the source database for an upload subscription because no mirror database is involved.

To specify the source database driver and URL

On the Source page of the Create Upload Subscription notebook, provide the following information:

Database URL
Type the JDBC Database URL. The correct form for the JDBC driver selected in the Driver field is shown. Replace the variables in braces with the information to connect to the database. For example, the default Database URL for IBM DB2 UDB local is jdbc:db2:{database}. Replace {database} with the name of the DB2 database you plan to use.

Driver
Use this field to select the JDBC database driver to use with this subscription.

User ID
Type a valid source database user ID. Ensure this ID has the SQL INSERT privilege against the source database.

Password
A valid source database password for the user ID.

Verify Password
Type again the password exactly as you typed it in the Password field.

Specifying source tables and target tables

You must define at least one table for every upload subscription.

To add a table to the subscription

  1. On the Identification page of the Create Upload Subscription notebook, click Define subscription. The Define Replication Subscription window opens.

  2. In the Define Replication Subscription window, click Add. The Add Table window opens.

  3. In the Add Table window, use the Table list to select the replication source to add to this subscription.

    Click Filter to change the source filter used to limit the available tables in the table list. The Filter window opens.

    The % symbol is a wildcard. Typing % in the Source schema and Source table fields displays all available tables in the table list.

  4. In the Target schema field, specify the schema that the table will have on the mobile device. If you do not specify a schema, by default the system uses the schema of the source table.

  5. In the Target table field, specify the name that the table will have on the mobile device. If you do not specify a name, by default the system uses the name of the source table.

  6. Optional: Select the Use Constraints defined in selected DB2 source checkbox. This enables the constraints from the selected DB2 source table for the target table.

  7. Optional: Select the Use Indexes defined in selected DB2 source checkbox. This enables the indexes from the selected DB2 source table for the target table.

  8. Click Add to add the replication source to the subscription. Click Close to close the Add Table window.

Assigning a subscription set to an upload subscription

After you define the subscription, you must specify what subscription sets use it. When you associate a subscription with a subscription set, you can then assign the subscription set to a group to provide members of the group access to the data and files. The data and files that the group can access are defined in the subscriptions that the subscription set references.

One subscription can be used by an unlimited number of subscription sets.

To specify the subscription sets that use this subscription

  1. Go to the subscription sets page of the Create Upload Subscription notebook.

  2. In the Available subscription sets list, select the subscription set with which you want to associate the subscription. Hold down the Ctrl key while selecting to select multiple subscription sets serially, or hold down the Shift key to select multiple subscription sets contiguously.

    If no subscription sets appear in the Available subscription sets list, click Create to create a subscription set without closing the current Create Upload Subscription notebook. The Create Subscription Set notebook opens.

  3. Click > to assign the subscription sets, or click >> to assign all available subscription sets at once. Assigned subscription sets appear in the Selected subscription sets list.

Creating a file subscription

To provide users access to the files that they require, you define one or more file subscriptions. Unlike a DataPropagator subscription, which can contain more than one table, a file subscription can contain only one file. Thus, if your group of users needs access to several files, you must create several file subscriptions (then assign them to a subscription set as explained in Specifying what information the subscription set accesses, and assign the subscription set to the group as explained in Enabling the group to access data and files). A file cannot be referenced in multiple subscriptions.

The file to which you subscribe the group can be any file stored at the source server. You can use file subscriptions as a convenient way to distribute and update data and application files to the users. For example, it could be an application file that you want to install on the mobile devices, or a resource file required for a Palm OS application to function, or it could be a flat file containing the minutes from a morning meeting.

To create a file subscription:

  1. Open the Create File Subscription notebook. See Creating synchronization objects for more information.
  2. Identify the subscription.
  3. Specify the encryption level.
  4. Specify the name of the source file.
  5. Specify the subscription sets that will use the subscription.
  6. Click OK.

These steps are explained further in this section.

Identifying the subscription

After authenticating a user, the Sync Server determines the group that the user belongs to, then queries the administration control database to determine what subscription is involved in the request. For this reason, the Sync Server must be able to uniquely identify each file subscription by name.

To identify a file subscription, provide the following information on the Identification page of the Create File Subscription notebook:

Name

Provide a descriptive, unique name for the subscription from 1 to 18 characters long. Names are case-sensitive.

Description

Type up to 128 characters of text that describes this subscription.

Specify the encryption level

Encryption support for Windows CE and Win32 platforms is only available with the Microsoft High Encryption Pack available from Microsoft. The Microsoft High Encryption Pack must be installed to use encryption between Windows CE/Pocket PC clients or Win32 platform clients and the DB2 Everyplace Sync Server. Encryption support on Palm OS requires Palm OS 3.3 or later.

To specify the encryption level

On the Identification page, select the encryption level using the Encryption level field. The following three options are available:

None
No encryption will be used during data transfer.

Limited: 56-bit Data Encryption Standard
All data transfers will be encrypted using a 56-bit key. This provides basic security with a small performance penalty.

Strong: 128-bit Data Encryption Standard
All data transfers will be encrypted using a 128-bit key. This provides enhanced security with a larger performance penalty than Limited encryption.

Specifying the name of the source file

A source file is a file residing on a source system that is replicated to a target device.

A target file is a file on a target system receiving the contents of a source file during synchronization.

The source file must be available for selection from the mid-tier system where you invoke the Mobile Devices Administration Center. Thus, before you define the subscription, either connect to the source system where the file is stored or copy the file from the source system to the mid-tier system. If your synchronization configuration has only two tiers, the file is probably already on the system where you invoke the Mobile Devices Administration Center.

Specify the name of the source file in the Source filename field on the Identification page of the Create File Subscription notebook.

After you create the file subscription, a copy of the file that you specify here is stored to ensure integrity of the subscription in case anything happens to the file. If you update the file, you must flag the source file to be replicated again to each of the subscribed users. See Flagging a subscription that references a changed file for more information.

Because Palm OS mobile devices store the file name within the file itself, the Target filename field is ignored.

Specifying subscription sets that use the subscription

After you define the subscription, you must specify the subscription sets that make use of it. When you associate a subscription with a subscription set, you can then assign the subscription set to a group to provide its members with access to the data and files defined in the subscriptions that the subscription set references.

One subscription can be used by an unlimited number of subscription sets.

To specify the subscription sets that use this subscription:

  1. Go to the Subscription sets page of the Create File Subscription notebook.
  2. In the Available subscription sets list, select the subscription set that you want to associate the subscription with. To select multiple subscription sets serially, hold down the Ctrl key while selecting; To select multiple subscription sets contiguously hold down the Shift key.

    If no subscription sets are displayed in the Available subscription sets list, you will need to create a subscription set. You can click Create to open the Create Subscription set notebook now, or you can create a subscription set later and associate it with a subscription later. See Enabling groups to access their data and files for more information on creating a subscription set.

  3. Click > to assign the subscription sets, or click >> to assign all available subscription sets at once. Assigned subscription sets are displayed in the Selected subscription sets list.

You can also associate subscriptions with a subscription set using the Subscription set notebook. For more information, see Specifying what information the subscription set accesses.

Flagging a subscription that references a changed file

When you make changes to a file referenced in a subscription, you need to flag that the source file has changed so that the Sync Server replicates the file to the subscribed users on the next synchronization. It is a convenient way to update or upgrade applications and data files on the mobile devices.

To flag that the source file has changed:

  1. Open the Subscriptions object folder from the object tree in the Mobile Devices Administration Center.
  2. In the contents pane, right-click the file subscription and select Reset.

Creating a custom subscription

Use the Create Custom Subscription notebook to create a custom subscription. A Custom subscription can be used to customize the default adapters or use a 3rd party adapter.

To create a custom subscription

  1. Open the Create Custom subscription notebook.
  2. Identify the custom subscription.
  3. Specify the encryption level.
  4. Launch the customizer.
  5. Assign subscription sets to the custom subscription.
  6. Click OK.

These steps are explained further in this section.

Identifying the Custom subscription

After authenticating a user, the Sync Server determines what group the user belongs to, then queries the administration control database to determine what subscription is involved in the request. For this reason, the Sync Server must be able to uniquely identify each subscription by name.

To identify a custom subscription

On the Identification page, fill in these fields:

Name
Type a descriptive, unique 1- to 18-character name for the subscription.

Description
Optional: Type up to 128 characters of text that describes this subscription.

Specify the encryption level

Encryption is not supported with custom subscriptions. Select None in the Encryption field.

Launch the customizer

To launch the customizer

On the Identification page, Click the Figure dsyh027 not displayed. push button to launch the custom Java class file defined in the Customizer class name field of the custom adapter used by the subscription. The Customizer is only available if the adapter requires it. Otherwise, additional parameters for the custom subscription are entered in the Other field.

Assigning a subscription set to a Custom subscription

After you define the subscription, you must specify what subscription sets use it. When you associate a subscription with a subscription set, you can then assign the subscription set to a group to provide members of the group access to the data and files defined in the subscriptions the subscription set references.

One subscription can be used by an unlimited number of subscription sets.

To specify the subscription sets that use this subscription

  1. Go to the subscription sets page of the Create Custom Subscription notebook.

  2. In the Available subscription sets list, select the subscription set that you want to associate the subscription with. Hold down the Ctrl key while selecting to select multiple subscription sets serially, or hold down the Shift key to select multiple subscription sets contiguously.

    If no subscription sets appear in the Available subscription sets list, click Create to create a subscription set without closing the current Custom Subscription notebook. The Create Subscription Set notebook opens.

  3. Click > to assign the subscription sets, or click >> to assign all available subscription sets at once. Assigned subscription sets appear in the Selected subscription sets list.

Creating a custom adapter

Use the Create Custom Adapter notebook to create a custom adapter. DB2 Everyplace Sync Server includes four default adapters. The default adapters are:

DSYDPROPR      DataPropagator adapter for relational data
DSYJDBC        JDBC adapter for relational data
DSYFILE        File adapter for copying files
Agent Adapter  Remote query and stored procedure adapter for running stored procedures

Custom adapters allow you to expand the capabilities of DB2 Everyplace Sync Server.

To create a custom adapter

  1. Open the Create Custom Adapter notebook.
  2. Identify the custom adapter.
  3. Specify the Customizer class name and the Signature.
  4. Specify the communications attributes.
  5. Specify the file attributes.
  6. Click OK.

These steps are explained further in this section.

Identifying the Custom Adapter

To identify a custom adapter

On the Identification page, fill in these fields:

Name
Type a descriptive, unique 1- to 18-character name for the adapter.

Description
Optional: Type up to 128 characters of text that describes this adapter.

Specify the Customizer class name and the Signature

To specify the Customizer class name and the signature

On the Identification page, fill in these fields:

Customizer class name
Type the Java class name to be called by the Figure dsyh027 not displayed. push button.

Signature
Type the Signature used to identify subscriptions using this adapter.

Signature is used to identify a class of adapters. This prevents a relational data subscription being used with a file adapter. For example, if we had many instances of a WIDGET adapter (all using the same signature WidgetSig) and each instance of the WIDGET adapter had a different function, any existing custom subscription that used this WIDGET adapter could use any custom WIDGET adapter of the same signature (WidgetSig).

Specify the Communication Attributes

To specify the communication attributes

On the Identification page, fill in these fields:

Command
Type the command to run for this adapter.

Server IP address:port
Type the server IP address and port for the adapter to connect to in the following form:
XXX.XXX.XXX.XXX:PPPP

where XXX.XXX.XXX.XXX is the IP address and PPPP is the port number.

Queue manager suffix
Optional: Type a descriptive, unique 1- to 18-character suffix for the queue manager.

Input queue name
Optional: Type up to 128 characters of text that describes this subscription.

Specify the File Attributes

To specify the file attributes

On the Identification page, fill in these fields:

Lib name
Type the filename of the library to use for this adapter. The library must be located in the path.

Other parameters
Optional: Type up to 128 characters of other parameters for the file named in lib name.

Replicating on demand

The replication-on-demand feature enables you to request replication at any time. It is an alternative to setting replication to automatically run at regular intervals. You can enable replication on demand when you create a new subscription, or when you edit an existing subscription. If you reconfigure an existing subscription, you must restart the Sync Server servlet to make the changes effective.

To enable replication on demand:

  1. On the Create DataPropagator Subscription notebook or Create JDBC Subscription notebook, go to the Identification page and click Define Subscription. The Define Replication Subscription window opens.
  2. Click Timing. The Subscription Timing window opens.
  3. In the Batch window field, set the timing to 0.
  4. Click OK.

When the Sync Server servlet starts, the initial replication takes place as usual. No subsequent replications will be performed automatically. Subsequent replications can be requested by using the dsyreplicate command. To request a replication:

  1. Open a DB2 command window.
  2. Change to SyncServer/Server subdirectory under the directory where DB2 Everyplace has been installed. For example, db2e/SyncServer/Server.
  3. Issue the dsyreplicate <mirror_database_name> command to request the replication. For example:

    dsyreplicate m_vnurse

  4. Close the DB2 command window.

Notes:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]