What is the difference between dropping a database and taking a database offline?
- Can I drop a database that is offline?
- What happens when you take database offline?
- What is database offline?
- What happens when you drop a database?
Can I drop a database that is offline?
You absolutely can drop a SQL Server database that's offline, but remember that its files won't be deleted if you do.
What happens when you take database offline?
Taking the database offline is a quick way to stop the bleeding until you get the bug identified. You can then bring it back online to assess the damage within the database.
What is database offline?
A database can be taken offline either using transact-SQL or by using SQL Server management Studio (SSMS). I prefer taking database offline before dropping or deleting them. This is to avoid any mistakes or loosing data prematurely.
What happens when you drop a database?
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 offline when it is dropped, the disk files are not deleted. These files can be deleted manually by using Windows Explorer.
Related Questions
-
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago