The following steps describe a high level process for updating a distributed schema in which the master database is updated first, followed by the replica databases.
1 Set the catalog sync mode to MAINTENANCE so that the synchronization history feature is temporarily turned off, see SET SYNC MODE.
2 Lock a table or set of tables in the publication with the LOCK TABLE statement, see LOCK TABLE.
3 Make the required table or schema changes. For example, modify a table, add a new table, or modify a publication.
4 Update the value of the bulletin board parameter SYNC_APP_SCHEMA_VERSION by using the SET SYNC PARAMETER statement, see SET SYNC PARAMETER.
5 Upgrade application programs (if necessary).
6 Unlock the table(s) by using the UNLOCK TABLE statement, see UNLOCK TABLE.
7 Change the catalog sync mode from MAINTENANCE back to NORMAL.
After the master database has been updated, use a similar process to update the replica database.
This following topics give an example that creates and then updates the schema of a distributed system.