Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Creating remote databases – PB Docs 100 – PowerBuilder Library

Creating remote databases – PB Docs 100

Creating remote databases

Any ASA database can be converted for use as a remote database
in a MobiLink installation. You can also create a new ASA remote
database that uses all or part of the schema of the consolidated
ASA database.

You create the database on your desktop using the Sybase Central
Adaptive Server Anywhere plug-in, the Create ASA Database utility
in the Database painter, or another tool. If your database uses
an English character set, use the 1252 Latin1 collation sequence.

To use a database as a remote database for MobiLink synchronization,
you need to create at least one publication and MobiLink user, then
add a subscription to the publication for the user. See “Creating and modifying publications”, “Creating MobiLink users”, and “Adding subscriptions”.

Remote database schemas

Tables in a remote database need not be identical to those
in the consolidated database, but you can often simplify your design
by using a table structure in the remote database that is a subset
of the one in the consolidated database. Using this method ensures
that every table in the remote database exists in the consolidated
database. Corresponding tables have the same structure and foreign
key relationships as those in the consolidated database.

Tables in the consolidated database frequently contain extra
columns that are not synchronized. Extra columns can even aid synchronization.
For example, a timestamp column can identify new or updated rows
in the consolidated database. In other cases, extra columns or tables
in the consolidated database might hold information that is not
required at remote sites.

For more information about the relationship between consolidated
and remote databases, see the MobiLink Synchronization
User’s Guide

.

Creating and modifying publications

You create publications using Sybase Central or the SQL CREATE PUBLICATION statement.
In Sybase Central, all publications and articles appear in the Publications
folder. This section describes how to create publications in Sybase
Central. For information about creating and modifying publications
using SQL, see the MobiLink
Synchronization User’s Guide

.

Connecting to Sybase Central

You use the Adaptive Server Anywhere plug-in in Sybase Central,
not the MobiLink Synchronization plug-in, to work with MobiLink
clients and remote databases. The Adaptive Server Anywhere plug-in
has a MobiLink Synchronization Client folder where you perform all
actions related to remote databases. For information on starting
Sybase Central from the PowerBuilder design time environment, see
the User’s Guide
.

You must have DBA authority to create or modify publications,
MobiLink users, and subscriptions.

proc.gif To connect to Sybase Central to work with MobiLink
Synchronization clients:

  1. Start Sybase Central, select Tools>Connect
    from the Sybase Central menu bar, select Adaptive Server Anywhere
    from the New Connection dialog box, and click OK.

  2. On the Identification page in the Connect dialog
    box, enter DBA as the user name and SQL as
    the password, select the ODBC DataSource Name radio button, browse
    to select the remote database, and click OK.

  3. In the Adaptive Server Anywhere plug-in, expand
    the node for the remote database and open the MobiLink Synchronization
    Client folder.

Publishing all the rows and
columns in a table

The simplest publication you can create is a single article
that consists of all rows and columns of one or more tables. The
tables must already exist.

proc.gif To publish one or more entire tables in Sybase
Central:

  1. Connect to Sybase Central as described
    in “Connecting to Sybase Central”.

  2. Open the Publications folder and double-click
    Add Publication.

  3. Type a name for the new publication and click
    Next.

  4. On the Tables page, select a table from the list
    of Matching Tables and click Add.

    The table appears in the list of Selected Tables on the right.

  5. Optionally, add more tables. The order of the
    tables is not important.

  6. Click Finish.

Publishing only some columns in a table

You can create a publication that contains all the rows but
only some of the columns of a table.

proc.gif To publish only some columns in a table in Sybase
Central:

  1. Follow the first four steps of the procedure
    in “Publishing all the rows and
    columns in a table”
    .

  2. On the Columns page, double-click the table’s
    icon to expand the list of available columns, select each column
    you want to publish, and click Add.

    The selected columns appear on the right.

  3. Click Finish.

Publishing only some rows in a table

You can create a publication that contains some or all of
the columns in a table, but only some of the rows. You do so by
writing a search condition that matches only the rows you want to
publish.In MobiLink, you can use the WHERE clause
to exclude the same set of rows from all subscriptions to a publication.
All subscribers to the publication upload any changes to the rows
that satisfy the search condition.

proc.gif To create a publication using a WHERE clause in
Sybase Central:

  1. Follow the first four steps of the procedure
    in “Publishing all the rows and
    columns in a table”
    .

  2. On the Where page, select the table and type the
    search condition in the lower box.

    Optionally, you can use the Insert dialog box to help you
    format the search condition.

  3. Click Finish.

Adding articles

You can add articles to existing publications.

proc.gif To add articles in Sybase Central:

  1. Connect to Sybase Central and open the
    MobiLink Synchronization Client folder as described in “Connecting to Sybase Central”.

  2. Open the Publications folder and double-click
    the name of the publication to which you want to add an article.

  3. Double-click Add Article.

  4. In the Article Creation wizard, select a table
    and click Next.

  5. If you want only some columns to be synchronized,
    select the Selected Columns radio button and select the columns.

  6. If you want to add a WHERE clause,
    click Next and enter the clause.

  7. Click Finish.

