I took my SQL Server Database OFFLINE. Is it still occupying the same space as when it was ONLINE?
Should I keep it OFFLINE or is it better to BACKUP the database and DROP it?
I took my SQL Server Database OFFLINE. Is it still occupying the same space as when it was ONLINE?
Should I keep it OFFLINE or is it better to BACKUP the database and DROP it?
An OFFLINE database is indeed still occupying space on disk. You can verify this by finding the location of the database files with a quick peek at sys.master_files and then navigating in windows explorer to the directory location.
select *
from sys.master_files
where database_id = db_id('my_offline_db');
If it's not bothering you, then there's no need to drop the database. You might run into some maintenance processes that don't play nice with an offline database, but it's a matter of preference whether you modify these processes to gracefully handle and offline database or you remove the offline db from your instance.
If you choose to drop the database to free up disk space, you will need to remember to manually delete the files afterwards. If you want to quickly browse some reasons why you might keep the offline database around, this ServerFault question is a good read.
The answer to this question depends upon why that database was taken offline in the first place.
Get a confirmation for the reasons of it's being taken offline followed by any company or vendor policy which needs db to be offline say for x days and then can be dropped entirely from the instance.
You can check from various scripts online though when it was taken offline. You can get an idea I'd that is sitting there for too long doing nothing but eating up unwanted space. So answer is more from your side of researching to do on that db being taken offline.