Appearance
Monitoring Replication
You can monitor replication by writing system view queries. You can also monitor replication from a WLM perspective.
System Views
Write queries against the following system views on the source system:
- sys.replica (list database replicas)
- sys.replica_status (show current state of replication activity)
- sys.log_replica_status (show the history of replication activity)
- sys.remote_server (list remote servers available for replication)
- sys.backup_snapshot (list backup snapshots)
- sys.backup_chain (list backup chains)
If you are using database replication and taking backups with ybbackup
, the sys.backup_chain
and sys.backup_snapshot
views contain information about chains and snapshots that apply to both types of operations.
Backup and restore operations that are run for the purposes of database replication use the following application name: replication service
. You can constrain rows in the sys.query
, sys.log_query
, sys.session
, and sys.log_session
views by using the following condition:
where application_name='replication service'
See the view descriptions for examples.
WLM Monitoring for Replication Operations
On the source and target systems, look for operations run by the replication service
application and the sys_ybd_replicator
system user. For example, on a source system, you will see that a resource pool in the active WLM profile is managing replication tasks that read and send data from a specific backup snapshot to the target system.
Note: For loopback replication, make sure your active resource pool has a maximum/minimum concurrency setting of at least 2/2
.
If you are not sure which resource pool is running replication operations, run a query against the sys.log_query
view. For example:
premdb=# select distinct pool_id from sys.log_query
where application_name='replication service' and database_name='premdb';
pool_id
--------------------
replication: large
(1 row)