replicationStatus β
Command:
replicationStatus
Category: System Tools
Status: Production Ready
Description β
Monitors SAP HANA system replication status. This command displays real-time information about system replication sites, services, and replication lag, which is essential for high availability and disaster recovery monitoring.
Syntax β
hana-cli replicationStatus [options]Command Diagram β
Aliases β
replstatusreplicationreplstat
Parameters β
Options β
| Option | Alias | Type | Default | Description |
|---|---|---|---|---|
--type | -ty | string | system | Replication mode. Choices: system, service |
--serviceName | -sn | string | - | Filter by service name (for service mode) |
--detailed | -d | boolean | false | Include detailed replication output |
--watch | -w | boolean | false | Refresh continuously every 5 seconds |
--profile | -p | string | - | Connection profile |
For a complete list of parameters and options, use:
hana-cli replicationStatus --helpReplication Modes β
- PRIMARY: Primary site
- SYNC: Synchronous replication
- SYNCMEM: Synchronous in-memory replication
- ASYNC: Asynchronous replication
Replication Status Values β
- ACTIVE: Replication is running normally
- SYNCING: Initial synchronization in progress
- ERROR: Replication encountered an error
- UNKNOWN: Status cannot be determined
- NOT_CONFIGURED: System replication not set up
Output Format β
System Replication Output β
Checking system replication status
Found 2 replication site(s)
βββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββ¬βββββββββββββββββββ¬βββββββββββββββββββββ¬βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββ
β SITE_ID β SITE_NAME β HOST β PORT β REPLICATION_MODE β REPLICATION_STATUS β SHIPPED_LOG_POSITION_TIMEβ LAST_LOG_POSITION_TIME β SECONDARY_ACTIVE_STATUSβ
βββββββββββΌββββββββββββΌββββββββββββΌββββββββΌβββββββββββββββββββΌβββββββββββββββββββββΌβββββββββββββββββββββββββββΌβββββββββββββββββββββββββββΌβββββββββββββββββββββββββ€
β 1 β PRIMARY β hana-prod β 30013 β PRIMARY β ACTIVE β 2026-02-16 14:30:45 β 2026-02-16 14:30:45 β YES β
β 2 β SECONDARY β hana-dr β 30013 β SYNCMEM β ACTIVE β 2026-02-16 14:30:43 β 2026-02-16 14:30:45 β YES β
βββββββββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββ΄βββββββββββββββββββ΄βββββββββββββββββββββ΄βββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββ΄βββββββββββββββββββββββββService Replication Output β
ββββββββββββββββ¬βββββββββββββββββββββ¬βββββββββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββββββββββ
β SERVICE_NAME β REPLICATION_STATUS β SHIPPED_SAVE_COUNT β REPLAY_BACKLOG_SIZEβ LAST_UPDATE_TIME β
ββββββββββββββββΌβββββββββββββββββββββΌβββββββββββββββββββββΌββββββββββββββββββββΌβββββββββββββββββββ€
β indexserver β ACTIVE β 524288 β 0 β 2026-02-16 14:30 β
β nameserver β ACTIVE β 98765 β 0 β 2026-02-16 14:30 β
β xsengine β ACTIVE β 45123 β 256 β 2026-02-16 14:29 β
ββββββββββββββββ΄βββββββββββββββββββββ΄βββββββββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββββββββββDetailed Information Output β
When using -d flag:
Detailed Replication Information
βββββββββββββββββ¬βββββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββββββββββ¬βββββββββββββββββ¬ββββββββββββββββββββββββββ¬ββββββββββββββββββββββββ¬βββββββββββββββββββββ
β SECONDARY_HOSTβ SECONDARY_PORT β SECONDARY_SITE_NAMEβ REPLICATION_MODE β OPERATION_MODE β SHIPPED_LOG_BUFFERS_COUNTβSHIPPED_LOG_BUFFERS_SIZEβ ASYNC_BUFFER_USAGE β
βββββββββββββββββΌβββββββββββββββββΌββββββββββββββββββββΌβββββββββββββββββββΌβββββββββββββββββΌββββββββββββββββββββββββββΌββββββββββββββββββββββββΌβββββββββββββββββββββ€
β hana-dr β 30001 β SECONDARY β SYNCMEM β logreplay β 1024 β 67108864 β 12.5% β
βββββββββββββββββ΄βββββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββββββββββ΄βββββββββββββββββ΄ββββββββββββββββββββββββββ΄ββββββββββββββββββββββββ΄βββββββββββββββββββββExamples β
1. Check System Replication Status β
Display system replication overview:
hana-cli replicationStatusOr explicitly:
hana-cli replicationStatus -ty system2. Check Service Replication β
Monitor service-specific replication:
hana-cli replicationStatus -ty service3. Filter by Service Name β
Check replication for a specific service:
hana-cli replicationStatus -ty service -sn indexserver4. Detailed Replication Information β
Show detailed replication metrics:
hana-cli replicationStatus -d5. Continuous Monitoring (Watch Mode) β
Monitor replication status in real-time:
hana-cli replicationStatus -wPress Ctrl+C to exit watch mode.
6. Combined Options β
Monitor specific service with details:
hana-cli replicationStatus \
-ty service \
-sn nameserver \
-dUse Cases β
- High Availability Monitoring: Monitor replication health in HA environments
- Disaster Recovery: Ensure DR site is properly synchronized
- Performance Analysis: Check replication lag and buffer usage
- Troubleshooting: Diagnose replication issues and bottlenecks
- Compliance: Verify replication meets RTO/RPO requirements
- Operations Dashboard: Continuous monitoring in watch mode
Related System Views β
The command queries these HANA system views:
SYS.M_SERVICE_REPLICATION- Service replication statusSYS.M_SERVICE_REPLICATION_STATISTICS- Replication statistics
Prerequisites β
- SAP HANA System Replication configured (for meaningful data)
- Appropriate database privileges to query replication views
- Primary and secondary systems must be accessible
Notes β
- System must have System Replication configured to see meaningful data
- If replication is not configured, the command shows
NOT_CONFIGUREDstatus - Watch mode is useful for monitoring during failover or takeover operations
- Replication lag can be calculated from log position timestamps
- Requires appropriate system privileges to query replication views
- Use detailed mode to diagnose performance issues with replication
Troubleshooting β
If you see errors or empty results:
- Verify system replication is configured
- Check database privileges
- Ensure you're connected to the primary or secondary system
- Review HANA replication configuration settings
Related Commands β
See the Commands Reference for other commands in this category.