Modifying and removing publications and articles

You can modify or drop existing publications in Sybase Central
by navigating to the location of the publication and selecting Properties
or Delete from its pop-up menu. You can modify and remove articles
in the same way.

Publications can be modified only by the DBA or the publication’s
owner. You must have DBA authority to drop a publication. If you
drop a publication, all subscriptions to that publication are automatically
deleted as well.

note.gif Avoid altering publications in a running MobiLink setup Altering publications in a running MobiLink setup is likely
to cause replication errors and can lead to loss of data unless
carried out with care.

Creating MobiLink users

MobiLink users are not the same as database users. Each type
of user resides in a different namespace. MobiLink user IDs can
match the names of database users, but there is no requirement that
they match.

proc.gif To add a MobiLink user to a remote database in
Sybase Central:

  1. Connect to Sybase Central and open the
    MobiLink Synchronization Client folder as described in “Connecting to Sybase Central”.

  2. Open the MobiLink Users folder and double-click
    Add MobiLink User.

  3. Enter a name for the MobiLink user.

    The name is supplied to the MobiLink synchronization server
    during synchronization. In production databases, each user name
    is usually added to the consolidated database, then provided to
    the individual user.

  4. Click Finish.

proc.gif To configure MobiLink user properties in Sybase
Central:

  1. Connect to Sybase Central and open the
    MobiLink Synchronization Client folder as described in “Connecting to Sybase Central”.

  2. Open the MobiLink Users folder, right-click the
    MobiLink user, and select

    Properties from the pop-up menu.

  3. Change the properties as needed.

proc.gif To drop a MobiLink user in Sybase Central:

  1. Connect to Sybase Central and open the
    MobiLink Synchronization Client folder as described in “Connecting to Sybase Central”.

  2. Open the MobiLink Users folder, right-click the
    MobiLink user, and select

    Delete from the pop-up menu.

note.gif Dropping MobiLink users You must drop all subscriptions for a MobiLink user before
you drop the user from a remote database.

Adding MobiLink users
to the consolidated database

The consolidated database contains a table called ml_user that
is used to authenticate the names of MobiLink users when a synchronization
is requested. When you add a user to a remote database, you need
to be sure that the user is also added to the ml_user table.

You can add users automatically by selecting the Automatic
Addition of Users check box in the MobiLink Synchronization Server
Options dialog box and then starting the server. You open this dialog
box from the Utilities folder in the Database painter or Database
Profiles dialog box. You can also start the server from a command
prompt, passing it the -zu+ switch.

Any users defined in the remote database are added to the ml_user table
in the consolidated database, as long as the script for the authenticate_user connection
event is undefined. Typically the -zu+ switch
is not used in a production environment. Names are usually added
to the ml_user table in the consolidated
database, then added to each of the remote databases. Each user is
given a unique name and optional password.

Adding subscriptions

A synchronization subscription links a particular MobiLink
user with a publication. It can also carry other information needed
for synchronization. For example, you can specify the address of
the MobiLink server and other connection options. Values for a specific
subscription override those set for individual MobiLink users.

note.gif Overriding options in the wizard You can override the MobiLink server name and port set for
the subscription and user in the MobiLink Synchronization for ASA
wizard.

Synchronization subscriptions are required in MobiLink ASA
remote databases. Server logic is implemented through synchronization
scripts, stored in the MobiLink system tables in the consolidated
database.

A
single ASA database can synchronize with more than one MobiLink synchronization
server. To allow synchronization with multiple servers, create different
subscriptions for each server.

proc.gif To add a subscription for a MobiLink user in Sybase
Central:

  1. Connect to Sybase Central and open the
    MobiLink Synchronization Client folder as described in “Connecting to Sybase Central”.

  2. Open the MobiLink Users folder, right-click the
    user for whom you want to add a subscription, and select Properties
    from the pop-up menu.

  3. On the Subscriptions page, click the Subscribe
    button.

  4. Select the Publication for which you want to add
    a subscription and click OK.

proc.gif To modify a subscription in Sybase Central:

  1. Connect to Sybase Central and open the
    MobiLink Synchronization Client folder as described in “Connecting to Sybase Central”.

  2. Open the MobiLink Users folder, right-click the
    MobiLink user, and select Properties from the pop-up menu.

  3. On the Subscriptions page, select the subscription
    you want to change and click Advanced.

  4. Change the properties as needed.

proc.gif To delete a synchronization subscription in Sybase
Central:

  1. Connect to Sybase Central and open the
    MobiLink Synchronization Client folder as described in “Connecting to Sybase Central”.

  2. Open the MobiLink Users folder, right-click the
    MobiLink user, and select Properties from the pop-up menu.

  3. On the Subscriptions page, select the subscription
    you want to delete and click Unsubscribe.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x