Overview
Displays the GTS/STS values of the tenant's clock service, the node information where the clock service is located, and the clock source type.
The types vary depending on the database:
- For a primary database, displays the currently allocated GTS value.
- For a standby database, displays the current readable timestamp (STS) value of the standby database.
The types vary depending on the tenant:
- In the sys tenant, you can view the clocks of all tenants.
- In a user tenant, you can only view the clock of the current tenant.
Columns
Column |
Type |
Is NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID:
|
| TS_TYPE | varchar(100) | NO | Clock source type. Valid values:
|
| TS_VALUE | bigint(20) | NO | The current clock stored in memory. |
| SVR_IP | varchar(46) | NO | Node Address of the Clock Service |
| SVR_PORT | bigint(20) | NO | Port number of the node where the clock service resides |
Sample query
In the sys tenant, view the node information and clock source type of the GTS/STS and clock service 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