Listing replication databases
Run the nzdr command with the list db subcommand to list the databases that participate in replication.
You can run the command on any of the systems.
Procedure
- Log in to the Netezza Performance Server container as
the
nzuser.ssh nz@APPLIANCE HOSTNAME -p 51022 - Locate the nzdr utility in the /nrs directory.
- List the databases.Example:
- To retrieve a configuration for a single database,
run:
./nzdr list db --db-name DATABASE NAME./nzdr list db +-----------+----------------+-----------------+------------------------+--------------------+ | db-name | primary-node | replica-nodes | db-full-backupset-id | capture-interval | +===========+================+=================+========================+====================+ | MYDB1 | CPDS-A | CPDS-B | 20230330022629 | 180 | +-----------+----------------+-----------------+------------------------+--------------------+ - To retrieve a configuration for a single database in JSON,
run:
./nzdr list db --db-name DATABASE NAME -j./nzdr list db --db-name MYDB2 -j [ { "db_name": "MYDB2", "db_primary": "CPDS-A", "db_replicas": [ "CPDS-B" ], "db_full_backupset_id": "20221108000103", "db_interval": 180 "db_id": "2" } ] - To retrieve a configuration for all databases,
run:
./nzdr list db./nzdr list db +-----------+-------------------+----------------+----------------------+------------------+ | db-name | primary-node | replica-nodes | db-full-backupset-id | capture-interval | +===========+===================+================+======================+==================| | MYDB2 | CPDS-A | CPDS-B | 20221115201045 | 180 | +-----------+-------------------+----------------+----------------------+------------------| | MYDB1 | CPDS-A | CPDS-B | 20221115194806 | 180 | +-----------+-------------------+----------------+----------------------+------------------| - To retrieve a configuration for all databases in JSON,
run:
./nzdr list db -j./nzdr list db -j [ { "db_name": "MYDB2", "db_primary": "CPDS-A", "db_replicas": [ "CPDS-B" ], "db_full_backupset_id": "20221108000103", "db_interval": 180, "db_id": "2" }, { "db_name": "MYDB1", "db_primary": "CPDS-A", "db_replicas": [ "CPDS-B" ], "db_full_backupset_id": "20221108000103", "db_interval": 180, "db_id": "1" } ]
For more information about the nzdr command and its options and parameters, see The nzdr command.
- To retrieve a configuration for a single database,
run: