Purpose
This statement is used to initiate a major or minor freeze in a user tenant. Manual major freezes are supported at the tenant, table, and partition levels. Minor freezes are supported at the tenant and partition levels.
Syntax
ALTER SYSTEM merge_action;
merge_action:
MAJOR FREEZE [TABLE_ID = table_id | TABLET_ID = tablet_id]
| MINOR FREEZE [TABLET_ID = tablet_id]
| {SUSPEND | RESUME} MERGE
| CLEAR MERGE ERROR
Parameters
| Parameter | Description |
|---|---|
| MAJOR FREEZE | Initiates a major freeze.
NoteA user tenant can only initiate a major freeze for itself. |
| MINOR FREEZE | Initiates a minor freeze.
NoteA user tenant can only initiate a minor freeze for itself. |
| {SUSPEND | RESUME} MERGE | Suspends or resumes a major freeze.
NoteA user tenant can only suspend or resume a major freeze for itself. |
| CLEAR MERGE ERROR | Clears a major freeze error.
NoteA user tenant can only clear a major freeze error for itself. |
| TABLE_ID | Specifies a table for a major freeze. |
| TABLET_ID | Specifies a partition for a minor freeze or a major freeze. |
Examples
Examples related to major freezes
Initiates a major freeze for the user tenant.
obclient> ALTER SYSTEM MAJOR FREEZE; Query OK, 0 rows affectedInitiates a table-level major freeze for the user tenant.
Query the
table_idof the table TBL1 to be major frozen.obclient(SYS@oracle001)[SYS]> SELECT DATABASE_NAME, TABLE_ID, TABLE_NAME FROM SYS.DBA_OB_TABLE_LOCATIONS WHERE TABLE_NAME = 'TBl1';The query result is as follows:
+---------------+----------+------------+ | DATABASE_NAME | TABLE_ID | TABLE_NAME | +---------------+----------+------------+ | SYS | 500002 | TBL1 | +---------------+----------+------------+ 1 row in setExecute the following command to initiate a table-level major freeze.
obclient(SYS@oracle001)[SYS]> ALTER SYSTEM MAJOR FREEZE TABLE_ID = 500002;
Initiates a partition-level major freeze for the user tenant.
Query the
tablet_idof the partition to be major frozen.obclient(SYS@oracle001)[SYS]> SELECT DATABASE_NAME, TABLE_ID, TABLE_NAME, TABLET_ID, PARTITION_NAME, SUBPARTITION_NAME FROM SYS.DBA_OB_TABLE_LOCATIONS WHERE TABLE_NAME = 'TBL1';The query result is as follows:
+---------------+----------+------------+-----------+----------------+-------------------+ | DATABASE_NAME | TABLE_ID | TABLE_NAME | TABLET_ID | PARTITION_NAME | SUBPARTITION_NAME | +---------------+----------+------------+-----------+----------------+-------------------+ | SYS | 500012 | TBL1 | 200007 | P01 | NULL | | SYS | 500012 | TBL1 | 200008 | P02 | NULL | | SYS | 500012 | TBL1 | 200009 | P03 | NULL | +---------------+----------+------------+-----------+----------------+-------------------+ 3 rows in setExecute the following command to initiate a partition-level major freeze.
obclient(SYS@oracle001)[SYS]> ALTER SYSTEM MAJOR FREEZE TABLET_ID = 200007;
Examples of suspending or resuming a major freeze
Suspends a major freeze for the user tenant.
obclient> ALTER SYSTEM SUSPEND MERGE; Query OK, 0 rows affectedResumes a major freeze for the user tenant.
obclient> ALTER SYSTEM RESUME MERGE; Query OK, 0 rows affected
Examples of clearing a major freeze error
Clears a major freeze error for the user tenant.
obclient> ALTER SYSTEM CLEAR MERGE ERROR; Query OK, 0 rows affected
Examples related to minor freezes
Initiates a minor freeze for the user tenant.
obclient> ALTER SYSTEM MINOR FREEZE; Query OK, 0 rows affectedInitiates a partition-level minor freeze for the user tenant.
obclient> ALTER SYSTEM MINOR FREEZE TABLET_ID = 5; Query OK, 0 rows affected
