SJBob
asked on
How best recover disk space from depricated SQL databases
I have a 300GB database that has been moved to a new Hyper-V virtual server. How can I recover the disk space from the old db, and the resources consumed by SQL 2008 (on Win2008R2) without damaging or having to reinstall the O.S? I read on an MS Support site that there is a risk the OS would need to be reinstalled. Is it really that risky? As an alternate can I just idle the no-longer used instance somehow?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Commonly, the suggestion is to reinstall deals on starting fresh eliminating what might have been installed to serve the purpose for which the server was tasked, and making the opportunity available to arrange the new install to meet the new needs for which it is being designated.
I have a 300GB database that has been moved to a new Hyper-V virtual server.How long the migration has been done? If long enough and if you already have backups then you can uninstall SQL Server and format the storage.
Anyway, I would go always for a clean installation and if possible with a new Windows version. How often you have the possibility to update to a more recent version of Windows, right?
The user databases are easy enough to clean up. You can just DROP them.
The rest is trickier. The SQL software itself doesn't take all that much room, if you can just shut it down rather than uninstall it, which I agree could perhaps risk odd errors in Windows itself. You can then delete all system db files, .mdf and .ldf, and all log files. Then that SQL could never be restarted again anyway. As to licensing, hopefully completely disabling the software means you can leave the install without it counting as one of your licensed copies, but I am not a SQL licensing guru and you'd want to verify that with MS or your vendor.
The rest is trickier. The SQL software itself doesn't take all that much room, if you can just shut it down rather than uninstall it, which I agree could perhaps risk odd errors in Windows itself. You can then delete all system db files, .mdf and .ldf, and all log files. Then that SQL could never be restarted again anyway. As to licensing, hopefully completely disabling the software means you can leave the install without it counting as one of your licensed copies, but I am not a SQL licensing guru and you'd want to verify that with MS or your vendor.
ASKER
OK.. I will not uninstall it. Forgive my newbie followup but a couple clarifying questions - I see options to detach and bring offline. The DROP options I see are "drop-to... and create-to..." "script database options".. Is that what you are referring to? Also to be clear by "shutting it down" you mean disabling all the SQL services? After that I can simply delete the db files? Thanks Scott!!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Stop those SQL Server related services. Then it is safe to be idle.