solidDB Help : solidDB reference : SQL: Statements : SET : SET SYNC : SET SYNC NODE
  
SET SYNC NODE
Note Applies to only solidDB Advanced Replication configurations.
SET SYNC NODE {unique‑node‑name | NONE}
Access requirements
In master: SYS_ADMIN_ROLE or SYS_SYNC_ADMIN_ROLE role
In replica: SYS_SYNC_ADMIN_ROLE role
Usage
Use the SET SYNC NODE statement (in either the master or replica database) to rename or remove the node name from the current catalog.
Assigning the node name is part of the registration process of a replica database. Each catalog of a solidDB environment must have a node name that is unique within the domain. One catalog can have only one node name. Two catalogs cannot have the same node name.
You can use the SET SYNC NODE statement if the following situations are true:
If the node is a replica database, the replica database is not registered with a master database.
If the node is a master database, there are no replicas registered in the master database.
You can verify the current node name assignment with the following statement: SELECT GET_PARAM('SYNC NODE')
Parameters, clauses, keywords, and variables
unique‑node‑name: Node name that conforms to the rules that are used for naming other objects (such as tables) in the database. Do not put single quotation marks around the node name. If you want to use a reserved word, such as "NONE", as a node name, then you must put the keyword in double quotation marks to ensure that it is treated as a delimited identifier. For example: SET SYNC NODE "NONE"; -- Now the node name is "NONE"
NONE: Removes the node name from the current catalog. This option is used when you are dropping a synchronized database and removing its registration.
Note When using the SET SYNC NODE NONE option, make sure that the catalog that is associated with the node name is not defined as a master database, replica database, or both. To remove the node name, the catalog must be defined as SET SYNC MASTER NO and SET SYNC REPLICA NO, see SET SYNC {MASTER | REPLICA}.
Return values
For details on each error code, see Error codes.
 
Error code
Description
13047
No privilege for operation
13107
Illegal set operation
25059
After registration nodename cannot be changed
25082
Node name can not be removed if node is master or replica.
Example
SET SYNC NODE A; -- Now the node name is A.
SET SYNC NODE B; -- Now the node name is B.
COMMIT WORK;
SET SYNC NODE C; -- Now the node name is C.
ROLLBACK WORK; -- Now the node name is rolled back to B.
SET SYNC NODE NONE; -- Now the node has no name.
COMMIT WORK;
Go up to
SET SYNC