## 3.9 SAP HANA System Replication Command Line Reference
This topic provides an overview of SAP HANA system replication commands and options.
| Command        | -sr_enable                                                                                                                                                                                                                                               |
|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Options        | [--name=<site alias>]                                                                                                                                                                                                                                    |
| System         | Primary                                                                                                                                                                                                                                                  |
| Online/Offline | Online                                                                                                                                                                                                                                                   |
| Description    | Enables a system to serve as a system replication source system. In multitier and multitarget setups the --name= option is mandatory. Use -sr_enable to enable the source system for any further tier that is added to the system replication landscape. |
| Command        | -sr_disable                                                                                                                                                                                                                                              |
| System         | Primary                                                                                                                                                                                                                                                  |
| Online/Offline | Online                                                                                                                                                                                                                                                   |
| Description    | Disables system replication capabilities on the primary system.                                                                                                                                                                                          |
| Command        | -sr_register                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| System         | Secondary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Online/Offline | Offline                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Description    | ● --remoteHost=<primary master host> Registers a system to a source system and creates the replication path for the system replication. ● --remoteInstance=<primary instance id> ● --replicationMode=sync|syncmem|async Specifies the replication mode. ● --operationMode=delta_datashipping|logreplay|logreplay_readaccess Specifies the operation mode. ● --name=<unique site name> Specifies the system name. ● [--online] If the system is running you can use this parameter to automatically perform a system restart. Not relevant if the system is shut down. ● [--force_full_replica] If a parameter is given, a full data shipping is initiated. Otherwise a delta datashipping is attempted. |
| Command        | -sr_unregister                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Options        | [--id=<site id>|--name=<site name>]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| System         | Primary, Secondary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Online/Offline | Secondary offline Primary online (to remove metadata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Command     | -sr_unregister                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Description | Unregisters a secondary system from its source. Use this command on the secondary that needs to be unregistered. When the secondary system is not available, this command can also run on the primary. In this case use either the -id option or the -name option to identify the secondary system.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|             |  Note There are three scenarios in which it is necessary to unregister system replication: ● When the secondary system is available, but should be de-coupled permanently You will be able to use the secondary system as a standard SAP HANAinstallation afterwards. ● When the secondary system is not available anymore and the primary system needs to be cleaned up in order to be able to register a new system This can occur when the secondary system was uninstalled or when it cannot be recovered af­ ter a disaster. ● When you want to re-establish the original setup after a takeover in a multitier system replica­ tion configuration For more information, see Restore the Original SAP HANAMultitier System Replication Configu­ ration . |
To understand how to use the -sr\_unregister command correctly, see SAP Note 1945676 .
| Command        | -sr_changemode                                              |
|----------------|-------------------------------------------------------------|
| Options        | --mode=sync|syncmem|async                                   |
| System         | Secondary                                                   |
| Online/Offline | Online and offline                                          |
| Description    | Changes the replication mode of a secondary system.         |
| Command        | -sr_takeover                                                |
| System         | Secondary                                                   |
| Online/Offline | Online and offline                                          |
| Description    | Makes this secondary the new primary system.                |
| Command        | -sr_state                                                   |
| System         | Primary and Secondary                                       |
| Online/Offline | Online and offline                                          |
| Description    | Shows status information about a system replication system. |
## Related Information
Example: Restore the Original SAP HANA Multitier System Replication Configuration [page 141] SAP Note 1945676: Correct usage of hdbnsutil -sr\_unregister
<!-- image -->