You can separately upgrade Adaptive Server in your replication system. Prerequisites
Sybase strongly recommends you perform a dump database and dump transaction before upgrading Adaptive Server.
Task
Suspend replication and transaction activity in the database. Replication activity includes creating and dropping both routes and subscriptions.
2. Draining Transaction Logs for Primary Databases
Ensure that the Replication Server completely processes the preupgrade log for each primary database you are upgrading.
3. Draining the RSSD Transaction Log
Create a replication definition to manually drain the RSSD transaction log. This ensures that Replication Server processes all transactions in the RSSD log before you upgrade databases if Replication Server has routes to other Replication Servers.
4. Disabling the Secondary Truncation Point
Turn off the secondary truncation point for the duration of the upgrade and when you upgrade a primary database, the Replication Agent cannot be running.
5. Upgrading Adaptive Server
See the Adaptive Server Enterprise Installation Guide for upgrade instructions. 6. Restoring Replication
Restore replication after you perform the upgrade procedure.
Suspending Replication and Transaction Activity in the Database
Suspend replication and transaction activity in the database. Replication activity includes creating and dropping both routes and subscriptions.
1. Verify that the subscriptions you have created with primary data in the databases being upgraded, have reached a “valid” state at the primary Replication Server.
Do not upgrade while the subscriptions are being created.
Make sure no users create subscriptions for the data in the database you are upgrading until the upgrade procedure is finished.
2. Run rs_helproute in each RSSD being upgraded to determine its status.
The status of all routes should be “Active.” See Replication Server Administration Guide Volume 1 > Managing Routes to resolve route problems.
3. Shut down the applications that are using the databases you are upgrading.
4. Use the admin who command in Replication Server to identify the existing Data Server Interface (DSI) connections to the data server being upgraded.
5. Suspend all DSI connections to databases you are upgrading. For each database, issue: suspend connection to dataserver.database
Draining Transaction Logs for Primary Databases
Ensure that the Replication Server completely processes the preupgrade log for each primary database you are upgrading.
1. Wait for all remaining transactions to be replicated. 2. Execute:
admin who, sqm
Find the entry that corresponds to the inbound queue for this database by looking in the Info field for the queue_number and queue_type entry. For an inbound queue, the queue type is 1. Note the last segment:block entry for the queue.
3. Open the queue dump file:
sysadmin dump_file, "file_name"
where file_name is the file to which you are dumping.
4. Create a dummy table to check that the Replication Server has received the latest log record written in the log. You can drop this table later.
create table dummy (c1 int, c2 char(255)) go
sp_setreptable dummy, true go
begin tran go
insert dummy values (1,'hello') go 10
commit tran go
5. In the primary Replication Server, execute the admin who, sqm command until the last segment:block entry for the inbound queue changes.
6. In Replication Server, dump the last block of the inbound queue to the dump file you created in step 3:
sysadmin dump_queue, queue_number, queue_type, last_seg, block, 1
Use the queue_number, queue_type, last_seg, and block values found in the output of the
admin who, sqm command in step 5.
7. Use a text editor to examine the dump file to make sure it contains the transaction corresponding to the inserts you performed in step 4.
8. Repeat steps 5 through 7 until the transaction corresponding to the update is in the dump file. After draining the transaction logs, do not allow any other activity in the databases. If activity does occur, you must redrain the transaction logs.
Draining the RSSD Transaction Log
Create a replication definition to manually drain the RSSD transaction log. This ensures that Replication Server processes all transactions in the RSSD log before you upgrade databases if Replication Server has routes to other Replication Servers.
To make sure the transaction log is completely processed, create a replication definition in the primary Replication Server and verify that it appears in the replicate Replication Server RSSD. When the replication definition is in the replicate RSSD, the log is fully processed.
1. Log in to the primary Replication Server. 2. Create a temporary replication definition:
create replication definition rep_def_name with primary at dataserver.database
with all tables named 'table_name'(column_name datatype) primary key (column_name)
Provide the names for the data server, database, table, and column, and the datatype of the column. See the Replication Server Reference Manual for the complete syntax.
3. Log in to the replicate RSSD.
4. See whether the replication definition has arrived from the primary RSSD: rs_helprep rep_def_name
When the replication definition has arrived in the replicate RSSD, the RSSD transaction log has been drained.
Disabling the Secondary Truncation Point
Turn off the secondary truncation point for the duration of the upgrade and when you upgrade a primary database, the Replication Agent cannot be running.
1. Shut down the Replication Agents, or make sure that dbcc logtransfer is not running for the databases that are being upgraded.
2. Shut down Replication Servers for the RSSDs you are upgrading.
3. In each primary database including RSSDs, turn off the secondary truncation point: use database
go
dbcc settrunc ("ltm", "ignore") go
Repeat step 3 for each primary database and each primary RSSD.
Upgrading Adaptive Server
See the Adaptive Server Enterprise Installation Guide for upgrade instructions.