XML Scripting tool DTD

This topic contains the XML Scripting DTD. For more information, see Utilizing the XML Scripting tool.

<!ELEMENT Root ( AddJdbcMaster | AddReplMaster | AddJdbcMirror | 
                  AddReplMirror | AddGroup | AddUser | AddSubscriptionSet | 
                  AddJdbcSubscription |	AddFileSubscription | 
                  AddDproprSubscription |AddUploadSubscription | 
                  AddCustomSubscription | AddAdapter |
                  AddServer | ResetUser | ResetGroup | ResetAll |
                  RemoveJdbcMaster | RemoveReplMaster | RemoveJdbcMirror | 
                  RemoveReplMirror | RemoveGroup | RemoveUser | 
                  RemoveSubscriptionSet |RemoveSubscription | 
                  RemoveAdapter | RemoveServer | AlterUser | 
                  AlterGroup | AlterFileSubscription | AlterJdbcSubscription | 
                  AlterUploadSubscription | AlterDproprSubscription | 
                  AlterSubscriptionSet | AlterJdbcMaster | AlterJdbcMirror |
                  AlterReplMaster | AlterReplMirror | AlterAdapter )*>
 
<!--A NULL element under a node means the node's value is null.
This is needed to insert NULL values into the database.
Some elements, listed below, allow NULL values to be specified.-->
 
<!ELEMENT NULL EMPTY>
 
 
<!--Master and mirror database related tags:
DB2 Everyplace Sync Server replicates data from the master (source) databases to
the mirror databases and then synchronizes the mirror databases with the mobile 
devices. Therefore a replicated subscription definition must refer to a source 
and a mirror database. There are two types of mirror and master databases 
based on their replication technology. JDBC and DPropR. DPropR master and 
mirrors are replicated using the DB2 replication. Therefore both the master 
and mirror must be DB2 databases. JDBC master and mirrors are replicated 
using Sync Server's JDBC replication system. The master (source) can be any 
database that has a well behaving JDBC driver. The mirror must still be DB2. 
Certain data type mappings are done by the sync server for this master to mirror 
replication to succeed if master database is not DB2. Some data types in the 
source database may not be supported. In case of DPropR subscriptions, the 
replication setup between the source and the mirror must be performed BEFORE 
running the XML tool to add a DPropR subscription (AddDproprSubscription tag)
to enable synchronization of this mirror to mobile devices. To do this, in the 
control center, user must define source tables as Replication Source to be able 
to replicate them. Then the user needs to create a Replication Subscription 
(which is a DPropR term). DB2e Sync Server expects that Apply Qualifier for a 
DPropR replication subscription is the same as the mirror database name. 
For example,"M_VNURSE" in our VNURSE sample application. User should enter this 
mirror database name as Apply Qualifier. Once this Replication Subscription is 
created successfully,user can run the XML Tool to introduce this replication 
subscription to sync server and create the syncrhonization infrastructure in 
the mirror and the control database.Replication Subscription name should match 
Sync Server DPropr table subscription name that the user intends to use in the 
XML tool to avoid complications. MDAC (DB2e Sync Server admin GUI) manages 
Replication Subscription creation and Sync Server DPropR subscription creation 
together without exposing details of the process. Doing so, it uses the same 
subscription name both for Replication Subscriptionand the Sync Server DPropR 
subscription.
-->
 
                  
<!-- AddJdbcMaster tag inserts the connection information for a JDBC master 
(source) database. This description is referenced from a JDBC subscription 
related elements to set the subscription's source database. The child elements 
that this tag contains are as follows:
'Database'(max length=255) is the JDBC URL to the source database.
'Driver'(max length=255) is the JDBC driver class name.
'UserId'(max length=128) is the id used to connect to this database using JDBC.
'Password'(max length=128) is the password used to connect to this database 
  using JDBC.-->
 
<!ELEMENT AddJdbcMaster (Database, Driver, UserId, Password)>
 
 
<!-- AddReplMaster tag inserts the description of a DPropR master (source) 
database. This description is referenced from DPropR subscription related 
elements to set the subscription's source database.The child elements that 
this tag contains are as follows:
'System'(max length=128) is the DB2 system name for the source database. 
    (As displayed in DB2 UDB Control Center)
'Instance'(max length=8) is the DB2 instance name for the source database. 
   (As displayed in DB2 UDB Control Center)
'Database'(max length=18) is the DB2 database name for the source database. 
  (As displayed in DB2 UDB Control Center)
'UserId'(max length=128) is the id used to connect to this database using JDBC.
'Password'(max length=128) is the password used to connect to this database 
 using JDBC.
'DatabaseAlias'(max length=18) is the alias used for this database.-->
 
