ydb-platform / ydb-embedded-ui

MIT License
27 stars 7 forks source link

Add Create Async Replication action to db context menu #783

Closed antonkovalenko closed 2 months ago

antonkovalenko commented 5 months ago

Database context menu accessible under ... control must have an Item Create Async Replication that fills Query Editor with template query

CREATE ASYNC REPLICATION my_replication
FOR <remote_table_name> AS <local_table_name> [, <remote_table_name> AS <local_table_name> ...]
WITH (
  ENDPOINT=<endpoint>, -- endpoint, e.g. grpcs://mydb.ydb.tech:2135/
  DATABASE=<path_to_database>, --/cluster/dynamo
  USER=<user>,
  PASSWORD=<pwd>,
  ...
);
artemmufazalov commented 5 months ago

Command to stop replication is also needed

antonkovalenko commented 5 months ago

@CyberROFL please share a template of a query to stop replication and convert tables to RW state

CyberROFL commented 4 months ago
ALTER ASYNC REPLICATION `my_replication` SET (STATE = 'DONE', FAILOVER_MODE = 'FORCE');
DROP ASYNC REPLICATION `my_replication`;
antonkovalenko commented 2 months ago

Templates do exist, but I had error on prestable

image