> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# database_* session settings

> ClickHouse session settings in the database_* generated group.

These settings are available in [system.settings](https://clickhouse.com/docs/reference/system-tables/settings.md) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

## database

Sets the current database for the query — the database in which unqualified table names are resolved, the same effect as `USE <database>`. Unlike the `USE` statement, this is an ordinary session setting: like any other setting it accepts a value without validating it, and an unknown database is reported when the setting takes effect (when a query runs), not at `SET` time. It follows the privilege contract of the client-supplied default database (which it generalizes), not of `USE`: selecting the current database does not require the `SHOW_DATABASES` privilege, while access to the tables inside it is checked as usual. Used as the destination for the HTTP interface `database` URL parameter and the `X-ClickHouse-Database` header.

## database\_atomic\_wait\_for\_drop\_and\_detach\_synchronously

Type

Bool

Default

0

Adds a modifier `SYNC` to all `DROP` and `DETACH` queries.

Possible values:

* 0 — Queries will be executed with delay.
* 1 — Queries will be executed without delay.

## database\_datalake\_require\_metadata\_access

Type

Bool

Default

1

Either to throw error or not if we don't have rights to get table's metadata in database engine DataLakeCatalog.

## database\_shared\_drop\_table\_delay\_seconds

Type

UInt64

Default

28800

The delay in seconds before a dropped table is actually removed from a Shared database. This allows to recover the table within this time using `UNDROP TABLE` statement.
