This topic describes how to drop a materialized view log by using SQL statements.
Note
When you drop a materialized view log, if a transaction is running on the base table, the drop operation is blocked until the transaction is completed.
Required privileges
You need the DROP TABLE privilege to drop a materialized view log. For more information about privileges in OceanBase Database, see Privilege types in Oracle mode.
Considerations
A materialized view log that is separately dropped is not moved to the recycle bin.
Syntax
The syntax for dropping a materialized view log is as follows:
DROP MATERIALIZED VIEW LOG ON [schema.] table;
Parameters
| Parameter | Description |
|---|---|
| schema. | The schema where the base table of the materialized view log is located. If you do not specify the schema. parameter, the system assumes by default that the base table resides in your own schema. |
| table | The name of the base table of the materialized view log. |
Example
Drop the materialized view log in the test_tbl1 table.
obclient [SYS]> DROP MATERIALIZED VIEW LOG ON test_tbl1;
The return result is as follows:
Query OK, 0 rows affected