Command line scripts for the DB2 Everyplace Sync Server

The following tables list the scripts that are available to operate and administer the DB2 Everyplace Sync Server, and the proper usage to run these scripts. There are two main locations for the scripts.

DB2 Everyplace Sync Server and Mobile Device Administration Center commands location

DB2 Everyplace Sync Server instance administration commands location

The commands for UNIX/Linux and Windows platforms are very similar, except that UNIX and Linux scripts have a .sh extension, and Windows batch files have a .bat extension. The following tables assume Windows usage, but the command and syntax are functionally equivalent on UNIX/Linux platforms.

Tabulka 219. Commands, for UNIX, Linux, and Windows

Command Purpose Usage
dsyadmin.bat

This command starts the DB2 Everyplace Mobile Device Administration Center (MDAC). MDAC provides a GUI to administer users, groups, subscription sets, and subscriptions.

See What is the Mobile Devices Administration Center? for more information about using MDAC.

For Linux servers, the DB2 JDBC Applet Server must be started prior to starting MDAC. To start the DB2 JDBC Applet Server, type db2jstrt. The default port for the DB2 JDBC Applet Server is 6789. You can provide a free port as an optional parameter to this script. You must restart the DB2 JDBC Applet Server after restarting your computer. If you start the DB2 JDBC Applet Server on a port other than 6789, you must provide that port to dsyadmin.sh.

For Windows:

dsyadmin.bat

For Linux:

db2jstrt [a free port number]
./dsyadmin.sh [DB2 JDBC Applet Server port]
 

For Solaris and AIX:

./dsyadmin.sh
dsyadminxml.bat

This command runs the MDAC XML to manage MDAC configurations from the command line using XML files. The XML tool can perform add, remove, and alter operations on MDAC objects. MDAC objects include DB2 Everyplace users, groups, subscription sets and subscriptions.

See Utilizing the XML Scripting tool for complete usage information.

For help, type

dsyadminxml.bat

with no arguments:

Command line parameters:

-x|-d filename
-x filename [-add] [-remove]
  • -x create XML file from control database
  • -d apply XML file to control database
  • filename XML file name to process. -x will override file if it already exists.
  • [-add] [-remove] are XML Types that add to the sync server control database or remove what is already there
dsyblocksubscription.bat This command blocks the subscription name provided in the command argument. More than one subscription can be named at once on the command line. Blocking a subscription will instruct the Sync Server to reject new changes from being applied to the subscription data.
dsyblocksubscription.bat  [subscription]

[subscription] is the subscription to block on the server

For example:

dsyblocksubscription subscriptionName1

would block the subscription with the name 'subscriptionName1'.

dsyctldb.bat This command creates the DB2 Everyplace Control database. This command is normally run automatically by the DB2 Everyplace installation.
dsyctldb.bat <db2instance> <db2instance password>
dsyjdbcmigration.bat This command migrates JDBC subscriptions from Sync Server v8.1.2 and earlier to Sync Server v8.1.4 and later.
dsyjdbcmigration.bat [sourceDatabaseUrl
sourceTableSpace][sourceDatabaseUrl sourceTableSpace sourceTableName]

where

  • sourceDatabaseUrl is the URL of the source database to migrate
  • sourceTableSpace is the name of the tablespace in which Sync Server control tables should be created
  • sourceTableName is the name of the source table to migrate

For example, to migrate all subscriptions, type:

dsyjdbcmigration.bat

To migrate the subscriptions on the VNURSE database using the tablespace named 'mytablespace', type:

dsyjdbcmigration.bat jdbc:db2:VNURSE mytablespace

To migrate the subscriptions on the table DSYSAMPLE.VNMEDICALRECORD in the VNURSE database using the tablespace named 'mytablespace', type:

dsyjdbcmigration.bat jdbc:db2:VNURSE mytablespace
    dsysample.vnmedicalrecord
dsymigratemessagestore.bat This command is used by installation only when migrating. Users that have not completed their last synchronization will be reset, thus forcing a refresh on the next synchronization. Any data uploaded by the incomplete synchronization may be lost.
dsymigratemessagestore.bat
dsymsgclean.bat For multiple server environments, this command removes all messages from the message store database.
dsymsgclean.bat
dsymsgdb.bat This command is used by installation for multiple server environments. It creates the necessary message store database. dsymsgdb.bat
dsyreplicate.bat This command tells DB2 Everyplace to replicate the data located in the mirror database to the source at the first opportunity.
dsyreplicate.bat [mirror_database]
dsyreset.bat

Reset a user, device or group of users.

For help, type dsyreset.bat with no arguments.

dsyreset.bat {[user name]} {-device [device id]}
 {-group [group name]} {-all}

where

  • [user name] is the user name to reset
  • [device id] is the device id to be reset
  • [group name] is the group name to reset all users belonging to a group

For example, to reset the user named 'bob', type:

dsyreset.bat bob

To reset all users belonging to the group 'Sales', type

dsyreset.bat -group Sales
dsyResetUserMigration.bat Generates an XML script to reset the users whose last synchronizations were determined to be incomplete. The input to this command takes the URL, user ID, and password for access to the control database and an absolute file name which will be the output XML file. This XML script can be run at any time. This command is normally executed during installation.
dsyResetUserMigration jdbc:db2:dsyctldb <userID> 
<password> <filename.xml>

where

  • userID is the user ID of a DB2 Administrator
  • password is the password for the userID you specified
  • filename.xml is the output XML file
dsysetenv.bat This script sets the environment variables specific to the DB2 Everyplace Sync Server.
dsysetenv.bat
dsysetjavahome.bat This script command may be modified to add JDBC drivers to the classpath for MDAC. To add native libraries that these drivers may need, add those entries to dsysetenv.bat. Note that the JDBC drivers also have to be added to the application server classpath that runs the DB2 Everyplace Servlets.
dsysetproperty.bat Query or set a property in the control database DSY.PROPERTIES table. Type
 dsysetproperty.bat
without arguments for instructions.
dsysync.bat

This command launches the embedded version of the WebSphere Application Server version 5 that executes the DB2 Everyplace servlets. It will launch the server process in the background, and then exit. This command takes no arguments.

If DB2 Everyplace is installed in another application server, such as WebSphere Application Server version 5, use the appropriate commands for that server.

dsysync.bat
dsysyncmonitor.bat This command launches a GUI tool that helps view log information about users that are currently synchronizing. The GUI can be configured to update at different intervals to display the latest information.
dsysyncmonitor.bat
dsysyncstatus.bat

This command prints the execution status of the DB2 Everyplace server that is installed in the embedded version of the WebSphere Application Server version 5. The server can be started, running, or stopped. This command takes no arguments.

If DB2 Everyplace is installed in another application server, such as WebSphere Application Server version 5, please use the appropriate commands for that server.

dsysyncstatus.bat
dsysyncstop.bat

This command stops the embedded version of the WebSphere Application Server version 5 that executes the DB2 Everyplace servlets. It will issue the stop request to the server process that is running, print the status, and then exit. This command takes no arguments.

If DB2 Everyplace is installed in another application server, such as WebSphere Application Server version 5, use the appropriate commands for that server.

dsytrace [0 | 1] [-console]
 

where

  • 0 turns tracing off except for errors
  • 1 turns all tracing on
  • -console disables tracing to console window

For example, to turn all tracing on and not display in console window, type:

dsytrace 1 -console 
dsytraceprocess.bat Used to expand the timestamp format in the tracefiles to "yyyymmdd hh:mm:ss.ms" format.
dsytraceprocess.bat -F <tracefileName> -O <true|false> 
 

The -O option is used to indicate the overwrite flag. When specified to be true, the original trace file will be overwritten by the converted trace file with expanded timestamps. Otherwise the resulting trace files will be named as originalTraceFile.new.

dsyunblocksubscription.bat This command unblocks the subscription name provided in the command argument. More than one subscription can be named at once on the command line. Unblocking a subscription that was previously blocked will instruct the Sync Server to resume accepting new changes from the clients as a part of this subscription or these subscriptions.
dsyunblocksubscription [subscription]+

where

  • [subscription] is the subscription to unblock on the server.

For example, to unblock the subscription with the name 'bob', type:

dsyunblocksubscription bob

To unblock both the subscriptions named 'bob' and 'sally', type:

dsyunblocksubscription bob sally
dsyversion.bat This command determines the version of the control database by querying the dsy.properties table.
dsyversion.bat
useUdb8.bat This script sets the class path for the Mobile Devices Administration Center to be used with DB2 UDB Version 8.1.
useUdb8.bat
useUdbFp7_8.bat This script sets the class path for the Mobile Devices Administration Center to be used with DB2 UDB Version 7.2, Fix pack 7 or later.
useUdbFp7_8.bat

The following table lists the scripts specific to the DB2 Everyplace Sync Server on UNIX and Linux servers.

Tabulka 220. DB2 Everyplace Sync Server instance administration scripts

Command Purpose Usage
dsyidrop.sh This script drops a DB2 Everyplace Sync Server instance.
dsyidrop.sh <dsyinstance>
where <dsyinstance> is the name of
the DB2 Everyplace Sync Server 
instance to be dropped.
dsyicreate.sh This script is used to create a DB2 Everyplace Sync Server instance. The DB2 Everyplace Sync Server instance must be an existing user on the system and must be a DB2 UDB instance.

To display the parameters required to create a DB2 Everyplace Sync Server instance, type :

dsyicreate.sh
dsyilist.sh This script lists the DB2 Everyplace Sync Server instances currently defined.
dsyilist.sh