LOCK_CATALOG_TABLE_STAT is used to lock external table statistics in the catalog.
Syntax
DBMS_STATS.LOCK_CATALOG_TABLE_STAT (
catname VARCHAR(65535),
dbname VARCHAR(65535),
tabname VARCHAR(65535),
partname VARCHAR(65535) DEFAULT NULL,
stattype VARCHAR(65535) DEFAULT 'ALL'
);
Parameters
Parameter |
Explanation |
|---|---|
| catname | Specifies the catalog name. |
| dbname | Specify the database name. |
| tabname | Specifies the name of the table to lock. |
| partname | Specify the partition name. NULL Represents the entire table. |
| stattype | Specifies the type of information to be locked, that is, which category of statistics to lock. Valid values:
|
Examples
Lock the statistics information of the entire lineitem table under the Catalog name hive_catalog and Database name test_oss. The lock type is ALL.
obclient> CALL DBMS_STATS.GATHER_CATALOG_TABLE_STATS (
'hive_catalog',
'test_oss',
'lineitem',
NULL
'ALL'
);