Setting up the client message store

To create a client message store

  1. Create a SQL Anywhere or UltraLite database.

    See Creating a database.

  2. Initialize each client message store by running the QAnywhere Agent or the QAnywhere UltraLite Agent with the following options:

    • -c option   to specify a connection string to the database you just created.

      See -c option.

    • -si option   to initialize the database. The -si option creates a default database user and password. The agent shuts down after initializing the database.

      When you initialize QAnywhere by running qaagent with the -si option, the QAnywhere Agent creates client system tables that are required for QAnywhere messaging. QAnywhere also uses server system tables. These are created when you install MobiLink setup. All QAnywhere system table names begin ml_qa_ and cannot be altered.

      See -si option.

    • -id option   optionally, if you want to pre-assign a client message store ID.

      See Creating client message store IDs and -id option.

    • -mu option   optionally, if you want to create a user name to use for authentication with the MobiLink server. If you do not use -mu at this point, you can specify it any time you start the QAnywhere Agent and the name is created if it does not already exist.

  3. If you used the -mu option to create a user name, you need to add the name to the server message store. This can be done automatically using the mlsrv11 -zu+ option, or can be done in other ways.

    See Registering QAnywhere client user names.

  4. Change the default passwords and take other steps to ensure that the client message store is secure.

    See Creating a secure client message store.

You can also upgrade a client message store that was created in a previous version of QAnywhere.

See -su option and -sur option.

Note

The easiest way to create and maintain your client message store is in Sybase Central. From the QAnywhere plug-in task pane, choose Client Message Store.

Creating client message store IDs

If you do not specify a client message store ID, then the first time you run qaagent after you run qaagent with -si, the device name is assigned as the client message store ID. The ID appears in the QAnywhere Agent window.

You may find it convenient to specify an ID manually. You can do so in the following ways:

  • Specify the ID with the qaagent -id option when you use the qaagent -si option to initialize the client message store.
  • Specify the ID with the -id option the first time you run qaagent after you initialize the client message store.

See QAnywhere Agent utilities reference.

Client message store IDs must differ by more than case. For example, don't have two message store IDs called AAA and aaa.

The client message store ID has a limit of 128 characters.

Transaction logs

It is recommended that you use a transaction log, both because a SQL Anywhere database runs most efficiently when using one and because transaction logs provide protection if there is database failure. However, the transaction log can grow very large. For this reason, the QAnywhere Agent by default sets the dbsrv11 -m option, which causes the contents of the transaction log to be deleted at checkpoints. This is recommended. If you specify the StartLine parameter in the qaagent -c option, you should specify -m.

Protecting your client message stores

For information about backup and recovery, see Designing a backup and recovery plan.

Example of creating a client message store

The following command creates a SQL Anywhere database called qanyclient.db. (The dbinit -i and -s options are not required, but are good practice on small devices.)

dbinit -i -s qanyclient.db

The following command connects to qanyclient.db and initializes it as a QAnywhere client database:

qaagent -si -c "DBF=qanyclient.db"

See Initialization utility (dbinit) and QAnywhere Agent utilities reference.