Note
This view is available starting with V4.2.0.
Purpose
This view displays the GTS/STS values of the tenant clock service, the node information where the clock service is located, and the clock source type.
The following distinctions apply based on the database:
- For the primary database, it displays the current GTS value that has been allocated to the primary database.
- For the standby database, it displays the current readable point (STS) value of the standby database.
The following distinctions apply based on the tenant:
- In the system tenant, you can view the clocks of all tenants.
- In a user tenant, you can only view the clocks of the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID.
|
| TS_TYPE | varchar(100) | NO | The clock source type.
|
| TS_VALUE | bigint(20) | NO | The current clock value stored in memory. |
| SVR_IP | varchar(46) | NO | The IP address of the node where the clock service is located. |
| SVR_PORT | bigint(20) | NO | The port number of the node where the clock service is located. |
Sample query
In the system tenant, query the GTS/STS values, node information of the clock service, and clock source type for all tenants.
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_TIMESTAMP_SERVICE;
The query result is as follows:
+-----------+---------+---------------------+----------------+----------+
| TENANT_ID | TS_TYPE | TS_VALUE | SVR_IP | SVR_PORT |
+-----------+---------+---------------------+----------------+----------+
| 1 | GTS | 1742974298040897001 | 11.xxx.xxx.xxx | 28825 |
| 1001 | GTS | 1742974298040897001 | 11.xxx.xxx.xxx | 28825 |
| 1002 | GTS | 1742974298040897001 | 11.xxx.xxx.xxx | 28825 |
| 1003 | GTS | 1742974298040897001 | 11.xxx.xxx.xxx | 28825 |
| 1004 | GTS | 1742974298040897001 | 11.xxx.xxx.xxx | 28825 |
| 1005 | GTS | 1742974298040897001 | 11.xxx.xxx.xxx | 28825 |
| 1006 | GTS | 1742974298040897001 | 11.xxx.xxx.xxx | 28825 |
+-----------+---------+---------------------+----------------+----------+
7 rows in set
