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

preview_player
Показать описание
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.

blog post for scripts used in this video:

To follow Step by Step DBA Tutorial by Tech Brothers
Рекомендации по теме
Комментарии
Автор

Thank you very much, your instruction was most helpful.

ByronForrest
Автор

This is really helpful.. Thank you very much...

roshanrafeek
Автор

thanks A lot.... great and helpful toturial!!!

draxler
Автор

Should we "detach"/reattached, or "take offline"/make online on the database after we shrink the file? rather just only "refresh" the database? This is because i noticed that, free space available is getting lesser than before, which is weird.

migaelurk
Автор

Thanks for the video
may I ask you what to check and why do I have the following error when I try to shrink the file Msg 3140, Level 16, State 5, Line 1

haithamelatrache
Автор

Hi, I've got ssms 2019 server, I'm trying to shrink the database but I didn't find the option Task, so how do we actually shrink without it showing the option?

jaswanthreddy
Автор

How shrink database affect in production? will it create outage if we shrink database instead of database file?

shrenikshah
Автор

what about notrancate and trancateonly t-sql, and so what is benefit of using empty when shrinking file!!!

elbadrey
Автор

What if we have mirroring enabled for the database what would be the steps

prashantmehra
Автор

Hello, I have a question regarding shrinking the t-log backups on Clustered environment. Scenario is we have 2 DB servers with same instance name say SQL1, SQL2. SQL1 primary and SQL2 is secondary. I have sceduled the T0log backups on primary server using maintenance Wizard, but I cant find any t-log backupsin the destination folder. If we take manual tlog backups we can see them in destination folder but its failing only when scheduled through Maintenance WIzard & clustered environment. Can you please make a video on taking t-log backups on clustered environment. Please let me know if you have any questions.

szp
Автор

Hi, I have a question, I have a Win 2008 R2 SQL server that was never given a correct maintenance and now the transaction log file is about 500 GB. I've made a transaction log backup and now I was trying to shrink the log file it but it only free some little space (about 60 MB) each time I run the shrink task. I've tried both shrink actions ("release unused space" and "reogranize pages before releasing unused space") and the behavior is the same with both options. In the shrink file menu for the log is showing me "Currently allocated space: 492690, 31 MB" and "Available free space: 472219, 08 MB (95%)". Do you have any idea why Iam not being able to shrink my transaction logs? Thanks in advance! regards!

drups
Автор

if you make this video in hindi to kiya he bat thi

SalmanAli-udkc
Автор

hmm... explanation unclear around those allocated mb

gepliprl