Note
This view is available starting with V4.0.0.
Purpose
This view displays the location of a table or partition, including system tables, user tables, and index tables.
Columns
Column |
Type |
Nullable |
Description |
|---|---|---|---|
| DATABASE_NAME | VARCHAR2(128) | NO | The name of the database. |
| TABLE_NAME | VARCHAR2(256) | NO | The name of the table. |
| TABLE_ID | NUMBER(38) | NO | The ID of the table. |
| TABLE_TYPE | VARCHAR2(13) | NO | The type of the table. Valid values:
|
| PARTITION_NAME | VARCHAR2(64) | NO | The name of the partition. For a non-partitioned table, this column is NULL. |
| SUBPARTITION_NAME | VARCHAR2(64) | NO | The name of the subpartition. If no subpartition exists, this column is NULL. |
| INDEX_NAME | VARCHAR2(1024) | NO | The name of the index table. If the table is not an index table, this column is NULL. |
| DATA_TABLE_ID | NUMBER | NO | The ID of the primary table to which the index table or LOB auxiliary table belongs. If the table is not an index table or LOB auxiliary table, this column is NULL. |
| TABLET_ID | NUMBER(38) | NO | The tablet ID. |
| LS_ID | NUMBER | NO | The log stream to which the object belongs. |
| ZONE | VARCHAR2(128) | NO | The zone where the replica resides. |
| SVR_IP | VARCHAR2(46) | NO | The IP address of the replica. |
| SVR_PORT | NUMBER | NO | The port number of the replica. |
| ROLE | VARCHAR2(8) | NO | The role of the replica. |
| REPLICA_TYPE | VARCHAR2(18) | NO | The type of the log stream replica. Valid values:
|
| DUPLICATE_SCOPE | VARCHAR2(7) | NO | The value indicates whether the table is a replicated table. Valid values:
NoteThis column is available starting with V4.2.0. |
| DUPLICATE_READ_CONSISTENCY | varchar(6) | NO | The value indicates the read consistency constraint of the standby replica of a replicated table. Valid values:
NoteThis column is available starting with V4.3.4. |
| OBJECT_ID | NUMBER(38) | NO | The object ID of the partition.
NoteThis column is available starting with V4.2.0. |
| TABLEGROUP_NAME | VARCHAR2(128) | NO | The name of the table group corresponding to the table.
NoteThis column is available starting with V4.2.0. |
| TABLEGROUP_ID | NUMBER(38) | NO | The ID of the table group corresponding to the table.
NoteThis column is available starting with V4.2.0. |
| SHARDING | VARCHAR2(20) | NO | The sharding attribute of the table group corresponding to the table.
NoteThis column is available starting with V4.2.0. |
| SCOPE | VARCHAR2(20) | YES | The SCOPE attribute of the table group. Valid values:
NoteFor V5.x, this column is available starting with V5.0.1. |
| INDEX_TYPE | VARCHAR2(6) | NO | The value indicates the GLOBAL/LOCAL attribute of the index of an index table. Valid values:
Note
|
Sample query
Query the location of the TEST_TBL3 table.
obclient> SELECT * FROM SYS.DBA_OB_TABLE_LOCATIONS WHERE TABLE_NAME='TEST_TBL3'\G
The return result is as follows:
*************************** 1. row ***************************
DATABASE_NAME: TEST_USER001
TABLE_NAME: TEST_TBL3
TABLE_ID: 500063
TABLE_TYPE: USER TABLE
PARTITION_NAME: NULL
SUBPARTITION_NAME: NULL
INDEX_NAME: NULL
DATA_TABLE_ID: NULL
TABLET_ID: 200035
LS_ID: 1001
ZONE: zone1
SVR_IP: xx.xx.xx.xx
SVR_PORT: 2882
ROLE: LEADER
REPLICA_TYPE: FULL
DUPLICATE_SCOPE: NONE
DUPLICATE_READ_CONSISTENCY: NONE
OBJECT_ID: 500063
TABLEGROUP_NAME: TBLGROUP2
TABLEGROUP_ID: 500062
SHARDING: NONE
SCOPE: SERVER
INDEX_TYPE: NULL
1 row in set
