# Operations that Take Database Level Locks

The following operations take database level locks:

* `ALTER DATABASE`
* `ALTER PIPELINE`
* `ALTER TABLE`
* `ALTER VIEW`
* `BACKUP DATABASE`
* `CREATE DATABASE`
* `CREATE INDEX`
* `CREATE PIPELINE`
* `CREATE TABLE`
* `CREATE VIEW`
* `DROP DATABASE`
* `DROP INDEX`
* `DROP PIPELINE`
* `DROP TABLE`
* `DROP VIEW`
* `REBALANCE PARTITIONS`
* `RESTORE DATABASE`
* `RESTORE REDUNDANCY`
* `OPTIMIZE TABLE` (for rowstore tables only)
* `TRUNCATE`

***

Modified at: September 16, 2022

Source: [/db/v9.1/reference/sql-reference/operations-that-take-either-a-database-or-a-cluster-level-lock/operations-that-take-database-level-locks/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/operations-that-take-either-a-database-or-a-cluster-level-lock/operations-that-take-database-level-locks/)

(An index of the documentation is available at /llms.txt)
