The size of SQL Server Database can be reduced/shrunk using any of the following two methods-
Method 1: With the help of SQL Server Management Studio
Under this method, follow the steps given below for shrinking or reducing the size of SQL Server Database (.MDF and .LDF)-
- Right-click the database name >>Tasks>>Shrink>>Database
- Click OK
OR
Method 2: With the help of Transact SQL Command
Under this method, follow the steps given below for shrinking or reducing the size of the SQL Server database using the SQL Command-
- Open the window- SQL Server Management Studio
- Connect it to the Database Engine
- Click on New Query from the Standard Bar
- Enter the following SQL command in the query window and click on Execute
DBCC SHRINKDATABASE (DatabaseName, ‘target percent’); this command helps in shrinking the database
We hope that you must have understood how you can shrink/reduce the size of your database using any of the two methods discussed above. If you still face any difficulty, feel free to reach out to the bodHOST Team for an unmatched and proactive 24×7 tech support.