Skip to content

Add REPLICA MODE to the output of the isql SHOW DATABASE command #7425

@sim1984

Description

@sim1984

Now, to find out in what mode the current database is, one of the queries needs to be executed:

SELECT MON$REPLICA_MODE FROM MON$DATABASE;

or

SELECT RDB$GET_CONTEXT('SYSTEM', 'REPLICA_MODE') FROM RDB$DATABASE;

However, we have a nice SHOW DATABASE command in isql that shows a lot of things, but not the replication mode:

SQL> show database;
Database: inet://localhost/horses
        Owner: SYSDBA
PAGE_SIZE 16384
Number of DB pages allocated = 142752
Number of DB pages used = 139414
Number of DB pages free = 3338
Sweep interval = 20000
Forced Writes are ON
Transaction - oldest = 1044
Transaction - oldest active = 1045
Transaction - oldest snapshot = 1045
Transaction - Next = 1048
ODS = 13.0
Database not encrypted
Wire crypt plugin: ChaCha64
Creation date: Dec 14, 2022 15:03:28 GMT
Protocol version = 17
Default Character set: UTF8
SQL SECURITY DEFINER

In addition, it would be nice to know if replication is enabled at all with the command:

ALTER DATABASE
ENABLE PUBLICATION;

What can be done with a request:

SELECT RDB$ACTIVE_FLAG
FROM RDB$PUBLICATIONS
WHERE RDB$PUBLICATION_NAME = 'RDB$DEFAULT';

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions