I'm looking to reduce the size of my SQL Server Database. How can it be done?
Announcement
Collapse
No announcement yet.
How to Reduce or Shrink the SQL Server Database Size?
Collapse
X
-
If you are looking to reduce or shrink the size of your SQL Server Database, you can select any of the following two methods mentioned-
Method 1: With the Help of SQL Server Management Studio
Step #1:
Right-click the database and then Tasks>>Shrink>>Database
Step #2:
Click on OK
OR
Method 2: Using Transact SQL Command
You can follow the given steps for shrinking/reducing the SQL Server database size using the SQL Command-
Step #1:
Open the SQL Server Management Studio
Step #2:
Establish a connection to the Database Engine
Step #3:
Select New Query from the Standard Bar
Step #4:
Type the SQL Command given below in the query window and click on Execute-
DBCC SHRINKDATABASE (DatabaseName, ‘target percent’)
Congrats! You have successfully managed to shrink the size of your database!
Comment