sp_tempdb_markdrop

(Cluster Edition) Places a local system temporary database in the drop state.

Syntax

sp_tempdb_markdrop database_name [, {'mark' | 'unmark'}]

Parameters

Examples

Usage

To delete the last local temporary database:
  1. Use sp_tempdb_markdrop to place the local system temporary database in the drop state.

  2. Shut down and restart the instance that owns the last local temporary database.

    Note: After you mark the local system temporary database to be dropped, the owner instance restarts if there are no other active instances. This instance does not use the marked local system temporary database when it starts.
  3. Use drop database to delete the last local system temporary database.

Permissions

The permission checks for sp_tempdb_markup differ based on your granular permissions settings.

SettingDescription
Enabled

With granular permissions enabled, you must be a user with the own database privilegeon the specified database or the manage cluster privilege.

Disabled

With granular permissions disabled, you must be the database owner or a user with sa_role.