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?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Yes, better leave idle.

Stop those SQL Server related services. Then it is safe to be idle.
To sachiek's point.
Make sure the SQL is really unneeded I.e. Really done.stop it for a period of time.
You can then start it backup, detach the user databases after identifying where they are located by looking at the database properties files. Delete the files.
You've recllaimed the space. You can the make sure all ms SQL related services are set to disabled.
You could uninstall SQL, but the space the application and the system DBS consume are minima icon parison.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Vitor MontalvãoMSSQL Senior EngineerCommented:
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?
Scott PletcherSenior DBACommented:
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.
SJBobAuthor Commented:
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!!
Scott PletcherSenior DBACommented:
You will need to drop the databases while SQL is still up and running.  The command is simply:


This code should generate the commands for you:

SELECT 'DROP DATABASE [' + name + '];'
FROM sys.databases
WHERE name NOT IN ('distribution', 'master', 'model', 'msdb', 'tempdb')

Then shutdown SQL and disable the service.  Then you can also delete the physical files for the system dbs from disk.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.