If the database is inaccessible and received the error mentioned below through MSSQL Server Management studio:
Please follow the steps mentioned below:
1. Make sure that the Windows server has got enough disk space.
2. If the disk space is ok, then login to the MSSQL Server Management studio.
3. Select the particular database and right click on it. Click on "Detach" option to detach the database from the MSSQL management studio.
(Before that make sure that you have the backup of the database or a MDF file)
4. The database will be removed.
5. Click on Databases, right click on it and select the option of "Attach".
6. Click on Add to attach the MDF file of the database.
7. Click Ok.