<!ELEMENT AddReplMaster (System, Instance, Database, UserId, Password, 
                                                         DatabaseAlias?)>
  <!ELEMENT System    (#PCDATA)>
  <!ELEMENT Instance  (#PCDATA)>
  <!ELEMENT Database    (#PCDATA)>
  <!ELEMENT UserId      (#PCDATA)>
  <!ELEMENT Password    (#PCDATA|NULL)*>
<!--Password of databases can't be null, but password of groups can be null.-->
  <!ELEMENT DatabaseAlias (#PCDATA|NULL)*>
 
 
<!-- AddJdbcMirror tag inserts the connection information for a JDBC mirror 
database. This description is referenced from JDBC subscription related 
elements to set the subscription's mirror database. The child elements that 
this tag contains are as follows:
'Database'(max length=255) is the DB2 database name for the mirror database. 
 (As displayed in DB2 UDB Control Center)
'Driver'(max length=255) is the JDBC driver class name.
'UserId'(max length=128) is the id used to connect to this database using JDBC.
'Password'(max length=128) is the password used to connect to this database 
 using JDBC.
'AddCustomLogic' tag makes it possible to associate one or more user defined 
CustomLogic implementation classes with this mirror database to customize 
replication behavior. Keep in mind that errors in custom logic implementation 
will cause replication to fail.This may block attempted changes to replicated 
subscriptions if you insist to replicate.
-->
 
<!ELEMENT AddJdbcMirror (Database, Driver, UserId, Password, 
                            SyncWindow?, AddCustomLogic* )>
  <!ELEMENT Driver      (#PCDATA)>
  <!ELEMENT SyncWindow  (#PCDATA|NULL)*>
 
 
<!-- AddReplMirror tag inserts the description of a DPropR mirror database. 
This description is referenced from DPropR subscription related 
elements to set the subscription's mirror database.The child elements that 
this tag contains are as follows:
'Database'(max length=18) is the DB2 database name for the mirror database.
  (As displayed in DB2 UDB Control Center)
'UserId'(max length=128) is the id used to connect to this database using JDBC.
'Password'(max length=128) is the password used to connect to this database 
 using JDBC.
'SyncWindow'(integer) is the time in seconds to repeat replication between master 
 and mirror databases.
'AddCustomLogic' tag makes it possible to associate one or more user defined 
 CustomLogic implementation classes with this mirror database to customize 
 replication behavior. 
-->
  
<!ELEMENT AddReplMirror (Database, UserId, Password, SyncWindow, AddCustomLogic*)>
 
 
 
<!--Users and groups in DB2Everyplace Sync Server:
Sync Server uses the concept of a 'user' (see 'AddUser' tag) to associate a 
device with subscriptions to be synchronized for that device. 
A User belongs to a Group (see 'AddGroup' tag). 
A Group contains Subscription Sets (see 'AddSubscriptionSet' tag). 
A Subscription Set contains Subscriptions (see 'AddXYZSubscription' tags).
Subscriptions define the subset of the database schema that will be synchronized
with the mobile database.
This XML DTD describes how to create these conceptual entities and associate 
them with each other. In case of LDAP enabled installations, XML tool ignores
add user/group and remove user/group tags and such user/group maintenance is not
done by the Sync Server. 
-->
 
 
<!--AddGroup tag inserts the description of a group. 
'Name'(max length=18) is a unique group name.
'Description'(max length=128) is a text description.
'Enabled' is 'Y' or 'N'. If 'Y', members of this group can synchronize, 
 if 'N' they cannot.
-->
 
<!ELEMENT AddGroup (Name, Description?, Enabled, 
                              (IncludeSubscriptionSet | AddDataFilter)*) >
  <!ELEMENT Name (#PCDATA)>
  <!ELEMENT Description (#PCDATA|NULL)*>
  <!ELEMENT Enabled (#PCDATA)>
 
 
<!--IncludeSubscriptionSet tag includes a Subscription Set (a logical grouping
of subscriptions that are synchronized together) in the Group that contains 
 this tag. 
A group must contain non-empty Subscription Sets to describe what kind of data 
group members (users) are going to synchronize in order to be able to sync 
data. 
'Name'(max length=18) is the name of the associated Subscription Set.
'Order' is an integer that tells which Subscription Set comes first. If not 
specified, the order they appear inside the 'AddGroup' tag is used.
If the Subscription Set identified by 'Name' does not exist, the AddGroup tag
that wants to include this Subscription Set fails and the group cannot be 
created.
-->
<!ELEMENT IncludeSubscriptionSet (Name, Order?)>
 
 
<!--AddDataFilter tag declares a data filter for the Group that 
contains this tag. Data filters make it possible to send a portion of a 
source table to the mobile database given a group or a user. They also 
help create the target (mobile) database slightly differently based on the 
user's data filters. 
(Please see 'ColumnDataFilter' and 'Constrnt' tags). A data filter 
consists of a 'Name' and a 'Value'. 
 
'Name'(max length=18) specifies any name that will be referenced in 
the actual filtering where clause (Such where clauses are specified per 
table in Subscription settings). 
 
'Value'(max length=36) specifies the default value to replace 
the parameter name. (each user's settings may override this). 
 
The data to be synchronized may be filtered by a condition like: 
'ACOLUMN IN (SELECT ACOLUMN FROM TABLE :name=value)' in the mirror-to-target 
where clause of a Subscription Table.
 
For an 'AddUser' tag to have an 'OverrideDataFilter' tag, the user's group 
MUST have the same data filter created. In other words, data filters are 
created for groups, and sometimes overridden by users.
 
The reason data filters are created at the group level is that, groups 
containSubscriptions that use these data filters in their row filtering 
where clauses. If some users did not have a given data filter, they would 
not be able to sync a subscription that used the data filter, therefore, 
the relationships are such that a group that has a subscription which has 
(mirror to mobile) row filtering,must have the related data filters 
defined, and users inherit these data filters. 
Defining more data filters that are not used by the subscriptions do not 
have an effect and are ignored during synchronization. 
 
Data filters cannot be used in master to mirror where clause filters to 
filter replicated rows. The reason of this is that replication does not 
run in the context of a group, it is independent of all groups, therefore 
a group's data filter is irrelevant and if used by mistake, will likely 
cause SQL errors during 
replication.
 
(See also 'ColumnDataFilter' and 'Constrnt' tags).
-->
<!ELEMENT AddDataFilter (Name, Value?) >
  <!ELEMENT Value (#PCDATA|NULL)*>
  
<!ELEMENT OverrideDataFilter (Name, Value?) >
 
 
<!--AddUser tag creates a user. Every mobile database must have a 
corresponding user to sync with Sync Server. 
 
'Name'(max length=18) is the unique name of a user.
 
'UserGroup'(max length=18) is the name of an existing group. 
If such group does not exist, AddUser fails and user cannot 
be added.
 
'Description'(max length=128) is text description of the user.
 
'Password'(max length=18) is the password that user must specify on the 
mobile device in order to synchronize with Sync Server.
 
'OverrideDataFilter' element allows this user to provide a custom value for 
a data filter added to the user's group. Please see comments for 
'AddDataFilter' tag.
-->
<!ELEMENT AddUser (Name, UserGroup?, Description?, Password?, LDAPProperties?, 
                        (OverrideDataFilter | AddDevice)*) >
  <!ELEMENT UserGroup (#PCDATA|NULL)*>
 
 
<!--AddDevice tag adds a device description for the user. Normally, 
such descriptions are created by the Sync Server during synchronization 
based on the actual device that is performing the sync. However, this tag 
is provided to accomodate certain test cases and backups that may need 
this functionality.
'Id'(max length=32) is generated by the server.
 
'Type' is a string that refers to an enumerated device type. The string 
constants we use for this purpose are listed below. The device type used in 
this tag is one of them. These device types map to integer numbers in the 
control database. If the need arises, users can use these numbers in the 
XML as well (in case there is a new device type in the last minute and XML 
  tool does not know about it). 
Possible device type strings are:
  PALM          or PALM_M68K
  WINCE         or WINCE_ARM
  WIN32         or WIN32_X86
  WIN32UNICODE  or WIN32UNICODE_X86
  NEUTRINO      or NEUTRINO_X86
  MIDP
  LINUX         or LINUX_X86
  EMBEDDEDLINUX or EMBEDDEDLINUX_X86
  EPOC          or EPOC_ARM
  EPOCUNICODE   or EPOCUNICODE_ARM
 
We have also defined a set of other possible variants based on device 
processor, howeverthese are not used by the Sync Server yet. So if, 
for example, XML specifies WIN32_MIPS as device type, then it will 
default to WIN32 because we do not yet differentiate between 
processors. Possible string constants are:
  WINCE_SH3
  WINCE_SH4
  WINCE_MIPS
  WINCE_X86
  EPOC_X86
  EPOCUNICODE_X86
  
'Enabled' field is one character, either 'Y' or 'N'.
-->  
<!ELEMENT AddDevice (Id, Type, Enabled)>
  <!ELEMENT Id (#PCDATA) >
 
 
<!--
In case of LDAP enabled setup, user and group information for the Sync Server
 are retrieved fromthe LDAP server and stored in the control database to be 
associated with subscription sets. While creating a user using XML Tool, 
LDAPProperties of the user needs to be specified to be used to
create the user on the LDAP server. FirstName and LastName are required. 
To be able to synchronize using Sync Server, an LDAP user must also belong 
to a 'Sync Group'. To associate a user with a sync group, one or more 
AddToSyncGroup tags can be used. Sync groups are defined in LDAP specific 
properties of Sync Server installation. 
A sync group name should start with the characters 'DB2e'.
Note: During migration of non-ldap setup to ldap enabled setup, 
Sync Server will use 'DSY' as default 
FirstName and LastName to create users on LDAP server.
-->
<!ELEMENT LDAPProperties (FirstName, LastName, AddToSyncGroup*, 
                                               RemoveFromSyncGroup*, E-mail?, 
PreferredLanguage?, Interest?)>
	<!ELEMENT FirstName (#PCDATA)>
	<!ELEMENT LastName (#PCDATA)>
	<!ELEMENT AddToSyncGroup (#PCDATA)>
	<!ELEMENT RemoveFromSyncGroup (#PCDATA)>
	<!ELEMENT E-mail (#PCDATA)>
	<!ELEMENT PreferredLanguage (#PCDATA)>
	<!ELEMENT Interest (#PCDATA)>
 
 
<!--A subscription set is a logical grouping of subscriptions that are 
synchronized together.A group of users synchronize against a defined 
subscription set. Not individual subscriptions. 
'Name'(max length=18) is the name of the Subscription Set.
'Description'(max length=128) is a text description.
'Signature'(max length=128) - not used.
'IncludeSubscription' references an existing subscription that should be 
includedin this subscription set. If the subscription does not exist, 
creation of this subscription set fails.
-->  
<!ELEMENT AddSubscriptionSet (Name, Description?, Signature?, 
                                                    (IncludeSubscription*))>
  <!ELEMENT Signature (#PCDATA|NULL)*>
 
 
<!--IncludeSubscription tag is used by AddSubscriptionSet tags.
'Name'(max length=18) is the name of the existing subscription being 
included.'Order' is an integer identifying the order of the subscription 
among other subscriptions that are also included in the parent 
Subscription Set. Subscriptions included in a Subscription Set are 
synchronized in this order.If not specified, order of listing in the
 XML will be used.
--> 
<!ELEMENT IncludeSubscription (Name, Order?)>
 
 
<!--AddJdbcSubscription tag creates a JDBC Subscription to synchronize 
relationaldata from a mirror database to the mobile databases. 
Replication from master to mirror will also be handled by the 
Sync Server replication mechanism and not DPropR.
'Name'(max length=18) is the unique name of the subscription.
'Description'(max length=128) is a text description.
'SubAdapter'(max length=18) is the name of an existing adapter that 
this subscription uses. 
'EncryptionLevel' is an integer identifying the encryption level to use.
0 indicates no encryption. 1 indicates 56 bit, and 2 indicates 128 bit 
encryption.'Block' is either 'Y' or 'N'. When set to 'Y', the subscription 
cannot be synchronized.
Target device will be notified that subscription is not available.
 
'MasterDb'(max length=255) is the master database JDBC url. 'MasterDb' together 
with 'MasterDriver' references an already existing master database definition 
that is shared by all subscriptions that use it.
 
'MasterDriver'(max length=255) is the JDBC driver to connect to the 
master database.The database definition referenced by the composite key 
'MasterDb' and 'MasterDriver'must already be defined. 
(Please see AddJdbcMaster tag for more info).
 
'MirrorDb' and 'MirrorDriver' tags refer to an already existing mirror database
definition just like MasterDb does for a master database.
 
'AddTable' tag adds database tables in this subscription to be 
synchronized and/orreplicated.
 
Note that, upload subscriptions (which do not have mirrors, and only inserts 
from mobile to source database) are handled by 'AddUploadSubscription' tag.
 
Warning: Adding a subscription blocks effected parts of the system 
(effected mirror database is a major component) during this operation and 
makes it unusable by the server. Avoid such frequent operations while the 
servers are running or this will degrade server performance.
 
'Replicate' attribute is either "TRUE" or "FALSE". If it is not specified, 
it defaults to "TRUE". After creating a subscription, a replication is 
performed to fill the new mirrortables with data to be ready to synchronize.
 If replication is skipped by providing Replicate="FALSE", then the 
subscription will be blocked (unavailable for sync) until 
replication is performed either manually or as part of scheduled replication for 
the related mirror. When adding, dropping, editing mutltiple subscriptions, for 
performance, it may be desireable to set Replicate="FALSE" to avoid initial 
and final replication attempts and manually perform replication before and 
after changes. In some cases, errors in subscription setup can also 
prevent any further replication. In that case, replication has to be skipped 
in order to be able to edit the subscription to apply fixes.
To replicate manually, users can use "dsyreplicate" command line tool. 
-->
<!ELEMENT AddJdbcSubscription (Name, Description?, SubAdapter, 
                               EncryptionLevel?, Block?, MasterDb, MasterDriver, 
                               MirrorDb?, MirrorDriver?, (AddTable*))>
  
  <!ATTLIST AddJdbcSubscription Replicate (TRUE | FALSE) "TRUE">
 
  <!ELEMENT SubAdapter (#PCDATA)>
  <!ELEMENT EncryptionLevel (#PCDATA)>
  <!ELEMENT Block (#PCDATA)>
  <!ELEMENT MasterDb (#PCDATA)>
  <!ELEMENT MasterDriver (#PCDATA)>
  <!ELEMENT MirrorDb (#PCDATA|NULL)*>
  <!ELEMENT MirrorDriver (#PCDATA)>
  
  
<!--AddUploadSubscription creates a subscription that allows inserts from a 
mobile database into the source database. Uploads subscriptions do not have 
associated mirror databases.
Please see AddJdbcSubscription tag comments for descriptions of child fields.
'AddTable' tag adds database tables in this subscription to be synchronized.
-->
<!ELEMENT AddUploadSubscription (Name, Description?, SubAdapter, 
                                EncryptionLevel?, Block?, MasterDb, MasterDriver, 
                                (AddTable*))>
                                
<!--AddDproprSubscription creates a Sync Server DPropR subscription to synchronize 
relational data from a mirror database to the mobile databases. Replication 
from master to mirror will be handled by the DB2 DPropR replication. DB2 DPropR 
has the concept of a Replication Subscription. This is different than our Sync 
Server subscriptions we are describing here. The setup of DPropR replication 
subscription must be done using DPropR toolsbefore the Sync Server subscription 
can be created. While creating the replication subscription using DB2 DPropR tools, 
use the same subscription name as the Sync Server subscription you intend 
to use. Also, for Apply Qualifier, use the mirror database name. 
The difference between JDBC subscriptions and the DPropR subscriptions is the 
type of replication employed. Since DPropR replication works between two DB2 
databases, the master(source) database must be DB2, unlike JDBC subscription 
where it can be any JDBC compliant database.
 
The fields Name, Description, SubAdapter, EncryptionLevel and Block are same as
other subscriptions. The DPropR Subscription specific fields are as follows:
'MasterSystem'(max length=128) is the DB2 master database instance.
'MasterInstance'(max length=8) is the DB2 master database instance.
'MasterDb'(max length=18) is the master database name. MasterSystem, 
MasterInstance and MasterDb alltogether form a composite key that refers to an
existing master database description, typically created by 'AddReplMaster' tag.
If such database definition does not exist, creation of this subscription will 
fail. 
'MirrorDb'(max length=18) is the mirror database name that references a mirror 
databasedefinition that is typically created by AddReplMirror tag. 
If such description does not exist, creation of this subscription fails. 
Sync Server assumes thatApply Qualifier of a replication subscription is 
the same as this 'MirrorDb' name.
 
Warning: Adding a subscription blocks effected parts of the system 
(effected mirror database is a major component) during this operation 
and makes it unusable by the server. Avoid such frequent operations 
while the servers are running or 
this will degrade server performance.
-->                            
<!ELEMENT AddDproprSubscription (Name, Description?, SubAdapter, 
                                  EncryptionLevel?, Block?, MasterSystem, 
                                  MasterInstance, MasterDb, MirrorDb, 
								  ApplyQualifier, (AddTable*))>
                                  
  <!ATTLIST AddDproprSubscription Replicate (TRUE | FALSE) "TRUE">
                                  
  <!ELEMENT MasterSystem    (#PCDATA)>
  <!ELEMENT MasterInstance  (#PCDATA)>
  <!ELEMENT ApplyQualifier  (#PCDATA)>
  
<!--AddFileSubscription creates a subscription to synchronize files from
source system to a mobile device. Specific child fields are:
'DeviceTypes' is a semicolon (';') seperated list of device types that this file
can be sent to. This is needed because certain file formats need be different for
different devices. Possible device types are listed in the comments for 
'AddDevice' tag.
'SourceFileName'(max length=255) is the name of the file in the source system.
'TargetFileName'(max length=255) is the name of the file in the target system.
-->  
<!ELEMENT AddFileSubscription (Name, Description?, SubAdapter, EncryptionLevel?, 
                Block?, DeviceTypes?,SourceFileName, TargetFileName?)>
  <!ELEMENT SourceFileName  (#PCDATA)>
  <!ELEMENT TargetFileName  (#PCDATA|NULL)*>
  <!ELEMENT DeviceTypes (#PCDATA|NULL)*>
 
 
<!--AddCustomSubscription creates a custom subscription. The only specific field
is 'Other' (max length=4096) which holds application specific data.
-->  
<!ELEMENT AddCustomSubscription (Name, Description?, SubAdapter?, 
                                      EncryptionLevel?, Block?, Other?)>
  <!ELEMENT Other (#PCDATA|CDATA|NULL)*>
 
  <!ELEMENT Type (#PCDATA)>
  
  
<!--AddTable tag provides ability to include tables in the JDBC, DPropR and upload
subscriptions.
'TargetSchema'(max length=128) is the schema of the table on the target device.
'TargetTable'(max length=128) is the name of the table on the target device.
TargetSchema and TargetTable together must be unique for a given subscription. 
In case of DPropR subscriptions, TargetSchema.TargetTable must 
exist in the mirror database or the parent subscription tag will fail.
 
'SourceSchema'(max length=128) is the schema of the table in the source database.
'SourceTable'(max length=128) is the name of the table in the source database.
The table specified by SourceSchema.SourceTable must exist in the source 
database incase of JDBC and Upload subscriptions or the creation of the 
parent subscription tag will fail. 
 
'DeleteAuth' is either 'Y' or 'N', default is 'Y'.
'InsertAuth' is either 'Y' or 'N', default is 'Y'.
'UpdateAuth' is either 'Y' or 'N', default is 'Y'.
'SelectAuth' is either 'Y' or 'N', default is 'Y'.
Changing priviledges does not cause the table to be dropped 
and recreated on themirror and the target devices.
 
'WhereClauseMirrorToMobile' (max length=1024) is a constraint part of a DB2 
where clause sql statement that will be executed on the mirror to filter 
rows to be synchronized. It must evaluate to either true or false.
It may include data filter parameters defined for groups 
(see AddDataFilter tag). If data filters are defined, they will be 
replaced by the values specificto the user or the group of the user 
being synchronized. Changing this whereclause causes the table to 
be dropped and recreated on the target devices and the mirrordatabase.
 
For example, lets assume an application has two groups of users, one east coast, 
one west coast group. Then the where clause for a table might be something like:
 
AREA=:GROUP_AREA
 
Then the group data filters can be defined such that for the west coast 
group data filter would be:
 
:GROUP_AREA='WESTCOAST'
 
For a west coast group, at run time the where clause will become:
 
AREA='WESTCOAST'
 
and the users in the west coast group will get only those rows that match this
constraint.
 
'WhereClauseMasterToMirror'(max length=1024) is constraint portion of a 
where clause that will be used to filter rows that are replicated 
from master to the mirror database. Since replication does not happen in the 
context of a user or a group, data filters cannot be used in 
WhereClauseMasterToMirror. Changing this where clause property of a table
causes the table to be dropped and recreated on the mirror and on the 
target devices.
 
'JoinFilter' is one of 'Y', 'N' or 'G' for Global (default setting). 
It specifies whether join filtering should be employed for this table 
or not. 'Y' means enabled. If the row-filter out-of-scope problem is 
acceptable, this should be 'N' (disabled) to improve performance. 
If this tag is not specified, then default value of 'G' 
will be used, which means that whether join filtering is enabled depends 
on the global setting RowFilter.OutOfScope.Delete property 
(located in the Sync Server control database, DSY.PROPERTIES table).
If its value is 1, it is enabled, if 
it is 0, it is disabled.
 
'TableSpace' is optional field for the DB2 tablespace to be used in the 
mirror database where this source table will be replicated to. Sometimes, 
the default tablespace page size in the mirror database is not big enough 
to hold replicated data, in this case it is necessary to create the 
related mirror table in a different table space. Changing the Tablespace 
of a table will cause the table to be dropped and recreated on the 
target device and on the mirror. 
 
 
'Order' is an integer that identifies the order of this table 
inside the subscription. If not specified, order of listing is 
used. Index of first table is 1. Second is 2 and so on. When used 
inside 'AlterTable' to change the order of a table, you need to 
specify the new ordering index for this table. For example,
if you want your table to be the 3rd table within the other tables 
of the subscription, you specify order 3. If the order number you 
specify is greater than the number of tables,
then your table will become the last table in the subscription 
(assuming there is no other table that asked to be located at even 
greater index). If the order is 0, or negative,then it will become the 
first table. You can specify mixed ordering for tables.
For example, you can list table A at order 3, and than you can specify 
table B at order 1, and then table C at order 2. This is to make it easier 
to change the order of tables in existing scripts without having to move 
around blocks of AddTable related text. However, having mixed orderings 
makes the XML Script hard to read and this is discouraged. It is 
best to use the order that the tables appear when creating subscriptions.
 
When the Order of a table is changed, the target devices that have not 
yet heard about this change will receive full description of the full 
set of tables and they will do re-ordering as needed.
This will not cause mirror or target device tables to be dropped and recreated.
 
'Encrypt' is either 'Y' or 'N'. Default is 'N'. It specifies if table data 
should be encrypted on the device or not. This is different than the Encryption
specified at Subscription level which specifies the encrytion level used over 
the wire during sync. Changing this attribute will cause the table to be dropped and 
recreated on the target device and on the mirror. 
 
'AddColumn' includes columns in a particular table 
(Please see comments for AddColumn tag). Adding/removing/altering columns 
will cause the table to be dropped and recreated on the target 
device and on the mirror. 
 
'AddIndex' includes indexes in a particular table 
(Please see comments for AddIndex tag). Changes to the set of indices of a 
table does NOT cause the table to be dropped and recreated on the 
target device and on the mirror. 
 
'AddCustomLogic' associates a user defined Java class to provide 
additional business logic functionality related to this table in 
Sync Server for synchronization and/or replication purposes. 
Replication is sometimes a pre-requisite of editing a subscription.
Changing the CustomLogic definitions for a table will NOT cause the 
table to be dropped and recreated on the target device and on the mirror. 
-->
 
<!ELEMENT AddTable (TargetSchema, TargetTable, SourceSchema, SourceTable, 
                      DeleteAuth, InsertAuth, UpdateAuth, SelectAuth, 
                      WhereClauseMirrorToMobile?, WhereClauseMasterToMirror?, 
                      JoinFilter?, TableSpace?, Order?, Encrypt?,  
                      (AddColumn | AddIndex | AddCustomLogic)*)>
  <!ELEMENT TargetSchema  (#PCDATA)>
  <!ELEMENT TargetTable   (#PCDATA)>
  <!ELEMENT SourceSchema  (#PCDATA)>
  <!ELEMENT SourceTable   (#PCDATA)>
  <!ELEMENT DeleteAuth    (#PCDATA)>
  <!ELEMENT InsertAuth    (#PCDATA)>
  <!ELEMENT UpdateAuth    (#PCDATA)>
  <!ELEMENT SelectAuth    (#PCDATA)>
  <!ELEMENT WhereClauseMirrorToMobile (#PCDATA|NULL)*>
  <!ELEMENT WhereClauseMasterToMirror (#PCDATA|NULL)*>
  <!ELEMENT Order   (#PCDATA|NULL)*>
  <!ELEMENT Encrypt (#PCDATA)>
  <!ELEMENT TableSpace (#PCDATA|NULL)*>
  <!ELEMENT JoinFilter (#PCDATA)>
 
 
<!--AddColumn tags are used to include columns to a table to be 
synchronized or replicated.
 
'SourceColumn' (max length=512) is the column name in the source table. 
ForJDBC and upload subscriptions, column with this name must exist in 
the source table, otherwise creation of the parent subscription 
will fail. For DPropR subscriptions it must exist in the mirror 
database. While running the XML tool, such source and mirror 
databases must be accessible.
 
'TargetColumn' will be the name of the column on the mobile device. 
This name must be unique among the columns of the parent table.
 
'Subscribe' is either 'Y' or 'N'. Default is 'N'. When 'Y', 
it means column willbe synchronized.
 
'Replicate' is either 'Y' or 'N'. Default is 'N'. When 'Y', 
it means column willbe replicated between master and mirror databases. 
You cannot synchronize a column without replicating it.
 
'Key' is either 'Y' or 'N'. Default is 'N'. It indicates if 
this column is part of a unique key constraint.
 
'Constrnt' is a DB2 Everyplace constraint which gets used on the 
target (mobile) database while creating the column using SQL DDL. 
For example, to have a contstraint on the related column as:
constraint CK_ENABLED check(ENABLED in('N','Y'))
the user will have to specify <Constrnt>in('N','Y')</Constrnt> in XML.
 
'ColumnDataFilter' is used to provide default value in SQL DDL while 
creating a column on a target(mobile) database. Since such a database 
belongs to a particular 'device user', this data filter can contain 
Data Filters created for groups and overriden by users 
(Please see AddDataFilter and OverrideDataFilter tags). 
For example, to create a column such that it's default value depends 
on that specific device user's location, SQL DDL could be something like: 
CITY varchar(50) not null with default 'ISTANBUL' 
and to make this work polymophically for each user who has different 
locations, the administrator will have to specify something like 
<ColumnDataFilter>:CITY</ColumnDataFilter>  as the data filter for 
this column. The data filter will have to be valid (created) for all 
groups and users who synchronize this subscription which this column 
belongs to.
-->  
<!ELEMENT AddColumn (SourceColumn, TargetColumn, Subscribe, 
                      Replicate, Key, Constrnt?, ColumnDataFilter?) >
  <!ELEMENT SourceColumn (#PCDATA)>
  <!ELEMENT TargetColumn (#PCDATA)>
  <!ELEMENT Subscribe   (#PCDATA)>
  <!ELEMENT Replicate   (#PCDATA)>
  <!ELEMENT Key         (#PCDATA)>
  <!ELEMENT Constrnt    (#PCDATA|NULL)*>
  <!ELEMENT ColumnDataFilter  (#PCDATA|NULL)*>
 
<!--'AddIndex' tag creates index descriptions for target tables.
Index name must be unique within the whole system regardless of 
subscription or mirror. If MirrorOnly attribute is set to "TRUE", then
the index will only be created in the mirror database. It will not be 
created on the target device. MirrorOnly attribute defaults to "FALSE"
if not specified.
 
'ColNames' tag lists the columns of this index. Column names are the
target names used in the AddTable tag. The names are ended with 
semi colons (;).A plus (+) that precedes a column name means ascending 
index, a minus(-) means descending index.
 
AddIndex tag looks like this:
         <AddIndex>
            <Name>MYINDEX</Name>
            <ColNames>+MYCOLNAME1;+MYCOLNAME2;</ColNames>
         </AddIndex>
 
-->
<!ELEMENT AddIndex (Name, ColNames)>
<!ATTLIST AddIndex MirrorOnly (TRUE | FALSE) "FALSE">
 
  <!ELEMENT ColNames   (#PCDATA)>
 
 
<!--
AddCustomLogic tag is used to associate a user defined class with a 
subscription table or a mirror database to provide custom 
business logic capability in the synchronization and/or 
replication process.
 
'PolicyType' is a constant one of (without the quotes):
  "BeforeTableSyncInPolicy"
  "AfterTableSyncInPolicy"
  "BeforeTableReplicatePolicy"
  "AfterTableReplicatePolicy"
  "BeforeDbReplicatePolicy"
  "AfterDbReplicatePolicy"
  "TableReplicatePolicy"
  "TableSyncInPolicy"
 
'ClassName' is the fully qualified name of the Java class that implements
the custom logic. This class must be located on the CLASSPATH of the 
Sync Server and the admin tools.
 
'Enabled' is either 'Y' or 'N'.
-->
<!ELEMENT AddCustomLogic (PolicyType, ClassName, Enabled)>
  <!ELEMENT PolicyType 	(#PCDATA)>
 
  
<!ELEMENT AddAdapter (Name, Description?, FileAttributes?, 
                          CommAttributes?, Signature?, ClassName?)>
  <!ELEMENT FileAttributes (#PCDATA|NULL)*>
  <!ELEMENT CommAttributes (#PCDATA|NULL)*>
  <!ELEMENT ClassName (#PCDATA|NULL)*>
 
 
<!--AddServer tag creates new a server description. Servers must be defined
for the system to work correctly. When a sync server starts, it updates the 
record about itself. If a server goes down without being able to update the 
record as 'Offline', it might cause problems while editing subscriptions. The 
administration tool may refuse to apply changes thinking that it is not able 
to communicate with a server that is up and running in which case making 
changes would cause unknown behavior. Before making any changes, administrative 
tools block related parts of the system and communicate the updates to the 
running servers that are not marked as 'Offline'. If a server is not marked 
offline and does not respond, it is not safe to apply changes and such changes 
will be refused.
-->  
 
<!ELEMENT AddServer (Name, HostIP, Port, Description?, SyncEnabled?, 
                                             ReplEnabled?, Status?, Blocked?)>
  <!ELEMENT HostIP (#PCDATA)>
  <!ELEMENT Port (#PCDATA)>
  <!ELEMENT SyncEnabled (#PCDATA)>
  <!ELEMENT ReplEnabled (#PCDATA)>
  <!ELEMENT Blocked (#PCDATA)>
  <!ELEMENT Status (#PCDATA)>
 
 
<!--'ResetUser' causes the device information of a user to be deleted. 
  'Name' is the user name.
  Resetting a user causes the target device to fo a full refresh next 
  time it   tries to synchronize.
-->  
<!ELEMENT ResetUser (Name)>
 
 
<!--'ResetGroup' causes the device information of all users in a group 
  to be deleted.  'Name' is the group name.
-->  
<!ELEMENT ResetGroup (Name)>
 
 
<!--'ResetAll' causes the device information of all users in the system 
      to be deleted. 
-->  
<!ELEMENT ResetAll EMPTY>
 
 
<!--Removes are below this point-->
 
<!--
  'RemoveJdbcMaster' removes records of a JDBC master database system 
   that may be shared   between subscriptions. It is usually not necessary 
   to remove these records. It might be useful for some test automation 
   cases. If a master or mirror is referenced
   from a subscription, it cannot be removed and an error will be issued.
-->
<!ELEMENT RemoveJdbcMaster (Database, Driver)>
 
 
<!--
  'RemoveReplMaster' removes records of a DPropR master database system 
   that may be shared between subscriptions. If a master or mirror 
   is referenced from a subscription, it cannot be removed and an error 
   will be issued.
-->
<!ELEMENT RemoveReplMaster (System, Instance, Database)>
 
 
<!--
  'RemoveJdbcMirror' removes records of a JDBC mirror database system 
   that may be shared between subscriptions. If a master or mirror is 
   referenced from a subscription, it cannot be removed and an error 
   will be issued.
-->
<!ELEMENT RemoveJdbcMirror (Database, Driver)>
 
 
<!--
  'RemoveReplMirror' removes records of a DPropR mirror database system 
   that may be shared between subscriptions. If a master or mirror is 
   referenced from a subscription, it cannot be removed and an error 
   will be issued.
-->
<!ELEMENT RemoveReplMirror (Database)>
 
 
<!--'RemoveGroup' removes a group and all related data from the system.
The users that used to be in this group will no longer belong to any 
 group.-->
<!ELEMENT RemoveGroup (Name)>
 
                      
<!--'RemoveUser' removes a user and all related device data from the 
 system. Once removed, a user can no longer synchronize.
-->
<!ELEMENT RemoveUser (Name)>
 
 
<!--'RemoveServer' removes a server record from the system. For example, 
this might be useful when a server name is changed and old name is no 
longer valid.
-->
<!ELEMENT RemoveServer (Name)>
 
                   
<!--RemoveDevice is implemented as ResetDevice on its own, so it is not 
   found in here.-->
 
 
<!--'RemoveSubscriptionSet' removes a Subscription Set from the system. 
  Notifies online servers about the change. If a server is believed to 
  be online but is not responding, change cannot be applied.
-->
<!ELEMENT RemoveSubscriptionSet (Name)>
 
 
<!--'RemoveSubscription' removes a Subscription from the system. 
 Notifies online servers about the change. If a server is believed 
 to be online but is not responding, change cannot be done. 
 Removing a subscription blocks effected parts of the system 
 (effected mirror database is a major component) during this 
 operation and makes it unusable by the server. Avoid such frequent 
 operations while the servers are running or this will degrade 
 server performance.
-->
<!ELEMENT RemoveSubscription (Name)>
 
  <!--Replicate attribute is meaningful only for replicated subscriptions 
                                                             such as jdbc.-->
  <!ATTLIST RemoveSubscription Replicate (TRUE | FALSE) "TRUE">
  
  <!--When StopOnError is FALSE, even if source and/or mirror is not 
   accesible, or there is a problem that prevents replication and/or 
   cleanup of source or mirror, subscription will still be deleted from 
   control database. Source and/or mirror may need manual cleanup after 
   that. This is useful in test/development environments where developer 
   does not care about source and mirror databases or they may already 
   be dropped.-->
  <!ATTLIST RemoveSubscription StopOnError (TRUE | FALSE) "TRUE">
 
 
<!--'RemoveAdapter' removes an adapter record from the database and
  is useful only for some test cases and is not needed most of the time.
-->
<!ELEMENT RemoveAdapter (Name)>
 
 
<!--Blocks a subscription and then notifies online servers about this. 
 Blocked subscriptions cannot sync.-->                                  
<!ELEMENT BlockSubscription (Name)>
<!ELEMENT UnblockSubscription (Name)>
 
 
<!-- Alters are below this point. -->
 
<!-- 
	AlterXYZ group of tags are used to locate information and change 
   portions of it.	The <AlterXYZ> tags contain the unique identifier 
   for a record to change and the list 
	of properties to change for this record.
	For example, the structure of alter user tag looks like this:
	<AlterUser>
		<Name>ausername</Name> //describes which user to change.
		<User>
			//lists new values to apply here.
		<User>
	<AlterUser>
-->
 
<!--'AlterJdbcMaster' tag allows changing connection information for 
  a jdbc master database.	Most of the time Password is the only property 
  that may need to be changed.	Avoid changing UserId if there is an 
  existing jdbc subscription using this master as this UserId is 
  used as schema name in some cases.
-->
<!ELEMENT AlterJdbcMaster (Database, Driver, JdbcMaster)>
<!ELEMENT JdbcMaster (Database?, Driver?, UserId?, Password?)>
 
<!--'AlterJdbcMirror' is used to change connection properties of a 
 jdbc mirror database.It is possible to add/remove one or more custom 
 logic implementation classes to the mirror. To change existing custom 
 logic descriptions, remove old description and add new description.
-->
<!ELEMENT AlterJdbcMirror (Database, Driver, JdbcMirror)>
<!ELEMENT JdbcMirror (Database?, Driver?, UserId?, Password?, SyncWindow?, 
 (AddCustomLogic | RemoveCustomLogic)*)>
 
<!--'AlterReplMaster' allows editing of existing DPropR master database 
information.-->
<!ELEMENT AlterReplMaster (System, Instance, Database, ReplMaster)>
<!ELEMENT ReplMaster (System?, Instance?, Database?, UserId?, 
                                          Password?, DatabaseAlias?)>
 
<!--'AlterReplMirror' allows editing of existing DPropR mirror 
database information. It is possible to add/remove one or more 
custom logic implementation classes to the mirror. To change existing 
custom logic descriptions, remove old description and add new description.
-->
<!ELEMENT AlterReplMirror (Database, ReplMirror)>
<!ELEMENT ReplMirror (Database?, UserId?, Password?, SyncWindow?, 
                       (AddCustomLogic | RemoveCustomLogic)*)>
 
 
<!--'AlterAdapter' can be used to change the description of an adapter. 
This is nearly never required.
-->
<!ELEMENT AlterAdapter (Name, Adapter)>
<!ELEMENT Adapter (Name?, Description?, FileAttributes?, 
					CommAttributes?, Signature?, ClassName?)>
 
 
<!--'AlterFileSubscription' tag can be used to list new settings for a 
file subscription. Synchronization requests to the online servers will be 
blocked during changes for a short period of time.
'Reset' tag which is an EMPTY tag, instructs the XML Scripting tool to
 mark the file subscription such that it will be resent to the devices. 
This is typically needed when the file is modified. Normally Sync Server 
does not automatically detect changes to the subscribed files.
A file subscription needs to be reset in order for the devices to 
receive new version of the file.
-->
<!ELEMENT AlterFileSubscription (Name, FileSubscription)>
<!ELEMENT FileSubscription (Name?, Description?, SubAdapter?, EncryptionLevel?, 
                             DeviceTypes?, SourceFileName?, TargetFileName?, 
                                                                      Reset?)>
 
<!ELEMENT Reset EMPTY>
 
<!--'AlterGroup' tag can be used to list new settings for a synchronization 
group. Using this tag, new subscription sets can be included into this 
group or existing ones can be excluded from this group. Data filters can 
be added or removed. The Group can be enabled or disabled. Name and 
description can also be changed if needed.
-->
<!ELEMENT AlterGroup (Name, Group)>
<!ELEMENT Group (Name?, Description?, Enabled?, 
                        (IncludeSubscriptionSet | ExcludeSubscriptionSet 
                          | AddDataFilter | RemoveDataFilter)* )>
                         
<!ELEMENT ExcludeSubscriptionSet (Name)>
 
<!--To alter a data filter, remove it first and add it again.-->
<!ELEMENT RemoveDataFilter (Name) >
 
<!--'Alteruser' tag can be used to list new settings for a synchronization 
user. Using this tag, the user can be assigned to a new group or if 
<NULL/> is specified for the 'UserGroup', the user will just be removed 
from it's current group.
 
User can add or remove data filter values that it overrides. Name, password 
and description can also be changed if needed.
LDAPProperties tag only applies in LDAP enabled environments. 
This tag lists LDAP specific properties of a user.
-->
<!ELEMENT AlterUser (Name,  User?)>
<!ELEMENT User (Name?, UserGroup?, Description?, Password?, LDAPProperties?,  
                  (OverrideDataFilter | RemoveDataFilter)* )>
 
<!-- LDAPProperties tag is sufficient
<!ELEMENT AlterLDAPProperties (FirstName?, LastName?, E-mail?, 
                                              PreferredLanguage?, Interest?)>
-->
 
<!--'AlterSubscriptionSet' is typically used to add/remove subscriptions to 
 a subscription set.-->                          
<!ELEMENT AlterSubscriptionSet (Name, SubscriptionSet?)>
<!ELEMENT SubscriptionSet (Name?, Description?, 
                                 (IncludeSubscription | ExcludeSubscription)* )>
 
<!ELEMENT ExcludeSubscription (Name)>
 
<!--'AlterJdbcSubscription' tag is typically used to add/remove tables of
a jdbc subscription. If you wish to change the mirror/master databases of 
a subscription, you need to create a new susbcription instead of changing 
an existing one. Note that, jdbc connection password of a database can be 
changed using AlterJdbcMirror, AlterJdbcMaster tags.'AlterTable' tag can be 
used to change syncrhonization and replication properties of a subscribed table.
It can also be used to add/remove indexes for a table. 
-->
<!ELEMENT AlterJdbcSubscription (Name, JdbcSubscription)>
  <!ATTLIST AlterJdbcSubscription Replicate (TRUE | FALSE) "TRUE">
 
<!ELEMENT JdbcSubscription (Name?, Description?,
                            EncryptionLevel?, Block?,  
                            (AddTable | RemoveTable | AlterTable)*)>
                         
<!ELEMENT AlterUploadSubscription (Name, UploadSubscription)>
<!ELEMENT UploadSubscription (Name?, Description?,  
                              EncryptionLevel?, Block?, 
                              (AddTable | RemoveTable | AlterTable)*)>
                                
<!ELEMENT AlterDproprSubscription (Name, DproprSubscription)>
<!ELEMENT DproprSubscription (Name?, Description?, 
                              EncryptionLevel?, Block?, 
                              (AddTable | RemoveTable | AlterTable)*)>
                              
<!ELEMENT RemoveTable (TargetSchema, TargetTable)>
<!ELEMENT AlterTable (TargetSchema, TargetTable, Table)>
<!ELEMENT Table (TargetSchema?, TargetTable?, SourceSchema?, SourceTable?, 
                 DeleteAuth?, InsertAuth?, UpdateAuth?, SelectAuth?, 
                 WhereClauseMirrorToMobile?, WhereClauseMasterToMirror?, 
                 JoinFilter?, TableSpace?, Order?, Encrypt?,
                 (AddIndex | AddCustomLogic |
                  RemoveIndex | RemoveCustomLogic)*)>
                      
<!ELEMENT RemoveIndex (Name)>
<!ELEMENT RemoveCustomLogic (PolicyType)>
 

Conceptos relacionados