About 3,120,000 results
Open links in new tab
  1. DROP DATABASE (Transact-SQL) - SQL Server | Microsoft Learn

    Sep 13, 2024 · Dropping a database deletes the database from an instance of SQL Server and deletes the physical disk files used by the database. If the database, or any one of its files, is …

  2. sql server - Best way to quickly and effectively drop a database

    Drop the database: USE master; GO ALTER DATABASE AlwaysEncryptedSample SET OFFLINE WITH ROLLBACK IMMEDIATE; GO ALTER DATABASE AlwaysEncryptedSample …

  3. sql - How to drop a database when it's currently in use ... - Stack ...

    Nov 24, 2015 · USE master; ALTER DATABASE [Duck] SET SINGLE_USER WITH ROLLBACK IMMEDIATE; DROP DATABASE [Duck] ; For deep discussion see this answer.

  4. Dropping and recreating databases in Microsoft SQL Server

    Sep 11, 2012 · SQL Server 2016 (and above) support one line and atomic(?) syntax DROP DATABASE IF EXISTS database_name. REF: https://msdn.microsoft.com/en …

  5. Dropping an Offline Database in SQL Server - Brent Ozar …

    Feb 5, 2015 · When you drop a database in SQL Server, the files are normally removed from the file system right away. POOF! Hope you had a backup if you ran DROP DATABASE against …

  6. SQL DROP DATABASE with SSMS, Azure Data Studio, T-SQL ... - SQL Server

    Jan 24, 2024 · To drop a database via T-SQL syntax (i.e. DROP DATABASE database_name), configure the database name in the @DatabaseName variable and run the SQL commands …

  7. How to delete database from SQL Server if .mdf and .ldf file is …

    Feb 6, 2012 · Right click on the DB > Delete. Uncheck "Delete backup and restore history information for databases" Check "Close existing connections" And hit OK. Right click on the …

  8. SQL Server DROP DATABASE Explained By Practical Examples

    To remove an existing database from a SQL Server instance, you use the DROP DATABASE statement. The DROP DATABASE statement allows you to delete one or more databases with …

  9. Script to Drop and Delete Offline SQL Server Databases and Data Files

    Nov 2, 2017 · In this tip we look at a simple and fast tool to drop all of the offline databases from your SQL Server and also delete the MDF, NDF and LDF files of these databases from their …

  10. Safely Dropping Databases in SQL Server: A Guide for DBAs

    Dec 27, 2023 · Now that I‘ve scared you a bit on worst case scenarios, let‘s dig into how to drop databases in SQL Server…safely! Using T-SQL to Drop Databases. The Transact-SQL DROP …

  11. Some results have been removed
Refresh