How to Shrink Database And Database Files - SQL Server DBA Tutorial

In this video you will learn how to shrink database, database files and database log files. It also demonstrates best practices of shrinking SQL Server Database data files, log files and database as a whole.

Scripts used in this video

--Shrink Database Script
USE [SalesOrders]
GO

DBCC SHRINKDATABASE(N'SalesOrders', 10 )
GO

--Shrink DB Files Scripts
USE [SalesOrders]
GO

DBCC SHRINKFILE (N'SalesOrders' , 3)
GO


 
Shrink Database files and Database in SQL Server

4 comments:

  1. When do we need to bring database offline?thanks

    ReplyDelete
  2. At this point you'll find out what is important, it all gives a url to the appealing page: https://oomnex.com/oomnex-firming-prorf-radio-frequency-face-neck-rejuvenation-system

    ReplyDelete
  3. Thank you for this way of optimizing the database. And then the Windows 11 themes database has grown a lot, I would like to optimize it. I'll go and try.

    ReplyDelete
  4. The abstract succinctly summarizes the key points, providing a quick overview of the paper. free pdf magazine

    ReplyDelete