Taking Subscriptions Offline/Online

The ability to take a subscription offline/online should be used when significant changes are made on the source tables. In this case, moving subscriptions to offline will suspend staging of changes and will require a new baseline in order to make new changes available. This option is particular useful if a set of tables is restored or loaded with a large number of new rows.

This functionality allows significant changes to be made to a source file or a set of source files (e.g., dropping/re-creating source tables or adding/removing members from tables) without requiring the user to re-create the subscriptions in SQDR.

Taking a subscription offline will flag a given source table as being unavailable for normal Capture Agent processing (e.g., staging changes), until further notice. A subscription in the offline state appears to the SQDR client as if there is no activity on the subscribed table. This allows a database administrator to restore the table to a desired version without the Capture Agent processing and staging all records, which may cause significant delay on large tables.

Once the restore operation is complete, the administrator uses the Take Subscription Online option to notify the Capture Agent to resume processing for the subscribed table. At this point the Capture Agent will compare its saved metadata for the table to its current state. If the structure of the subscribed table is unchanged, the SQDR client is notified that only a new baseline snapshot is required. If there have been structural changes or if the subscribed table no longer exists, a "table altered or deleted" notification is generated and the subscription must be deleted and re-created. If the subscription is already online when you issue the online request, no changes occur.

If the table is no longer journaled after the restore, SQDR Plus will attempt to restore journaling for the table. If the attempt to start journaling fails, the subscribed table will remain "offline".

To perform the Online and Offline operations with SQDR Control Center:

  1. Open the Subscriptions panel by selecting a database agent in the left panel and then selecting Subscriptions in the right panel.

  2. Select the checkbox next to the subscription, or select all subscriptions with the checkbox on the heading bar.

  3. Select Online or Offline from the Resource menu.

The Online/Offline functions take effect immediately.

To perform the Online and Offline operations with VRYSUB command:

You can also take subscriptions offline and online from an IBM i command line or within a CLP by adding the SQDR Plus schema to the library list and running the VRYSUB command. Provide the name of the library where the source file is located, the name of the source file(s), the desired status (*OFFLINE or *ONLINE) and the SQDR Plus schema (typically SQDR), as shown in the example below.  The operations can be performed on multiple libraries (or schemas) and tables by using IBM i CL wildcards.



Vary Subscription (VRYSUB)
Type choices, press Enter.

Library         PRODLIB   Name, generic*, *ALL
File            CUSTLIST  Name, generic*, *ALL
Status          *OFFLINE  *OFFLINE, *ONLINE
Install Library SQDR      Character value