Altering existing publications

After you have created a publication, you can alter it by adding, modifying, or deleting articles, or by renaming the publication. If an article is modified, the entire specification of the modified article must be entered.

You can perform these tasks using Sybase Central or with the ALTER PUBLICATION statement.

Notes
  • Publications can be altered only by the DBA or the publication's owner.
  • Be careful. In a running MobiLink setup, altering publications may cause errors and can lead to loss of data. If the publication you are altering has any subscriptions, then you must treat this change as a schema upgrade. See Schema changes in remote clients.

To modify the properties of existing publications or articles (Sybase Central Admin mode)

  1. Connect to the remote database as a user who owns the publication or as a user with DBA authority.

  2. In the left pane, click the publication or article. The properties appears in the right pane.

  3. Configure the properties.

To add articles (Sybase Central Admin mode)

  1. Connect to the remote database as a user who owns the publication or as a user with DBA authority using the SQL Anywhere plug-in.

  2. Open the Publications folder.

  3. Select a publication.

  4. From the File menu, choose New » Article. The Create Article Wizard appears.

  5. In the Create Article Wizard, do the following:

    • On the first page, select a table.
    • On the next page, select the number of columns.
    • On the final page, enter a WHERE clause (if desired).
  6. Click Finish to create the article.

To remove articles (Sybase Central Admin mode)

  1. Connect to the database as a user who owns the publication or as a user with DBA authority using the SQL Anywhere plug-in.

  2. Open the Publications folder.

  3. Click the publication.

  4. In the right pane, right-click the article you want to delete and choose Delete from the popup menu.

To modify an existing publication (SQL)

  1. Connect to the remote database as a user who owns the publication or as a user with DBA authority.

  2. Connect to the database as a DBA user.

  3. Execute an ALTER PUBLICATION statement.

    See ALTER PUBLICATION statement [MobiLink] [SQL Remote].

Example
  • The following statement adds the customer table to the pub_contact publication.
    ALTER PUBLICATION pub_contact (
     ADD TABLE customer
    )

See also the ALTER PUBLICATION statement [MobiLink] [SQL Remote].