Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

DBCC FLUSHAUTHCACHE (Transact-SQL)

Applies to: 👁 Image
Azure SQL Database 👁 Image
SQL database in Microsoft Fabric

Empties the database authentication cache containing information about logins and firewall rules, for the current user database. Additionally, it clears all cached Microsoft Entra group membership data stored in the database.

DBCC FLUSHAUTHCACHE doesn't apply to the logical master database, because the master database contains the physical storage for the information about logins and firewall rules.

The user executing the statement and other currently connected users remain connected.

👁 Image
Transact-SQL syntax conventions

Syntax

DBCC FLUSHAUTHCACHE
[;]

Arguments

None.

Remarks

The authentication cache makes a copy of logins and server firewall rules stored in the master database, and places them in memory in the user database.

A user with the KILL DATABASE CONNECTION permission can explicitly terminate a connection to SQL Database by using the KILL (Transact-SQL) command.

DBCC FLUSHAUTHCACHE is not supported for Azure Synapse Analytics.

Permissions

Requires the KILL DATABASE CONNECTION permission SQL Database or the admin account.

Example

The following statement clears the authentication cache for the current database.

DBCC FLUSHAUTHCACHE;

Related content


Feedback

Was this page helpful?

Additional resources