Icon PUBLISH DATABASE

Publishes the specified database so that updates are logged.

Syntax
PUBLISH DATABASE <DatabaseName>
[TABLES <TableName> [,<TableName>]]
[BY COLUMN|ROW]

Usage
Use this statement to publish the specified database so that any updates to the database tables are logged. Once a database table has been published using this statement, any logged updates to the table can be saved to an update file using the SAVE UPDATES statement and then loaded on a diffent copy of the database using the LOAD UPDATES statement.

The TABLES clause is optional and allows you specify a subset of tables from the database for publishing. The default behavior is to publish all tables in the database. If the specified tables, either via the TABLES clause, or all of the tables in the database, have been already published, then this statement is essentially ignored.

The BY clause is optional and allows you to specify how inserts and updates are logged and replicated after the table(s) has/have been published. If a table is published BY COLUMN, then only modified column values are logged when an insert or update takes place. If a table is published BY ROW, then all columns in a row are logged, even if they aren't modified in any way during the insert or update. The default logging method is BY COLUMN.

Information For updates and deletes, the column values for the primary key of the table are always logged, independently of the logging that takes place for other columns.

You can unpublish a database using the UNPUBLISH DATABASE statement.

Please see the Replication topic for more information on loading/saving updates for a database.

Examples
-- This example publishes the Transaction
-- table in the Accounting database

PUBLISH DATABASE Accounting
TABLES Transaction

Required Privileges
The current user must be granted the MAINTAIN privilege on the current database in order to execute this statement. Please see the User Security topic for more information.

SQL 2003 Standard Deviations
This statement deviates from the SQL 2003 standard in the following ways:

DeviationDetails
ExtensionThis SQL statement is an ElevateDB extension.
Image