If you change the character set or sort order of Adaptive Server, you must also change the character set or sort order of:
Each Replication Server that manages replication for the server
Each associated RSSD that resides on a separate Adaptive Server
If you change the sort order of Adaptive Server, you must also change the sort order of the replicate Replication Server and replicate data server to ensure that subscriptions are processed consistently.
After changing the character set or sort order, subscription semantics may change. Sort order changes can have obvious consequences. Suppose a subscription contains the clause “where last_name = MacGregor.” If the sort order is changed from dict to binary, for example, “MacGregor” no longer qualifies for sorting.
You must make sure that the primary and replicate databases are resynchronized after you change the character set or sort order. Sybase recommends that you use one of these methods:
Use rs_subcmp after changing the character set or sort order, or
Purge all subscriptions before changing the character set or sort order, and then rematerialize all subscriptions after changing the character set or sort order.
Use the purge and rematerialize method if any subscriptions contain character clauses. Only this method ensures that subscriptions with character clauses are resynchronized.
Changing the character set or sort order
All replicated transactions originating from Adaptive Server must arrive at the replicate data server before the character set or sort order is modified. In addition to changing the sort order or character set, this procedure ensures that no data corruption occurs resulting from changing the character set or sort order.
Identify all Replication Servers and Adaptive Servers that are associated with the primary Adaptive Server—including all RSSDs for associated Replication Servers.
If you are changing the character set: look up the character set of all Adaptive Servers in the Replication Server domain to ascertain if their character sets must also be changed. Sybase supports alternate character sets for servers in the same domain, but the implication for users is significant.
If you are changing the sort order: Sybase recommends that all data servers in the Replication Server domain share the same sort order. This ensures that data and identifiers are ordered consistently throughout the replication system.
Quiesce all primary updates and make sure that they have been processed by Replication Server.
If you are changing the character set, make sure that there are sufficient empty transactions to span a page in Adaptive Server. This ensures that after the Adaptive Server transaction log is emptied (see step 9), there will be no data still in the old character set.
Quiesce all associated Replication Servers.
Shut down all associated Replication Servers, RepAgents, and Replication Agents.
Change the character set and/or sort order in configuration files for the Replication Servers and, if applicable, for the Replication Agents.
Follow Adaptive Server procedures for changing the default character set and/or sort order of each associated Adaptive Server. See “Configuring Character Sets, Sort Orders, and Languages” in the Adaptive Server Enterprise System Administration Guide Volume 1.
Shut down all associated Adaptive Servers.
Start up the associated Adaptive Servers in single-user mode—unless you can guarantee that there will be no activity at the primary and replicate databases.
Remove the secondary truncation point from each associated Adaptive Server. This step allows Adaptive Server to truncate log records that the RepAgent has not yet transferred to the Replication Server. From the Adaptive Server, enter:
dbcc settrunc('ltm', 'ignore')
Truncate the transaction log. From the Adaptive Server, enter:
dump transaction db_name with truncate_only
Reset the secondary truncation point. From the Adaptive Server, enter:
dbcc settrunc('ltm', 'valid')
Reset the locator value for the primary database to zero. This step instructs Replication Server to get the new secondary truncation point from Adaptive Server and set the locator to that value. From the Adaptive Server, enter:
rs_zeroltm data_server, db_name
Shut down and restart Adaptive Server in normal mode.
Restart the associated Replication Servers.
Allow RepAgents (or Replication Agents) to reconnect to Replication Servers by resuming log transfer. From the Replication Server, enter:
resume log transfer from data_server.db_name
Start up RepAgents.
Restart replication.