https://www.myerrorsandmysolutions.com/how-to-take-offline-a-database-in-sql-server/
HOW TO take offline a database in SQL Server